mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +00:00
[DISKPART] Fix build. Simplify PrintMessageString().
This commit is contained in:
parent
c287c08b27
commit
ee613a18eb
2 changed files with 9 additions and 18 deletions
|
@ -46,6 +46,10 @@ list(APPEND SOURCE
|
||||||
diskpart.h)
|
diskpart.h)
|
||||||
|
|
||||||
add_executable(diskpart ${SOURCE} diskpart.rc)
|
add_executable(diskpart ${SOURCE} diskpart.rc)
|
||||||
|
add_pch(diskpart diskpart.h SOURCE)
|
||||||
|
add_message_headers(UNICODE diskpart_msg.mc)
|
||||||
|
add_dependencies(diskpart diskpart_msg)
|
||||||
|
|
||||||
set_module_type(diskpart win32cui UNICODE)
|
set_module_type(diskpart win32cui UNICODE)
|
||||||
target_link_libraries(diskpart conutils ${PSEH_LIB})
|
target_link_libraries(diskpart conutils ${PSEH_LIB})
|
||||||
add_importlibs(diskpart advapi32 msvcrt kernel32 ntdll)
|
add_importlibs(diskpart advapi32 msvcrt kernel32 ntdll)
|
||||||
|
@ -54,6 +58,4 @@ if(MSVC)
|
||||||
add_importlibs(diskpart ntdll)
|
add_importlibs(diskpart ntdll)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_pch(diskpart diskpart.h SOURCE)
|
|
||||||
add_message_headers(UNICODE diskpart_msg.mc)
|
|
||||||
add_cd_file(TARGET diskpart DESTINATION reactos/system32 FOR all)
|
add_cd_file(TARGET diskpart DESTINATION reactos/system32 FOR all)
|
||||||
|
|
|
@ -84,20 +84,9 @@ VOID
|
||||||
PrintMessageString(
|
PrintMessageString(
|
||||||
_In_ DWORD dwMessage)
|
_In_ DWORD dwMessage)
|
||||||
{
|
{
|
||||||
PWSTR pBuffer;
|
ConMsgPuts(StdOut,
|
||||||
|
FORMAT_MESSAGE_FROM_HMODULE,
|
||||||
FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_HMODULE |
|
|
||||||
FORMAT_MESSAGE_IGNORE_INSERTS,
|
|
||||||
NULL, //hModuleNetMsg,
|
NULL, //hModuleNetMsg,
|
||||||
dwMessage,
|
dwMessage,
|
||||||
LANG_USER_DEFAULT,
|
LANG_USER_DEFAULT);
|
||||||
(LPWSTR)&pBuffer,
|
|
||||||
0,
|
|
||||||
NULL);
|
|
||||||
if (pBuffer)
|
|
||||||
{
|
|
||||||
ConPuts(StdOut, pBuffer);
|
|
||||||
LocalFree(pBuffer);
|
|
||||||
pBuffer = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue