Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.

ID: 15457, Calling automation methods using GetIDsOfNames and Invoke

by Registered User Email: Anonymous

This is a project demonstrating calling automation methods when all you have at runtime are the class name and method name. (as string values) In this example the method parameters are known.
Download Details
FTP  download also available
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For Delphi, Version 1.0  to 5.0 921 downloads
Copyright: No significant restrictions

Size: 373,950 bytes
Updated on Fri, 22 Dec 2000 07:51:02 GMT
Originally uploaded on Fri, 22 Dec 2000 07:50:02 GMT
SHA1 Hash: A60F2ED330168278A4CEA3D7CAEE8E8E20C8C4DF
MD5 Hash: D32D6C75296A6FB3D7BFFC26EC14D0AD

    Explore the files in this upload

We couldn't find any Delphi examples of using IDispatch:Invoke() to call a COM / MTS / COM+ automation method when you don't have a type library or only have the class name and method name.

The tricky part of Invoke is packaging the parameters to the method.

In this example, the parameters to the method are known.
There are examples elsewhere that can parse type lib info from a .DLL and extract parameter info, so it isn't addressed in this project.

We define class names and method names in a database to dynamically assign behavior to JavaScript event handlers processed in an ASP page. Events, Class Names, and Method Names are defined in an XML document on the page, generated from the database. VBScript ( using execute() ) supports calling methods using only the class and method names. We wanted to duplicate that functionality in Delphi.

   Latest Comments  View All Add New

Move mouse over comment to see the full text

Could not retrieve comments. Please try again later.

Server Response from: ETNACDC04