I'm taking the same order of your former explanations.
1. Sorry, but I don't understand what you mean by 'bit pattern': could you explain it more precisely, please ?
In my former posts, I'm not saying that object references are not pointers, but just that @desform <> TObject(desform) (if we consider only the internal values for them). Which doesn't seem obvious by looking at your own sample code and comments.
2. Any reference to a variable is supposed to be valid (and unchanged) during the 'life' of this variable: would any internal processes change it, it would be impossible to use them (especially when passing them as parameters to other functions/procedures).
Coming back to your sample, all your variables are just 'local' variables. I mean only valid in your procedure; after that, they don't have any more sense, of course.
Is your aPtr variable (i.e. aPtr^ := @desForm ) always valid in your procedure ? Sure, it does (if you are not trying to destroy/recreate desForm, or any other such trick, of course).
Your crashes are not due to any 'internal' pointer process (i.e. modifying the value of an object in memory, for instance). But just because you've wrongly cast your pointer and object variables in the second part of your code.
Have you tried my second modification to see what I mean, for instance ?
3. I can't see any problem due to integer-string conversion, according to your concern. There are no real differences between signed integer and unsigned integer, if you consider their internal representation, anyway.
For instance, strtoint has no problem when dealing with negative numbers (i.e. with the highest bit set). Make your own try with this sample :
procedure TForm1.Button1Click(Sender: TObject);
var ul1,ul2: longword;
var s1: string;
begin
s1:='11111111';
ul1:=strtoint('$'+s1);
s1:='FFFFFFFF';
ul2:=strtoint('$'+s1);
ShowMessage('ul1='+inttohex(ul1,8)+' and ul2='+inttohex(ul2,8));
end;
You are still not convinced ? Try with integers, instead:
procedure TForm1.Button1Click(Sender: TObject);
var ul1,ul2: integer;
var s1: string;
begin
s1:='11111111';
ul1:=strtoint('$'+s1);
s1:='FFFFFFFF';
ul2:=strtoint('$'+s1);
ShowMessage('ul1='+inttostr(ul1)+' and ul2='+inttostr(ul2));
end;
Of course, -1 <> FFFFFFFF, if we consider strictly these representations. But both of them represent the same number.
**EDIT** : My last samples (about integer-string conversion) have only a sense for a 32 bit CPU, of course; with 4 bytes for integers and longwords. For 64 bits CPU (or for int64 variables on 32 bit CPU), apply the concerned corrections. For instance:
procedure TForm1.Button1Click(Sender: TObject);
var ul1,ul2: int64;
var s1: string;
begin
s1:='1111111111111111';
ul1:=strtoint64('$'+s1);
s1:='FFFFFFFFFFFFFFFF';
ul2:=strtoint64('$'+s1);
ShowMessage('ul1='+inttohex(ul1,16)+' and ul2='+inttohex(ul2,16));
end;