Also the case in C++ btw... not a Pascal issue.
I guess you can declare these GUIDS as typed const, but in {$J-} state which makes them immutable.
I thought you knew that:
{$push}{$J-}
const
myguid:TGUid = '{77DE903C-1453-4622-93A0-1C46B74627B9}';
{$pop}
begin
myguid.d1 := 5; // Error: Can't assign values to const variable.
end.
It should be fine to compile the whole interface section of the activex unit in forced {$J-} state.
(If that is not already the case)
The guid ends up in .rodata and so is immutable:
.section .rodata.n_TC_$P$PROGRAM_$$_MYGUID,"aw"
.balign 4
.globl TC_$P$PROGRAM_$$_MYGUID
TC_$P$PROGRAM_$$_MYGUID:
.long 2011074620
.short 5203,17954
.byte 147,160,28,70,183,70,39,185 # same guid, but in decimal.
# End asmlist al_rotypedconsts
Maybe @Marcov can check if this is the case and otherwise protect the interface section with {$J-} ?
This should not otherwise affect the code. Must be done with {$push}/{$pop}, though.