module winsamp3; import std.c.windows.windows; import core.runtime; import std.string; import Win32SDK; extern (Windows) int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { try { Runtime.initialize(); runModuleUnitTests(); WinClass winClass=new WinClass(hInstance); WinFrame frame=new WinFrame(winClass); frame.setTitle("Give me a caption"); WinApp app=new WinApp(hInstance,frame.getHWND,nCmdShow); return app.Run; } catch (Object o) { MessageBoxA(null, toStringz(o.toString()), "Fatal Internal Error", MB_OK | MB_ICONEXCLAMATION); return 0; } finally { Runtime.terminate(); } }