PODBALMMSG2 = ^ODBALMMSG2;
ODBALMMSG2 = packed record
alm_no: LongInt;
atype: SmallInt;
axis: SmallInt;
dummy: SmallInt;
msg_len: SmallInt;
alm_msg: array [0 .. 63] of AnsiChar;
end;
In Delphi,if you has code like this:
procedure DoSometiing(xxxxx: xx);
var
MyR: ODBALMMSG2
begin
////do something...
end;
Here, you got a record MyR, its memory is prepared statically. It is a instance, you can use it directly. And the pointer of this instance is: @MyR.
If you has code like this:
procedure DoSometing(xxx: xxx);
var
MyR_P: PODBALMMSG2
begin
/// Here, MyR_P is a pointer that type is PODBALMMSG2 but it is a pointer, you can just use a normal pointer type instead PODBALMMSG2.
/// Here, MyR_P is just a variable, there is no instance, no memory that store data. If you want use it, you must allocate memory for it. And, you must free the memory when you want to give up it.
MyR_P := GetMem(SizeOf(ODBALMMSG2));
try
do something...
finally
FreeMem(MyR_P);
end;
/// or, you can use this function:
New(MyR_P);
try
Do something....
finally
Dispose(MyR_P);
end;
end;