patch 8.1.1104: MS-Windows: not all environment variables can be used

Problem:    MS-Windows: not all environment variables can be used.
Solution:   Use the wide version of WinMain() and main(). (Ken Takata,
            closes #4206)
This commit is contained in:
Bram Moolenaar
2019-04-03 20:31:00 +02:00
parent 0eb035c974
commit 796cc42d3a
6 changed files with 24 additions and 18 deletions

View File

@ -28,20 +28,22 @@ void _cdecl SaveInst(HINSTANCE hInst);
#endif
#ifndef PROTO
# ifdef FEAT_GUI
int WINAPI
WinMain(
wWinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInst UNUSED,
LPSTR lpszCmdLine UNUSED,
LPWSTR lpszCmdLine UNUSED,
int nCmdShow UNUSED)
# else
int
wmain(int argc UNUSED, wchar_t **argv UNUSED)
# endif
{
int argc = 0;
char **argv = NULL;
# ifdef FEAT_GUI
SaveInst(hInstance);
# endif
VimMain(argc, argv);
VimMain(0, NULL);
return 0;
}