]> git.tdb.fi Git - libs/core.git/commitdiff
WinMain for Win32
authorNiko Liikanen <cloud@neo-midgar.com>
Thu, 24 Aug 2006 20:41:28 +0000 (20:41 +0000)
committerNiko Liikanen <cloud@neo-midgar.com>
Thu, 24 Aug 2006 20:41:28 +0000 (20:41 +0000)
source/main.cpp

index 7b1b11e91e62aaffdef49ce64ce952291de3ca21..4b187c3ed244b35491658ee66ee14aeb08419cc0 100644 (file)
@@ -3,7 +3,20 @@ This file is part of libmspframework
 Copyright © 2006 Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 Copyright © 2006 Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
+#ifdef WIN32
+#include <windows.h>
+#endif
+
 #include "application.h"
 
 #include "application.h"
 
+#ifdef WIN32
+int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
+{ 
+       int argc        = 0;
+       LPWSTR *argv    = CommandLineToArgvW(GetCommandLineW(), &argc);
+       return Msp::Application::run(argc, (char **)argv);
+}
+#endif
+
 int main(int argc, char **argv)
 { return Msp::Application::run(argc, argv); }
 int main(int argc, char **argv)
 { return Msp::Application::run(argc, argv); }