Tim Bowers
asked on
How do I deal with events containing parameters?
I have a .tlb that originated from a C# .net dll that gives me the following
// ************************** ********** ********** ********** ********** ***//
// OLE Server Proxy class declaration
// Server Object : TDesktopClient
// Help String :
// Default Interface: _DesktopClient
// Def. Intf. DISP? : No
// Event Interface: IClientEvents
// TypeFlags : (2) CanCreate
// ************************** ********** ********** ********** ********** ***//
TDesktopClient = class(TOleServer)
.... and so on
where OnContactData is defined in the .tlb as
property OnContactData: TDesktopClientContactData read FOnContactData write FOnContactData;
and TDesktopClientContactData is defined in the .tlb as
TDesktopClientContactData = procedure(ASender: TObject; const data: _ContactData) of object
and FOnContactData in the .tlb as
FOnContactData: TDesktopClientContactData;
So as far as my understanding goes I will need to add the following to my own form,
TDeskTop:= TDesktopClient.Create(self );
TDeskTop.OnContactData:=Ca ll;
The question is really, how do I deal with the OnContactData in a way that I can access the _ContactData parameter?
(My guess is that I need to create something similar to .OnContactData but I am not sure exactly how I would do this to access the _ContactData object.)
// **************************
// OLE Server Proxy class declaration
// Server Object : TDesktopClient
// Help String :
// Default Interface: _DesktopClient
// Def. Intf. DISP? : No
// Event Interface: IClientEvents
// TypeFlags : (2) CanCreate
// **************************
TDesktopClient = class(TOleServer)
.... and so on
where OnContactData is defined in the .tlb as
property OnContactData: TDesktopClientContactData read FOnContactData write FOnContactData;
and TDesktopClientContactData is defined in the .tlb as
TDesktopClientContactData = procedure(ASender: TObject; const data: _ContactData) of object
and FOnContactData in the .tlb as
FOnContactData: TDesktopClientContactData;
So as far as my understanding goes I will need to add the following to my own form,
TDeskTop:= TDesktopClient.Create(self
TDeskTop.OnContactData:=Ca
The question is really, how do I deal with the OnContactData in a way that I can access the _ContactData parameter?
(My guess is that I need to create something similar to .OnContactData but I am not sure exactly how I would do this to access the _ContactData object.)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.