From ee0f34083d99c81ac1393bc1fddadfdadb201a38 Mon Sep 17 00:00:00 2001 From: Niko Liikanen Date: Thu, 24 Aug 2006 20:41:28 +0000 Subject: [PATCH] WinMain for Win32 --- source/main.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/main.cpp b/source/main.cpp index 7b1b11e..4b187c3 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -3,7 +3,20 @@ This file is part of libmspframework Copyright © 2006 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ +#ifdef WIN32 +#include +#endif + #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); } -- 2.43.0