BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Getting Dispatch Interface method name at runtime?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
John Carlyle-Clarke
Guest





PostPosted: Fri Sep 10, 2004 11:15 am    Post subject: Re: Getting Dispatch Interface method name at runtime? Reply with quote



"Abdullah Kauchali" <abdullah.kauchali (AT) somewhere (DOT) com> wrote in
news:41416dce (AT) newsgroups (DOT) borland.com:

Quote:
Is it possible to obtain the name of the Interface plus *method*
from within the executing method of an automation COM object?

For instance: I have IDispatch called MyInterface.myMethodName
...

is it possible to obtain this "MyInterface.myMethodName" text from
within the *implementation* of the method while it's currently
running? If so, any tips would be appreciated.



Well, you can obtain the dispatch ID by overriding IDispatch.Invoke
(probably TAutoObject.Invoke if you derive from that). Grab the ID
and then call the base class implementation.

To get from the ID to the name, you can either just do it manually
with a table, or you can call GetTypeInfo on yourself to get an
ITypeInfo and use that the translate ID's to names.

Back to top
Abdullah Kauchali
Guest





PostPosted: Fri Sep 10, 2004 9:02 pm    Post subject: Getting Dispatch Interface method name at runtime? Reply with quote



Is it possible to obtain the name of the Interface plus *method* from within
the executing method of an automation COM object?

For instance: I have IDispatch called MyInterface.myMethodName ...

is it possible to obtain this "MyInterface.myMethodName" text from within
the *implementation* of the method while it's currently running? If so, any
tips would be appreciated.

Kind regards

Abdullah


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.