 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
John Carlyle-Clarke Guest
|
Posted: Fri Sep 10, 2004 11:15 am Post subject: Re: Getting Dispatch Interface method name at runtime? |
|
|
"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
|
Posted: Fri Sep 10, 2004 9:02 pm Post subject: Getting Dispatch Interface method name at runtime? |
|
|
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 |
|
 |
|
|
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
|
|