2

Please i use the follwing code [ delphi Hook SetClipboardData from user32.dll ] to hook Clipboard in x86 and That worked well , but my issue now is with x64 and i think the problem is with the PUSH and RET values under x64. Please if i'm correct can someone give me the correct values of PUSH and RET on x64

Community
  • 1
  • 1
randydom
  • 395
  • 2
  • 20
  • 1
    Yeah, asm is very different on x64. There must be a more sensible solution but that code is opaque. – David Heffernan May 08 '12 at 21:37
  • 1
    The most obvious thing that jumps out is that on x64 a pointer is 8 bytes, but a DWORD is only 4. `PUSH` and `RET` have the same opcodes on x86 and x64. Whether or not that hooking technique works when you fix your pointer sizes, I don't know. Did you write the code yourself? Do you have a reference for Win32 API hooking on x64? – David Heffernan May 08 '12 at 21:48
  • 2
    See this solution: http://stackoverflow.com/a/7669528/197220 – André May 09 '12 at 10:16

1 Answers1

0

I Think You Should Change

cOpen.Push := $68;

To

cOpen.Push := $E9;
Charles Menguy
  • 40,830
  • 17
  • 95
  • 117