Forum: Programmieren allgemein
by Kas Ob.,
20. Feb 2024
You are right, but for best practice i prefer never to use variable, to avoid situations like the following
type
PMyRecord = ^TMyRecord;
TMyRecord = record
Buffer: array of Byte;
end;
TMyClass = class
public
Forum: Programmieren allgemein
by Kas Ob.,
19. Feb 2024
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...
Forum: Programmieren allgemein
by Kas Ob.,
19. Feb 2024
Hi,
Just an idea, i don't have Delphi 12, but form what i read there is change in default Integer and NativeInt...
So please check the size of TCopyDataStruct in both Delphi 11 and 12, may be something broke there with dwData,
It would be nice if you shared with us the SizeOf(TCopyDataStruct) in the 4 cases Delphi 11 and Delphi 12 for application with 32bit and 64bit.