Is there such a thing as in the title? I\'m trying to do this in part of converting an API structure, and run into something I haven\'t encountered before:
I think this is the simplest solution:
PFNReaderTranslatedDispatch = function(var msg: TMsg): BOOL; stdcall;
PReaderModeInfo = ^TReaderModeInfo;
PFNReaderScroll = function(prmi: PReaderModeInfo; dx, dy: integer): BOOL; stdcall;
TReaderModeInfo = record
cbSize: DWord;
hWnd: THandle;
fFlags: DWord;
prc: PRect;
pfnScroll: PFNReaderScroll;
fFlags2: PFNReaderTranslatedDispatch;
lParam: DWord;
end;
Indeed, you can clearly reaplce a var
parameter by a (by-value) pointer parameter. And there is no problem declaring PReaderModeInfo
before TReaderModeInfo
.