factor/vm/main-windows-nt.cpp

31 lines
594 B
C++
Raw Normal View History

2009-05-02 05:04:19 -04:00
#include "master.hpp"
int WINAPI WinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
LPWSTR *szArglist;
int nArgs;
szArglist = CommandLineToArgvW(GetCommandLineW(), &nArgs);
if(NULL == szArglist)
{
puts("CommandLineToArgvW failed");
return 1;
}
2009-08-28 16:46:47 -04:00
factor::init_globals();
#ifdef FACTOR_MULTITHREADED
factor::THREADHANDLE thread = factor::start_standalone_factor_in_new_thread(nArgs,szArglist);
WaitForSingleObject(thread, INFINITE);
#else
2009-05-04 02:46:13 -04:00
factor::start_standalone_factor(nArgs,szArglist);
#endif
2009-05-02 05:04:19 -04:00
LocalFree(szArglist);
return 0;
}