Einzelnen Beitrag anzeigen

Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#5

AW: [DLL Injection] Code in fremden Prozess einschleusen

  Alt 16. Mai 2011, 14:04
Hallo,

Sicher dass das VirtualAlloc nötig/richtig ist?
Ich gehe ja mal davon aus, dass du einen vorhandenen (!) Speicherbereich überschreiben willst.
VirtualAlloc reserviert aber NEUEN Speicher.

Wenn an der Stelle die du bei VirtualAlloc angibst schon Speicher reserviert ist, passiert folgendes:

Zitat:
lpAddress
The starting address of the region to allocate. If the memory is being reserved, the specified address is rounded down to the nearest multiple of the allocation granularity. If the memory is already reserved and is being committed, the address is rounded down to the next page boundary. To determine the size of a page and the allocation granularity on the host computer, use the GetSystemInfo function. If this parameter is NULL, the system determines where to allocate the region.
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat