Original Post
🔒 Locked
Callback functions
Advertisement
Hi there,
declare your procedure type as
type
TMyCallBack = procedure(Params...);
then the function to call with the callback eg
procedure MyWrapperProc(S: String; CallBack: TMyCallBack);
then declare your procedure as
procedure MyCallback(Params...);
then all you need to do is call
MyWrapperProc(''Delphi Callback Proc'', MyCallback);
If your using callbacks from the windows API then
you need to declare them with the stdcall ie
type
TMyCallBack = procedure(Params...); stdcall;
if your using them from within a class do
type
TMyCallBack = procedure(Params...) of object;
Hope it helps
Mark.
declare your procedure type as
type
TMyCallBack = procedure(Params...);
then the function to call with the callback eg
procedure MyWrapperProc(S: String; CallBack: TMyCallBack);
then declare your procedure as
procedure MyCallback(Params...);
then all you need to do is call
MyWrapperProc(''Delphi Callback Proc'', MyCallback);
If your using callbacks from the windows API then
you need to declare them with the stdcall ie
type
TMyCallBack = procedure(Params...); stdcall;
if your using them from within a class do
type
TMyCallBack = procedure(Params...) of object;
Hope it helps
Mark.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement