diff --git a/DllMain.h b/DllMain.h new file mode 100644 index 0000000..da69e77 --- /dev/null +++ b/DllMain.h @@ -0,0 +1,22 @@ +//---------------------------------------------------------------------------- +// EgalTech 2015-2015 +//---------------------------------------------------------------------------- +// File : DllMain.h Data : 22.03.15 Versione : 1.6c6 +// Contenuto : Prototipi funzioni per uso locale della DLL. +// +// +// +// Modifiche : 22.03.15 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + + +#include "/EgtDev/Include/EgtILogger.h" +#include + +//----------------------------------------------------------------------------- +ILogger* GetEMkLogger( void) ; +const std::string& GetEMkKey( void) ; diff --git a/EMkDllMain.cpp b/EMkDllMain.cpp new file mode 100644 index 0000000..009a9f0 --- /dev/null +++ b/EMkDllMain.cpp @@ -0,0 +1,109 @@ +//---------------------------------------------------------------------------- +// EgalTech 2015-2015 +//---------------------------------------------------------------------------- +// File : EMkDllMain.cpp Data : 22.03.15 Versione : 1.6c6 +// Contenuto : Inizializzazione della DLL. +// +// +// +// Modifiche : 22.03.15 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +//--------------------------- Include ---------------------------------------- +#include "stdafx.h" +#include "DllMain.h" +#include "\EgtDev\Include\EMkDllMain.h" +#include "\EgtDev\Include\EgnGetModuleVer.h" +#include "\EgtDev\Include\EgtTrace.h" + +//--------------------------- Costanti ---------------------------------------- +#if defined( _WIN64) + #if defined( _DEBUG) + const char* EMK_STR = "EgtMachKernelD64.dll ver. " ; + #else + const char* EMK_STR = "EgtMachKernelR64.dll ver. " ; + #endif +#elif defined( _WIN32) + #if defined( _DEBUG) + const char* EMK_STR = "EgtMachKernelD32.dll ver. " ; + #else + const char* EMK_STR = "EgtMachKernelR32.dll ver. " ; + #endif +#endif +const int STR_DIM = 40 ; + +//----------------------------------------------------------------------------- +static HINSTANCE s_hModule = NULL ; +static char s_szEMkNameVer[STR_DIM] ; + +//----------------------------------------------------------------------------- +extern "C" int APIENTRY +DllMain( HMODULE hModule, DWORD dwReason, LPVOID lpReserved) +{ + + if ( dwReason == DLL_PROCESS_ATTACH) { + // Controllo commentato per problemi con VB.NET + //#if defined( NDEBUG) + // BOOL IsDbgPresent = FALSE ; + // CheckRemoteDebuggerPresent( GetCurrentProcess(), &IsDbgPresent) ; + // if ( IsDbgPresent) + // return 0 ; + //#endif + s_hModule = hModule ; + EGT_TRACE( "EgtMachKernel.dll Initializing!\n") ; + } + else if ( dwReason == DLL_PROCESS_DETACH) { + s_hModule = NULL ; + EGT_TRACE( "EgtMachKernel.dll Terminating!\n") ; + } + + return 1 ; +} + +//----------------------------------------------------------------------------- +const char* +GetEMkVersion( void) +{ + std::string sVer ; + + GetModuleVersion( s_hModule, sVer) ; + sprintf_s( s_szEMkNameVer, STR_DIM, "%s%s", EMK_STR, sVer.c_str()) ; + + return s_szEMkNameVer ; +} + +//----------------------------------------------------------------------------- +static ILogger* s_pLogger = nullptr ; + +//----------------------------------------------------------------------------- +void +SetEMkLogger( ILogger* pLogger) +{ + s_pLogger = pLogger ; +} + +//----------------------------------------------------------------------------- +ILogger* +GetEMkLogger( void) +{ + return s_pLogger ; +} + +//----------------------------------------------------------------------------- +static std::string s_sKey ; + +//----------------------------------------------------------------------------- +void +SetEMkKey( const std::string& sKey) +{ + s_sKey = sKey ; +} + +//----------------------------------------------------------------------------- +const std::string& +GetEMkKey( void) +{ + return s_sKey ; +} diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc new file mode 100644 index 0000000..5763545 Binary files /dev/null and b/EgtMachKernel.rc differ diff --git a/EgtMachKernel.sln b/EgtMachKernel.sln new file mode 100644 index 0000000..b04e54a --- /dev/null +++ b/EgtMachKernel.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.31101.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EgtMachKernel", "EgtMachKernel.vcxproj", "{0BD58222-92F3-48B2-B656-4497D1956874}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0BD58222-92F3-48B2-B656-4497D1956874}.Debug|Win32.ActiveCfg = Debug|Win32 + {0BD58222-92F3-48B2-B656-4497D1956874}.Debug|Win32.Build.0 = Debug|Win32 + {0BD58222-92F3-48B2-B656-4497D1956874}.Debug|x64.ActiveCfg = Debug|x64 + {0BD58222-92F3-48B2-B656-4497D1956874}.Debug|x64.Build.0 = Debug|x64 + {0BD58222-92F3-48B2-B656-4497D1956874}.Release|Win32.ActiveCfg = Release|Win32 + {0BD58222-92F3-48B2-B656-4497D1956874}.Release|Win32.Build.0 = Release|Win32 + {0BD58222-92F3-48B2-B656-4497D1956874}.Release|x64.ActiveCfg = Release|x64 + {0BD58222-92F3-48B2-B656-4497D1956874}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/EgtMachKernel.vcxproj b/EgtMachKernel.vcxproj new file mode 100644 index 0000000..951a905 --- /dev/null +++ b/EgtMachKernel.vcxproj @@ -0,0 +1,227 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {0BD58222-92F3-48B2-B656-4497D1956874} + EgtMachKernel + + + + DynamicLibrary + true + v120_xp + Unicode + + + DynamicLibrary + true + v120_xp + Unicode + + + DynamicLibrary + false + v120_xp + true + Unicode + + + DynamicLibrary + false + v120_xp + true + Unicode + + + + + + + + + + + + + + + + + + + $(SolutionDir)$(Configuration)$(PlatformArchitecture)\ + $(Configuration)$(PlatformArchitecture)\ + $(ProjectName)D$(PlatformArchitecture) + .dll + C:\;$(IncludePath) + + + $(ProjectName)D$(PlatformArchitecture) + .dll + C:\;$(IncludePath) + $(Configuration)$(PlatformArchitecture)\ + $(SolutionDir)$(Configuration)$(PlatformArchitecture)\ + + + $(SolutionDir)$(Configuration)$(PlatformArchitecture)\ + $(Configuration)$(PlatformArchitecture)\ + $(ProjectName)R$(PlatformArchitecture) + .dll + C:\;$(IncludePath) + + + $(ProjectName)R$(PlatformArchitecture) + .dll + C:\;$(IncludePath) + $(Configuration)$(PlatformArchitecture)\ + $(SolutionDir)$(Configuration)$(PlatformArchitecture)\ + + + + Level3 + Disabled + ProgramDatabase + true + WIN32;_WINDOWS;I_AM_EMK;_DEBUG;%(PreprocessorDefinitions) + false + true + Use + CompileAsCpp + + + true + Windows + + + copy $(TargetDir)$(TargetName).pdb \EgtDev\Lib\ +copy $(TargetDir)$(TargetName).lib \EgtDev\Lib\ +copy $(TargetPath) \EgtProg\DllD32 + + + _DEBUG;_DEB32;%(PreprocessorDefinitions) + + + + + Level3 + Disabled + ProgramDatabase + true + WIN32;_WINDOWS;I_AM_EMK;_DEBUG;%(PreprocessorDefinitions) + false + true + Use + CompileAsCpp + + + true + Windows + + + copy $(TargetDir)$(TargetName).pdb \EgtDev\Lib\ +copy $(TargetDir)$(TargetName).lib \EgtDev\Lib\ +copy $(TargetPath) \EgtProg\DllD64 + + + _DEBUG;_DEB64;%(PreprocessorDefinitions) + + + + + Level3 + MaxSpeed + true + true + true + AnySuitable + Speed + true + WIN32;_WINDOWS;I_AM_EMK;NDEBUG;%(PreprocessorDefinitions) + StreamingSIMDExtensions2 + true + Use + CompileAsCpp + + + false + true + true + Windows + + + copy $(TargetDir)$(TargetName).lib \EgtDev\Lib\ +copy $(TargetPath) \EgtProg\Dll32 + + + NDEBUG;NDEB32;%(PreprocessorDefinitions) + + + + + Level3 + MaxSpeed + true + true + true + AnySuitable + Speed + true + WIN32;_WINDOWS;I_AM_EMK;NDEBUG;%(PreprocessorDefinitions) + NotSet + true + Use + CompileAsCpp + + + false + true + true + Windows + + + copy $(TargetDir)$(TargetName).lib \EgtDev\Lib\ +copy $(TargetPath) \EgtProg\Dll64 + + + NDEBUG;NDEB64;%(PreprocessorDefinitions) + + + + + + Create + Create + Create + Create + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/EgtMachKernel.vcxproj.filters b/EgtMachKernel.vcxproj.filters new file mode 100644 index 0000000..62b306b --- /dev/null +++ b/EgtMachKernel.vcxproj.filters @@ -0,0 +1,50 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {efcf308f-d547-4a97-971a-ec235271e133} + + + {eeca69bf-68be-4047-9083-bd9ef0d9f977} + + + + + Source Files\General + + + Source Files\General + + + + + Header Files + + + Header Files + + + Header Files\Include + + + Header Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/resource.h b/resource.h new file mode 100644 index 0000000..e172343 Binary files /dev/null and b/resource.h differ diff --git a/stdafx.cpp b/stdafx.cpp new file mode 100644 index 0000000..6826075 --- /dev/null +++ b/stdafx.cpp @@ -0,0 +1,7 @@ +// stdafx.cpp : file di origine che include solo le inclusioni standard +// EgtGeometry.pch sarà l'intestazione precompilata +// stdafx.obj conterrà le informazioni sui tipi precompilati + +#include "stdafx.h" + + diff --git a/stdafx.h b/stdafx.h new file mode 100644 index 0000000..993c811 --- /dev/null +++ b/stdafx.h @@ -0,0 +1,34 @@ +// stdafx.h : file di inclusione per file di inclusione di sistema standard +// o file di inclusione specifici del progetto utilizzati di frequente, ma +// modificati raramente +// + +#pragma once + +#include "/EgtDev/Include/EgtTargetVer.h" + +#include +#include +#include +#include + +// in Debug riconoscimento memory leakage +#if defined( _DEBUG) + #define _CRTDBG_MAP_ALLOC + #include + #include +#endif + +// in Debug controllo iteratori +#if defined( _DEBUG) + #define _SECURE_SCL 1 +#else + #define _SECURE_SCL 0 +#endif + +#include "/EgtDev/Include/EgtLibVer.h" + +#pragma comment(lib, EGTLIBDIR "EgtGeneral" EGTLIBVER ".lib") +#pragma comment(lib, EGTLIBDIR "EgtNumKernel" EGTLIBVER ".lib") +#pragma comment(lib, EGTLIBDIR "EgtGeomKernel" EGTLIBVER ".lib") +#pragma comment(lib, EGTLIBDIR "SEgtLock" EGTLIBVER ".lib")