mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +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)
|
||||
|
||||
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)
|
||||
target_link_libraries(diskpart conutils ${PSEH_LIB})
|
||||
add_importlibs(diskpart advapi32 msvcrt kernel32 ntdll)
|
||||
|
@ -54,6 +58,4 @@ if(MSVC)
|
|||
add_importlibs(diskpart ntdll)
|
||||
endif()
|
||||
|
||||
add_pch(diskpart diskpart.h SOURCE)
|
||||
add_message_headers(UNICODE diskpart_msg.mc)
|
||||
add_cd_file(TARGET diskpart DESTINATION reactos/system32 FOR all)
|
||||
|
|
|
@ -84,20 +84,9 @@ VOID
|
|||
PrintMessageString(
|
||||
_In_ DWORD dwMessage)
|
||||
{
|
||||
PWSTR pBuffer;
|
||||
|
||||
FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_HMODULE |
|
||||
FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||
NULL, //hModuleNetMsg,
|
||||
dwMessage,
|
||||
LANG_USER_DEFAULT,
|
||||
(LPWSTR)&pBuffer,
|
||||
0,
|
||||
NULL);
|
||||
if (pBuffer)
|
||||
{
|
||||
ConPuts(StdOut, pBuffer);
|
||||
LocalFree(pBuffer);
|
||||
pBuffer = NULL;
|
||||
}
|
||||
ConMsgPuts(StdOut,
|
||||
FORMAT_MESSAGE_FROM_HMODULE,
|
||||
NULL, //hModuleNetMsg,
|
||||
dwMessage,
|
||||
LANG_USER_DEFAULT);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue