Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Vb 6.0, check whether a com object implements an interface, knowing its GUID

Vb 6.0, check whether a com object implements an interface, knowing its GUID

Scheduled Pinned Locked Moved Visual Basic
comquestionannouncement
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Braulio Dez
    wrote on last edited by
    #1

    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

    D 1 Reply Last reply
    0
    • B Braulio Dez

      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

      D Offline
      D Offline
      Daniel Turini
      wrote on last edited by
      #2

      if TypeOf obj Is IYourInterface Then

      My latest article: GBVB - Converting VB.NET code to C#

      B 1 Reply Last reply
      0
      • D Daniel Turini

        if TypeOf obj Is IYourInterface Then

        My latest article: GBVB - Converting VB.NET code to C#

        B Offline
        B Offline
        Braulio Dez
        wrote on last edited by
        #3

        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 ?

        D 1 Reply Last reply
        0
        • B Braulio Dez

          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 ?

          D Offline
          D Offline
          Daniel Turini
          wrote on last edited by
          #4

          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#

          B 1 Reply Last reply
          0
          • D Daniel Turini

            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#

            B Offline
            B Offline
            Braulio Dez
            wrote on last edited by
            #5

            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 :-)

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups