Hi, If you are wanting to use IDispatch to access interface methods you will need to use the Invoke method.
The key parameters that you will need to set is the DispID for the method that you want to call, and the parameter object. The DispID can be obtained easily from the type library, and the parameters must be set in the correct order. This means if you are calling a stdcall method that you must work from right to left. I have only found this useful when using a generic collection object that needs to beable to serve com objects of different types that need to be initialised in some fashion (a COM method) before being served. var DispID : Integer; Params : TDispParams; varResult : Variant; ExceptionInfo : TExcepInfo; ArgError : Integer; myObj.Invoke(DispID,GUID_NULL,LOCALE_SYSTEM_DEFAULT,DISPATCH_METHOD,Params,@varResult,@ExceptionInfo,@ArgError) HTH Ben � � � -----Original Message----- From: Matthew Evans [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 19 February 2003 11:14 a.m. To: Multiple recipients of list delphi Subject: [DUG]: Information on IDispatch Can anyone suggest some good websites where I maybe able to find information on this? A few examples of using it to access interface methods etc? --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
