AdditionalLibraryDirectories=""$(QTDIR)\lib";"$(QTDIR)\plugins\imageformats";"$(SolutionDir)\etc\Prerequisites\VisualLeakDetector\lib\Win32""
GenerateDebugInformation="true"
SubSystem="2"
+ EntryPointSymbol="lamexp_entry_point"
TargetMachine="1"
/>
<Tool
OptimizeReferences="2"
EnableCOMDATFolding="2"
LinkTimeCodeGeneration="1"
+ EntryPointSymbol="lamexp_entry_point"
SetChecksum="true"
TargetMachine="1"
/>
OptimizeReferences="2"
EnableCOMDATFolding="2"
LinkTimeCodeGeneration="1"
+ EntryPointSymbol="lamexp_entry_point"
SetChecksum="true"
TargetMachine="1"
/>
<Tool
Name="VCCustomBuildTool"
Description="MOC "$(SolutionDir)tmp\MOC_$(SafeInputName).cpp""
- CommandLine=""$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\MOC_$(SafeInputName).cpp" "$(InputPath)""
+ CommandLine=""$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\MOC_$(SafeInputName).cpp" "$(InputPath)"
"
Outputs=""$(SolutionDir)tmp\MOC_$(SafeInputName).cpp""
/>
</FileConfiguration>
<Tool
Name="VCCustomBuildTool"
Description="MOC "$(SolutionDir)tmp\MOC_$(SafeInputName).cpp""
- CommandLine=""$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\MOC_$(SafeInputName).cpp" "$(InputPath)""
+ CommandLine=""$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\MOC_$(SafeInputName).cpp" "$(InputPath)"
"
Outputs=""$(SolutionDir)tmp\MOC_$(SafeInputName).cpp""
/>
</FileConfiguration>
<Tool
Name="VCCustomBuildTool"
Description="MOC "$(SolutionDir)tmp\MOC_$(SafeInputName).cpp""
- CommandLine=""$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\MOC_$(SafeInputName).cpp" "$(InputPath)""
+ CommandLine=""$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\MOC_$(SafeInputName).cpp" "$(InputPath)"
"
Outputs=""$(SolutionDir)tmp\MOC_$(SafeInputName).cpp""
/>
</FileConfiguration>
#define VER_LAMEXP_MINOR_LO 5
#define VER_LAMEXP_TYPE Beta
#define VER_LAMEXP_PATCH 4
-#define VER_LAMEXP_BUILD 1089
+#define VER_LAMEXP_BUILD 1090
///////////////////////////////////////////////////////////////////////////////
// Tool versions (minimum expected versions!)
}
/*
+ * Entry point checks
+ */
+static bool lamexp_entry_check(void);
+static bool g_lamexp_entry_check = false;
+static bool g_lamexp_entry_check_result = lamexp_entry_check();
+static bool lamexp_entry_check(void)
+{
+ if(!g_lamexp_entry_check)
+ {
+ FatalAppExit(0, L"Application initialization has failed!");
+ TerminateProcess(GetCurrentProcess(), -1);
+ }
+ return true;
+}
+
+/*
* Application entry point (runs before static initializers)
*/
extern "C"
int lamexp_entry_point(void)
{
+ /*MessageBoxA(NULL, "lamexp_entry_point", NULL, MB_TOPMOST);*/
+
if((!LAMEXP_DEBUG) && lamexp_check_for_debugger())
{
FatalAppExit(0, L"Not a debug build. Please unload debugger and try again!");
TerminateProcess(GetCurrentProcess(), -1);
}
- //Init global structs to NULL *before* constructors are called
+ //Zero *before* constructors are called
LAMEXP_ZERO_MEMORY(g_lamexp_argv);
LAMEXP_ZERO_MEMORY(g_lamexp_tools);
LAMEXP_ZERO_MEMORY(g_lamexp_currentTranslator);
LAMEXP_ZERO_MEMORY(g_lamexp_folder);
LAMEXP_ZERO_MEMORY(g_lamexp_ipc_ptr);
+ //Make sure we will pass the check
+ g_lamexp_entry_check = true;
+
+ //Now initialize the C Runtime library!
return WinMainCRTStartup();
}
}
//Memory check
#if LAMEXP_DEBUG
-#define LAMEXP_MEMORY_CHECK(FUNC, RETV, ...) \
+#define LAMEXP_MEMORY_CHECK(FUNC, RETV, ...) do \
{ \
SIZE_T _privateBytesBefore = lamexp_dbg_private_bytes(); \
RETV = FUNC(__VA_ARGS__); \
OutputDebugStringA(_buffer); \
OutputDebugStringA("----------\n"); \
} \
-}
+} \
+while(0)
#else
-#define LAMEXP_MEMORY_CHECK(FUNC, RETV, ...) \
+#define LAMEXP_MEMORY_CHECK(FUNC, RETV, ...) do \
{ \
RETV = __noop(__VA_ARGS__); \
-}
+} \
+while(0)
#endif
//Check for CPU-compatibility options