- Fix build

- Partly revert 57718

svn path=/trunk/; revision=57719
This commit is contained in:
Johannes Anderwald 2012-11-17 16:01:29 +00:00
parent 38b84d3f65
commit 59ce999f95
4 changed files with 10 additions and 10 deletions

View file

@ -3,6 +3,6 @@ set_rc_compiler()
add_executable(doskey doskey.c doskey.rc)
set_module_type(doskey win32cui)
set_module_type(doskey win32cui UNICODE)
add_importlibs(doskey user32 msvcrt kernel32)
add_cd_file(TARGET doskey DESTINATION reactos/system32 FOR all)

View file

@ -72,19 +72,19 @@ static INT SetMacro(LPWSTR definition)
temp = *nameend;
*nameend = L'\0';
/* Don't allow spaces in the name, since such a macro would be unusable */
if (!wcschr(name, L' ') && AddConsoleAlias(name, text, pszExeName))
if (!wcschr(name, L' ') && AddConsoleAliasW(name, text, pszExeName))
return 0;
*nameend = temp;
}
LoadString(GetModuleHandle(NULL), IDS_INVALID_MACRO_DEF, szStringBuf, MAX_STRING);
LoadStringW(GetModuleHandle(NULL), IDS_INVALID_MACRO_DEF, szStringBuf, MAX_STRING);
wprintf(szStringBuf, definition);
return 1;
}
static VOID PrintMacros(LPWSTR pszExeName, LPWSTR Indent)
{
DWORD Length = GetConsoleAliasesLength(pszExeName);
DWORD Length = GetConsoleAliasesLengthW(pszExeName);
PBYTE AliasBuf;
WCHAR *Alias;
WCHAR *AliasEnd;
@ -96,7 +96,7 @@ static VOID PrintMacros(LPWSTR pszExeName, LPWSTR Indent)
Alias = (WCHAR *)AliasBuf;
AliasEnd = (WCHAR *)&AliasBuf[Length];
if (GetConsoleAliases(Alias, Length * sizeof(BYTE), pszExeName))
if (GetConsoleAliasesW(Alias, Length * sizeof(BYTE), pszExeName))
for (; Alias < AliasEnd; Alias += wcslen(Alias) + 1)
wprintf(L"%s%s\n", Indent, Alias);
@ -117,7 +117,7 @@ static VOID PrintAllMacros(VOID)
ExeName = (WCHAR *)ExeNameBuf;
ExeNameEnd = (WCHAR *)&ExeNameBuf[Length];
if (GetConsoleAliasExes(ExeName, Length * sizeof(BYTE)))
if (GetConsoleAliasExesW(ExeName, Length * sizeof(BYTE)))
{
for (; ExeName < ExeNameEnd; ExeName += wcslen(ExeName) + 1)
{
@ -199,7 +199,7 @@ wmain(VOID)
/* 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. */
pArgEnd = GetCommandLine();
pArgEnd = GetCommandLineW();
hKernel32 = LoadLibraryW(L"kernel32.dll");
/* Get function pointers */
@ -222,7 +222,7 @@ wmain(VOID)
if (!wcscmp(pArgStart, L"/?"))
{
LoadString(GetModuleHandle(NULL), IDS_HELP, szStringBuf, MAX_STRING);
LoadStringW(GetModuleHandle(NULL), IDS_HELP, szStringBuf, MAX_STRING);
wprintf(szStringBuf);
break;
}

View file

@ -41,7 +41,7 @@ add_executable(diskpart
uniqueid.c
diskpart.rc)
set_module_type(diskpart win32cui)
set_module_type(diskpart win32cui UNICODE)
add_importlibs(diskpart user32 msvcrt kernel32)
if(MSVC)
add_importlibs(diskpart ntdll)

View file

@ -31,7 +31,7 @@ ShowHeader(VOID)
DWORD comp_size = MAX_STRING_SIZE;
/* Get the name of the computer for us and change the value of comp_name */
GetComputerName(szComputerName, &comp_size);
GetComputerNameW(szComputerName, &comp_size);
/* TODO: Remove this section of code when program becomes stable enough for production use. */
wprintf(L"\n*WARNING*: This program is incomplete and may not work properly.\n");