mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
[CMAKE]
* msvc compatibility fixes for doskey. svn path=/branches/cmake-bringup/; revision=51441
This commit is contained in:
parent
aa3f41345e
commit
265463422d
1 changed files with 9 additions and 6 deletions
|
@ -10,7 +10,7 @@ WCHAR szStringBuf[MAX_STRING];
|
||||||
LPWSTR pszExeName = L"cmd.exe";
|
LPWSTR pszExeName = L"cmd.exe";
|
||||||
|
|
||||||
/* Function pointers */
|
/* Function pointers */
|
||||||
typedef DWORD (WINAPI *GetConsoleCommandHistoryW_t) (LPWSTR sCommands, DWORD nBufferLength, LPWSTR sExeName);
|
typedef DWORD (WINAPI *GetConsoleCommandHistoryW_t) (LPWSTR sCommands, DWORD nBufferLength, LPWSTR sExeName);
|
||||||
typedef DWORD (WINAPI *GetConsoleCommandHistoryLengthW_t) (LPWSTR sExeName);
|
typedef DWORD (WINAPI *GetConsoleCommandHistoryLengthW_t) (LPWSTR sExeName);
|
||||||
typedef BOOL (WINAPI *SetConsoleNumberOfCommandsW_t)(DWORD nNumber, LPWSTR sExeName);
|
typedef BOOL (WINAPI *SetConsoleNumberOfCommandsW_t)(DWORD nNumber, LPWSTR sExeName);
|
||||||
typedef VOID (WINAPI *ExpungeConsoleCommandHistoryW_t)(LPWSTR sExeName);
|
typedef VOID (WINAPI *ExpungeConsoleCommandHistoryW_t)(LPWSTR sExeName);
|
||||||
|
@ -142,7 +142,7 @@ static VOID ReadFromFile(LPWSTR param)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
while ( fgetws(line, MAX_PATH, fp) != NULL)
|
while ( fgetws(line, MAX_PATH, fp) != NULL)
|
||||||
{
|
{
|
||||||
/* Remove newline character */
|
/* Remove newline character */
|
||||||
WCHAR *end = &line[wcslen(line) - 1];
|
WCHAR *end = &line[wcslen(line) - 1];
|
||||||
|
@ -191,13 +191,16 @@ static LPWSTR RemoveQuotes(LPWSTR str)
|
||||||
int
|
int
|
||||||
wmain(VOID)
|
wmain(VOID)
|
||||||
{
|
{
|
||||||
setlocale(LC_ALL, "");
|
WCHAR *pArgStart;
|
||||||
|
WCHAR *pArgEnd;
|
||||||
|
HMODULE hKernel32;
|
||||||
|
|
||||||
|
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");
|
||||||
|
|
Loading…
Reference in a new issue