Skip to content

Instantly share code, notes, and snippets.

@JamesTheHacker
Last active January 3, 2019 15:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JamesTheHacker/5ea98286fcc4e543f3b8537c9ba39892 to your computer and use it in GitHub Desktop.
Save JamesTheHacker/5ea98286fcc4e543f3b8537c9ba39892 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <Windows.h>
int main(int argc, char** argv)
{
int pid = 10964;
DWORD_PTR addr = 0x7FF7BD730000;
/*
* Get a handle for process with specific process id
*/
HANDLE pHandle = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid);
if (pHandle == NULL) {
printf("Could not find process with pid: %i with error: %i", pid, GetLastError());
return -1;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment