diff --git a/src/Samples/Sample 03 - Allocating/Program.cs b/src/Samples/Sample 03 - Allocating/Program.cs
index b7e9524..3c45103 100644
--- a/src/Samples/Sample 03 - Allocating/Program.cs
+++ b/src/Samples/Sample 03 - Allocating/Program.cs
@@ -1,6 +1,7 @@
using System;
using System.IO;
using FreeImageAPI;
+using FreeImageNETUnitTest;
namespace Sample03
{
@@ -8,21 +9,21 @@ class Program
{
static void Main(string[] args)
{
- // Check if FreeImage.dll is available (can be in %path%).
- if (!FreeImage.IsAvailable())
- {
- Console.WriteLine("FreeImage.dll seems to be missing. Aborting.");
- return;
- }
+ NativeLibraryLoader.CopyFreeImageNativeDll();
- // Add this class to the message event
- FreeImageEngine.Message += new OutputMessageFunction(FreeImage_Message);
+ // Check if FreeImage.dll is available (can be in %path%).
+ FreeImage.ValidateAvailability();
+
+ // Add this class to the message event
+ FreeImageEngine.Message += new OutputMessageFunction(FreeImage_Message);
Sample sample = new Sample();
sample.Example();
// Remove this class from the message event
FreeImageEngine.Message -= new OutputMessageFunction(FreeImage_Message);
+
+ Console.ReadKey();
}
static void FreeImage_Message(FREE_IMAGE_FORMAT fif, string message)
diff --git a/src/Samples/Sample 03 - Allocating/Properties/AssemblyInfo.cs b/src/Samples/Sample 03 - Allocating/Properties/AssemblyInfo.cs
deleted file mode 100644
index f60e31d..0000000
--- a/src/Samples/Sample 03 - Allocating/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-[assembly: AssemblyTitle("")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-[assembly: ComVisible(false)]
-[assembly: Guid("7139f1dc-3312-4c76-aeb3-891f869409b3")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/src/Samples/Sample 03 - Allocating/Sample 03 - Allocating.2005.csproj b/src/Samples/Sample 03 - Allocating/Sample 03 - Allocating.2005.csproj
deleted file mode 100644
index 5e9fb41..0000000
--- a/src/Samples/Sample 03 - Allocating/Sample 03 - Allocating.2005.csproj
+++ /dev/null
@@ -1,91 +0,0 @@
-
-
- Debug
- AnyCPU
- 8.0.50727
- 2.0
- {A7E452A1-1A43-47C4-8BF3-DA28E1402FB9}
- Exe
- Properties
- Sample03
- Sample03
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
- false
-
-
- none
- true
- bin\Release\
- TRACE
- prompt
- 4
- false
-
-
- true
- bin\Debug\
- DEBUG;TRACE
- full
- x86
- false
- prompt
-
-
- bin\Release\
- TRACE
- true
-
-
- x86
- false
- prompt
-
-
- true
- bin\Debug\
- DEBUG;TRACE
- full
- x64
- false
- prompt
-
-
- bin\Release\
- TRACE
- true
-
-
- x64
- false
- prompt
-
-
-
-
-
-
-
-
-
-
- {6598A7CD-8F27-4D3F-A675-5AE63113A7C3}
- Library
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Samples/Sample 03 - Allocating/Sample 03 - Allocating.csproj b/src/Samples/Sample 03 - Allocating/Sample 03 - Allocating.csproj
index c6fa44d..738fa7b 100644
--- a/src/Samples/Sample 03 - Allocating/Sample 03 - Allocating.csproj
+++ b/src/Samples/Sample 03 - Allocating/Sample 03 - Allocating.csproj
@@ -1,96 +1,24 @@
-
+
+
- Debug
- AnyCPU
- 8.0.50727
- 2.0
- {A7E452A1-1A43-47C4-8BF3-DA28E1402FB9}
+ Sample03
+ netstandard2.0;net472
+
Exe
- Properties
- Sample03
+
Sample03
-
-
- 2.0
-
-
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
- false
-
-
- none
- true
- bin\Release\
- TRACE
- prompt
- 4
- false
-
-
- true
- bin\Debug\
- DEBUG;TRACE
- full
- x86
- false
- prompt
-
-
- bin\Release\
- TRACE
- true
-
-
- x86
- false
- prompt
-
-
- true
- bin\Debug\
- DEBUG;TRACE
- full
- x64
- false
- prompt
-
-
- bin\Release\
- TRACE
- true
-
-
- x64
- false
- prompt
+ Sample03
+
-
+
+
-
-
+
+
-
- {6598A7CD-8F27-4D3F-A675-5AE63113A7C3}
- Library
-
+
-
-
\ No newline at end of file
diff --git a/src/Samples/Sample 03 - Allocating/Sample 03 - Allocating.sln b/src/Samples/Sample 03 - Allocating/Sample 03 - Allocating.sln
new file mode 100644
index 0000000..a38a137
--- /dev/null
+++ b/src/Samples/Sample 03 - Allocating/Sample 03 - Allocating.sln
@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.28307.136
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample 03 - Allocating", "Sample 03 - Allocating.csproj", "{D039F3CE-4C79-43AF-BED5-9A69D561FE25}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FreeImage.Standard", "..\..\FreeImage.Standard\FreeImage.Standard.csproj", "{0A36569A-A782-42A4-BD89-3D647066ED1F}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D039F3CE-4C79-43AF-BED5-9A69D561FE25}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D039F3CE-4C79-43AF-BED5-9A69D561FE25}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D039F3CE-4C79-43AF-BED5-9A69D561FE25}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D039F3CE-4C79-43AF-BED5-9A69D561FE25}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0A36569A-A782-42A4-BD89-3D647066ED1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0A36569A-A782-42A4-BD89-3D647066ED1F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0A36569A-A782-42A4-BD89-3D647066ED1F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0A36569A-A782-42A4-BD89-3D647066ED1F}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {15505875-A851-40BB-9D41-35E5B9667999}
+ EndGlobalSection
+EndGlobal