X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fmain.cpp;h=4b187c3ed244b35491658ee66ee14aeb08419cc0;hp=7b1b11e91e62aaffdef49ce64ce952291de3ca21;hb=ee0f34083d99c81ac1393bc1fddadfdadb201a38;hpb=53098601859a2ec9d70870735a805a1dcde17490 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); }