Autor Beitrag
Shadow110
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 64



BeitragVerfasst: Mi 30.06.04 03:38 
Hallo.

Ich habe hauptsächlich mit meinen Api nahen Funktionen Probleme:

ausblenden Delphi-Quelltext
1:
2:
3:
 TID := GetWindowThreadProcessId(WIN,@PID) // Hier kommt das mit dem Unsafe. Geht aber mit der unsafe geschichte auch nicht. 
  WriteProcessMemory(HND, ptr(Addr[zaehler]), @hilfint, 1, WRT); // Incompatibler Typ IntPtr und Pointer
  VirtualProtectex(HND, ptr(Addr[Zaehler]), len, PAGE_EXECUTE_READWRITE, @oldprotect);  //Das kennt er gar nicht mehr



Hat da vielleicht jemand eine Idee?

Grüße
Alex
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19272
Erhaltene Danke: 1740

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mi 30.06.04 12:20 
Unter D7 nachsehen, woher die Funktion kam, wahrscheinlich aus einer DLL (kann ih grad nicht nachsehen), Borland macht solche Namen wohl kaum...

Dann könntest du den Import aus der DLL aus den Sourcen kopieren und die Funktion benutzen...

Ansonsten könnte es sein, dass die Methode in irgendeiner System.bla.dll importiert ist, und du die nur finden musst. Wenn der Source bei D8 dabei ist, such die Dateien doch einfach mal mit Delphi durch (so firm bin ich mit D8 noch nicht, daher weiß ich nicht einmal ob der Sourcecode dabei ist :oops: ).
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19272
Erhaltene Danke: 1740

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mi 30.06.04 12:21 
Ach so: nochwas zu den inkompatblen Typen: Versuch statt einer Umwandlung in ptr eine Umwandlung in den neuen Typ IntPtr...