From 648e14b6f78ba4100347dc8679e1c0f8e4846cb6 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Sun, 23 Dec 2012 17:00:14 +0200 Subject: [PATCH] Additional change to 24ef81d --- Application/Application.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Application/Application.cpp b/Application/Application.cpp index 6d328054..7cc4020b 100644 --- a/Application/Application.cpp +++ b/Application/Application.cpp @@ -46,7 +46,7 @@ HINSTANCE LoadRainmeterLibrary() WCHAR* GetCommandLineArguments() { - LPWSTR args = GetCommandLine(); + WCHAR* args = GetCommandLine(); // Skip past (quoted) application path in cmdLine. if (*args == L'"') @@ -79,11 +79,7 @@ WCHAR* GetCommandLineArguments() ** Entry point. In Release builds, the entry point is Main() since the CRT is not used. ** */ -#ifdef _DEBUG int APIENTRY wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int) -#else -EXTERN_C int WINAPI Main() -#endif { _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); //_CrtSetBreakAlloc(000); @@ -142,4 +138,13 @@ EXTERN_C int WINAPI Main() } return 1; -} \ No newline at end of file +} + +#ifndef _DEBUG +EXTERN_C int WINAPI Main() +{ + int result = wWinMain(NULL, NULL, NULL, 0); + TerminateProcess(GetCurrentProcess(), result); + return 0; // Never reached. +} +#endif