1c2c66affSColin Finck #include <stdarg.h> 2c2c66affSColin Finck #include <windef.h> 3c2c66affSColin Finck #include <winbase.h> 4c2c66affSColin Finck 5c2c66affSColin Finck typedef int WINAPI DOWINMAIN(HMODULE hMod, LPSTR cmdline); 6c2c66affSColin Finck 7c2c66affSColin Finck int WINAPI WinMain(HINSTANCE hInst,HINSTANCE hPrevInst,LPSTR cmdline,int cmdshow)8c2c66affSColin FinckWinMain(HINSTANCE hInst, 9c2c66affSColin Finck HINSTANCE hPrevInst, 10c2c66affSColin Finck LPSTR cmdline, 11c2c66affSColin Finck int cmdshow) 12c2c66affSColin Finck { 13c2c66affSColin Finck HMODULE hModule; 14c2c66affSColin Finck DOWINMAIN *doWinMain; 15c2c66affSColin Finck int ret = -1; 16c2c66affSColin Finck 17c2c66affSColin Finck hModule = LoadLibraryA("hhctrl.ocx"); 18*9ea22229SThamatip Chitpong if (hModule) 19*9ea22229SThamatip Chitpong { 20c2c66affSColin Finck doWinMain = (DOWINMAIN*)GetProcAddress(hModule, "doWinMain"); 21*9ea22229SThamatip Chitpong if (doWinMain) 22c2c66affSColin Finck ret = doWinMain(hInst, cmdline); 23c2c66affSColin Finck 24c2c66affSColin Finck FreeLibrary(hModule); 25*9ea22229SThamatip Chitpong } 26c2c66affSColin Finck 27c2c66affSColin Finck return ret; 28c2c66affSColin Finck } 29