mirror of
https://github.com/mirror/processhacker
synced 2026-06-08 16:03:24 +00:00
7bd28e4357
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@2304 21ef857c-d57f-4fe0-8362-d861dc6d29cd
30 lines
580 B
C
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;
|
|
}
|