Files
mirror-processhacker/trunk/NProcessHacker/Test/test.c
T
wj32 49e216abc2 * NPH cleanup
* all NPH functions are now stdcall
* NPH is now statically linked

git-svn-id: svn://svn.code.sf.net/p/processhacker/code@1597 21ef857c-d57f-4fe0-8362-d861dc6d29cd
2009-07-14 01:29:16 +00:00

30 lines
580 B
C

#ifndef UNICODE
#define UNICODE
#endif
#include <windows.h>
#include <stdio.h>
#include "../kph.h"
#include "../kphhook.h"
int wmain(int argc, WCHAR *argv[])
{
ULONG pid;
HANDLE processHandle;
CHAR memory[0x1000];
if (argc < 2)
{
printf("Usage: test [pid to kill]\n");
return 1;
}
pid = _wtoi(argv[1]);
KphHookInit();
processHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
ReadProcessMemory(processHandle, (PVOID)0x10000, memory, 0x1000, NULL);
return 0;
}