Vb 6.0, check whether a com object implements an interface, knowing its GUID
-
Hi, I want to check whether a COM object or activeX, implements my new version of an interface or the old one, I know the GUID of my new interface, is there any way to check that using Visual Basic ? Thanks in advance, greetings Braulio
-
Hi, I want to check whether a COM object or activeX, implements my new version of an interface or the old one, I know the GUID of my new interface, is there any way to check that using Visual Basic ? Thanks in advance, greetings Braulio
if TypeOf obj Is IYourInterface Then
My latest article: GBVB - Converting VB.NET code to C#
-
if TypeOf obj Is IYourInterface Then
My latest article: GBVB - Converting VB.NET code to C#
Hi Daniel, Thanks, but... what I have it's a GUID ( and I cannot import the TLB in order to have Interface...), it's possible to get the Interface from the GUID ?, or is there a TypeOf that works only with the GUID ?
-
Hi Daniel, Thanks, but... what I have it's a GUID ( and I cannot import the TLB in order to have Interface...), it's possible to get the Interface from the GUID ?, or is there a TypeOf that works only with the GUID ?
Braulio Díez wrote: Thanks, but... what I have it's a GUID ( and I cannot import the TLB in order to have Interface...), it's possible to get the Interface from the GUID ?, or is there a TypeOf that works only with the GUID ? Oh, I see... Well, VB6 do not have any feature like that. The way to go would be calling the QueryInterface method on the IUnknown (all COM interfaces have this method). Doing this in VB6 is cumbersome and involves some coding I would not show to children. The way to go would be coding this in a small C++ component. My latest article: GBVB - Converting VB.NET code to C#
-
Braulio Díez wrote: Thanks, but... what I have it's a GUID ( and I cannot import the TLB in order to have Interface...), it's possible to get the Interface from the GUID ?, or is there a TypeOf that works only with the GUID ? Oh, I see... Well, VB6 do not have any feature like that. The way to go would be calling the QueryInterface method on the IUnknown (all COM interfaces have this method). Doing this in VB6 is cumbersome and involves some coding I would not show to children. The way to go would be coding this in a small C++ component. My latest article: GBVB - Converting VB.NET code to C#
Thanks for the Info, Yes, I've seen some examples of that QueryInterface and I didn't believe it could be so difficult.... what a pity..., well let's hope that VBasic .net it's completly different that 6.0 :-)