Files
mirror-processhacker/2.x/trunk/ProcessHacker/support.c
T
wj32 1fda267dc5 process enumeration and list view items work
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@2315 21ef857c-d57f-4fe0-8362-d861dc6d29cd
2009-10-25 11:30:46 +00:00

57 lines
960 B
C

#include <phgui.h>
#include <wchar.h>
PVOID PhAllocate(
__in SIZE_T Size
)
{
return HeapAlloc(PhHeapHandle, 0, Size);
}
VOID PhFree(
__in PVOID Memory
)
{
HeapFree(PhHeapHandle, 0, Memory);
}
PVOID PhReAlloc(
__in PVOID Memory,
__in SIZE_T Size
)
{
return HeapReAlloc(PhHeapHandle, 0, Memory, Size);
}
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);
}