Einzelnen Beitrag anzeigen

Kas Ob.

Registriert seit: 3. Sep 2023
347 Beiträge
 
#10

AW: Delphi 12 und SendMessage

  Alt 19. Feb 2024, 14:06
Da gibt es Abweichungen.

showmessage(inttostr(sizeof(aCopyData)));

D11
x64=24
x86=12

D12
x64=8
x86=4
That can't be right.

First i put SizeOf(TCopyDataStruct) not sizeof(aCopyData), why it is important because 8 and 4 are the size of single and simple pointer, not a record (struct), and 8 and 4 looks like a pointer something like PCopyDataStruct not TCopyDataStruct, or you just used @aCopyData by mistake.
Second as rule of thumb, never ever use with SendMessage, PostMessage... parameters other than WPARAM and LPARAM, or just cast them.
Kas
  Mit Zitat antworten Zitat