Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 702
  • Last Modified:

Write Memory to Process..

HWND hWnd = FindWindow(0, "WindowName"); 

DWORD proc_id; 
GetWindowThreadProcessId(hWnd, &proc_id); 
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, proc_id); 

BYTE newdata[]={0x72, 0x65, 0x64, 0x70, 0x6F, 0x74, 0x69, 0x6F, 0x6E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; 

DWORD newdatasize = sizeof(newdata); 
 			
WriteProcessMemory(hProcess, (LPVOID)0x5C6600, &newdata, newdatasize, NULL);

Open in new window




Correct or wrong? Because I get these external symbol errors?


Edit: I may have solved my question but I'll keep this up just incase not.
0
RevJoker
Asked:
RevJoker
  • 2
2 Solutions
 
jkrCommented:
Hmmm, which "external symbol errors"? Apart from that, the code seems OK, given that the the address constants are valid and accessible and that your process has the privileges to perform the API calls in question.
0
 
RevJokerAuthor Commented:
I need to call and add some dependencies, so It'll know what it is.
0
 
RevJokerAuthor Commented:
I found the answer myself..
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now