factor/vm/main-windows.cpp

29 lines
762 B
C++
Raw Permalink Normal View History

2009-05-02 05:04:19 -04:00
#include "master.hpp"
2013-05-11 22:12:16 -04:00
VM_C_API int wmain(int argc, wchar_t** argv) {
HANDLE proc = GetCurrentProcess();
HANDLE thread = GetCurrentThread();
BOOL res = DuplicateHandle(proc, thread, proc,
&factor::boot_thread, GENERIC_ALL, FALSE, 0);
if (!res) {
factor::fatal_error("DuplicateHandle() failed", GetLastError());
return 1;
}
factor::init_mvm();
2013-05-11 22:12:16 -04:00
factor::start_standalone_factor(argc, argv);
return 0;
}
2013-05-11 22:12:16 -04:00
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow) {
(void)hInstance;
(void)hPrevInstance;
(void)lpCmdLine;
(void)nCmdShow;
2013-05-11 22:12:16 -04:00
int argc;
wchar_t** argv = CommandLineToArgvW(GetCommandLine(), &argc);
wmain(argc, argv);
2009-05-02 05:04:19 -04:00
2013-05-11 22:12:16 -04:00
return 0;
2009-05-02 05:04:19 -04:00
}