mirror of
https://github.com/mirror/processhacker
synced 2026-06-08 16:03:24 +00:00
3c72f1c75c
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@2339 21ef857c-d57f-4fe0-8362-d861dc6d29cd
35 lines
631 B
C
35 lines
631 B
C
#include <phgui.h>
|
|
#include <wchar.h>
|
|
|
|
INT PhShowMessage(
|
|
__in HWND hWnd,
|
|
__in ULONG Type,
|
|
__in PWSTR Format,
|
|
...
|
|
)
|
|
{
|
|
va_list argptr;
|
|
|
|
va_start(argptr, Format);
|
|
|
|
return PhShowMessage_V(hWnd, Type, Format, argptr);
|
|
}
|
|
|
|
INT PhShowMessage_V(
|
|
__in HWND hWnd,
|
|
__in ULONG Type,
|
|
__in PWSTR Format,
|
|
__in va_list ArgPtr
|
|
)
|
|
{
|
|
INT result;
|
|
WCHAR message[PH_MAX_MESSAGE_SIZE];
|
|
|
|
result = _vsnwprintf(message, PH_MAX_MESSAGE_SIZE, Format, ArgPtr);
|
|
|
|
if (result == -1)
|
|
return -1;
|
|
|
|
return MessageBox(hWnd, message, PH_APP_NAME, Type);
|
|
}
|