1 /* vi:set ts=8 sts=4 sw=4 noet: 2 * 3 * VIM - Vi IMproved by Bram Moolenaar 4 * GUI support by Robert Webb 5 * 6 * Do ":help uganda" in Vim to read copying and usage conditions. 7 * Do ":help credits" in Vim to see a list of people who contributed. 8 * See README.txt for an overview of the Vim source code. 9 */ 10 /* 11 * Windows GUI: main program (EXE) entry point: 12 * 13 * Ron Aaron <[email protected]> wrote this and the (now deleted) DLL support 14 * code. 15 */ 16 #include "vim.h" 17 18 // cproto doesn't create a prototype for VimMain() 19 #ifdef VIMDLL 20 __declspec(dllimport) 21 #endif 22 int VimMain(int argc, char **argv); 23 #ifndef VIMDLL 24 void SaveInst(HINSTANCE hInst); 25 #endif 26 27 #ifndef PROTO 28 # ifdef FEAT_GUI 29 int WINAPI wWinMain(HINSTANCE hInstance,HINSTANCE hPrevInst UNUSED,LPWSTR lpszCmdLine UNUSED,int nCmdShow UNUSED)30wWinMain( 31 HINSTANCE hInstance, 32 HINSTANCE hPrevInst UNUSED, 33 LPWSTR lpszCmdLine UNUSED, 34 int nCmdShow UNUSED) 35 # else 36 int 37 wmain(int argc UNUSED, wchar_t **argv UNUSED) 38 # endif 39 { 40 # ifndef VIMDLL 41 # ifdef FEAT_GUI 42 SaveInst(hInstance); 43 # else 44 SaveInst(GetModuleHandleW(NULL)); 45 # endif 46 # endif 47 VimMain(0, NULL); 48 49 return 0; 50 } 51 #endif 52