* msvc compatibility fixes for doskey.

svn path=/branches/cmake-bringup/; revision=51441
This commit is contained in:
Sylvain Petreolle 2011-04-23 20:05:19 +00:00
parent aa3f41345e
commit 265463422d

View file

@ -191,13 +191,16 @@ static LPWSTR RemoveQuotes(LPWSTR str)
int int
wmain(VOID) wmain(VOID)
{ {
WCHAR *pArgStart;
WCHAR *pArgEnd;
HMODULE hKernel32;
setlocale(LC_ALL, ""); setlocale(LC_ALL, "");
/* Get the full command line using GetCommandLine(). We can't just use argv, /* Get the full command line using GetCommandLine(). We can't just use argv,
* because then a parameter like "gotoroot=cd \" wouldn't be passed completely. */ * because then a parameter like "gotoroot=cd \" wouldn't be passed completely. */
WCHAR *pArgStart; pArgEnd = GetCommandLine();
WCHAR *pArgEnd = GetCommandLine(); hKernel32 = LoadLibraryW(L"kernel32.dll");
HMODULE hKernel32 = LoadLibraryW(L"kernel32.dll");
/* Get function pointers */ /* Get function pointers */
pGetConsoleCommandHistoryW = (GetConsoleCommandHistoryW_t)GetProcAddress( hKernel32, "GetConsoleCommandHistoryW"); pGetConsoleCommandHistoryW = (GetConsoleCommandHistoryW_t)GetProcAddress( hKernel32, "GetConsoleCommandHistoryW");