From 16b096ae36c034b59534f2fff8d5ab4545aa6dab Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 23 Mar 2015 11:58:02 +0000 Subject: [PATCH] EgtMachKernel 1.6c6 : - primo commit. --- DllMain.h | 22 ++++ EMkDllMain.cpp | 109 ++++++++++++++++ EgtMachKernel.rc | Bin 0 -> 11774 bytes EgtMachKernel.sln | 28 +++++ EgtMachKernel.vcxproj | 227 ++++++++++++++++++++++++++++++++++ EgtMachKernel.vcxproj.filters | 50 ++++++++ resource.h | Bin 0 -> 910 bytes stdafx.cpp | 7 ++ stdafx.h | 34 +++++ 9 files changed, 477 insertions(+) create mode 100644 DllMain.h create mode 100644 EMkDllMain.cpp create mode 100644 EgtMachKernel.rc create mode 100644 EgtMachKernel.sln create mode 100644 EgtMachKernel.vcxproj create mode 100644 EgtMachKernel.vcxproj.filters create mode 100644 resource.h create mode 100644 stdafx.cpp create mode 100644 stdafx.h 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 0000000000000000000000000000000000000000..5763545876c68d4cbd0bfc939a376f833c7c4d05 GIT binary patch literal 11774 zcmeI2T~F&q5QgWvQvZV+deNh{K;RUqmq0=qH4sET)JjO`oI{{UX@W>li`3uV_IbUT z#C9AY0ig(4k+b%Cc6Roi*_mDM{P*vcZCPZ;c4J@c&W1MPy0S5KUFt@5Z=bBs)1iIO zFS2Xv*?{Yg`Z47tb$66%chB7y?jxSW?Z$4Q*|e|iD|*?A%MEG=yzN7M8Pk^L+Hcw) zR*I?BawDd@irb0zzMWdj+Saj()vak4c4k#-E8L%0!+xix#s9G#P}AVv`)@{#-_S0N|N0^35(VqH z2P;|972{sbHXM29yI!SB7opt&^RJJlM%X}P-=XsXPd*P@+=W>=vJW{{FiOm+n;5Te zQgiDPj{A0mRfRd#V*YfPU5E61fps9Ij>i#OTJN7 z9IRP>QvOvs$$C7^`7YY|6(lQ<=tNqpg5)ky_i@r@#}>;$IaiHj+kTEm^qK##Zg5&JALr;)UG%6p zDhx{Wpm=+WM;+J$7XFE+9`*81C1|dx>0>iJRx|R(BUU=tdw&aOdgJk{6y8^zDV*mv$=H)Z?De#A?Ly9gv7!1498+?>cH z-3bHNx}LIjHO8X^Z6^__#9n+8f70i-3_hpyJ*3?|nj6odKR-tAeUYuL-uGixmCsdc zh|0uYhWRsJqm{zUBXq&;Zi=sLZ&?qM_5*FW$p?%;U8}3)yp+EW{zvnp9NUk_iLA6U zxi_%aq@SL}ir0+&!tHHif4aw~Vs;VxwMNOt@*?&Zu|Mr&O4Det$R9_nVYLS6;h(gg zF5>@tjQ?jv{KvAjCd;k}iuj-RJ;wK&d#q62cJCj0EaHE$_xD|TvG*_b{>9$^C3}DQ z)MD>n#Qx`f_xGLn+r|ELk45Y+Vt*0)J?49v{;ud>fM5FEzu5b~|8M_ioVXP6|NZX$ zXXgR#E0jadzHG% zptUIXPVe(`4f3-b&!-s+vz?82D2H#AKJv0FOE#a|SF&?XHP5l(^r@@rJ%=JK(e8>8 zE!$7>Y&7i)pJQ#pZZQX+tIN&a^|IQeG#YL43bRuu%Zsuh(|KcRo8-4%_b#26FU^aU f1!w(pIxp6-TrV7w(n!L^_B|lWLz&ypohknV@+`Yr literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..e1723434874bfba93797150920ea08482655c63f GIT binary patch literal 910 zcmb7@T}#7Y4293N;D0FWQgBZE19Pn~wsq3FqE}^K)ydePUHw4(>*|xYn`|J(5#GK@ znw*>@?e|wxO?@DthDzlt&@Cr)TBwe?Sg}5lQ=Jgol&66fnkv^?1t-%6UxKetsj-$= z9i1Vb9yQmBljGlT&+skqOo=M7=GYmYCEEF3g%Ma)^hEE(1R!mwJ0|lKOGcS%-` zZ^zBft8C0-I!nNa(7N;)Vt0Aoptp#qmrIAftKgA0*PH9v_-Ak`;cqi|aov}A z3#^RU!9@Ry+yQlf vw5jIT;(EFQ+2lC%kPaf(Zyjq7)Z?(LN!l*zacw&LGqJy6=5}4p=+OQFo3VgU literal 0 HcmV?d00001 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")