Board index » delphi » VB/VBA Function TypeName in Delphi, Name of the Interface of an Object

VB/VBA Function TypeName in Delphi, Name of the Interface of an Object

In VB and VBA there is the function TypeName( obj ). This function returns
the name of the Interface if obj is a variable assigned to a COM object.
For example it might "IApplication" , "IDocument", "ILine", "ICircle" . . .

Is it possible to retrieve the name of the interface of an IDispatch
variable in Delphi?

Thanks.

 

Re:VB/VBA Function TypeName in Delphi, Name of the Interface of an Object


I'm not sure if TypeName () does exactly this but you should be able to call
IDispatch.GetTypeInfo and then ITypeInfo.GetNames to get type information
names of an IDispatch-based interface.

have fun
--
Binh Ly
http://www.castle.net/~bly/Programming/Delphi

Quote
Sascha Krning <Sascha.Kruen...@MuM.de> wrote in message

news:7n6imq$lsh7@forums.borland.com...
Quote
> In VB and VBA there is the function TypeName( obj ). This function returns
> the name of the Interface if obj is a variable assigned to a COM object.
> For example it might "IApplication" , "IDocument", "ILine", "ICircle" . .
.

> Is it possible to retrieve the name of the interface of an IDispatch
> variable in Delphi?

> Thanks.

Other Threads