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. COM
  4. How to create object by Knowing Interface only

How to create object by Knowing Interface only

Scheduled Pinned Locked Moved COM
windows-admintutorial
6 Posts 3 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.
  • K Offline
    K Offline
    kanduripavan
    wrote on last edited by
    #1

    I have a situation like this. I got a interface name from the registry which i have to use. I want to work with that object. So is there any method we can access the class object with the the information i got (only Interface name from registry). I dont have clsid. Thanks

    A 1 Reply Last reply
    0
    • K kanduripavan

      I have a situation like this. I got a interface name from the registry which i have to use. I want to work with that object. So is there any method we can access the class object with the the information i got (only Interface name from registry). I dont have clsid. Thanks

      A Offline
      A Offline
      Alex Hazanov
      wrote on last edited by
      #2

      What programming language/enviroment you are using? Creative minds - create creative creations!

      K 1 Reply Last reply
      0
      • A Alex Hazanov

        What programming language/enviroment you are using? Creative minds - create creative creations!

        K Offline
        K Offline
        kanduripavan
        wrote on last edited by
        #3

        Thanks for replying, I am using visual c++ in windows 2000 Pro edition. The registry entry tells only that we have 12 or n methods in that interface. How can we query about it.

        S 1 Reply Last reply
        0
        • K kanduripavan

          Thanks for replying, I am using visual c++ in windows 2000 Pro edition. The registry entry tells only that we have 12 or n methods in that interface. How can we query about it.

          S Offline
          S Offline
          Steve S
          wrote on last edited by
          #4

          Umm, if you don't have a CLSID, then it's a little difficult. You could look through all the registered TYPELIBs and see if the interface is referenced in there, which would give you some clues, but for some interfaces, there are many objects that implement the interface (such as IPersist), and it really doesn't help you. If you could explain how you come by the interface ID, and why you don't know the CLSID, it's possible (but unlikely) that someone could help (or at least explain why you can't do it) Steve S Developer for hire

          K 1 Reply Last reply
          0
          • S Steve S

            Umm, if you don't have a CLSID, then it's a little difficult. You could look through all the registered TYPELIBs and see if the interface is referenced in there, which would give you some clues, but for some interfaces, there are many objects that implement the interface (such as IPersist), and it really doesn't help you. If you could explain how you come by the interface ID, and why you don't know the CLSID, it's possible (but unlikely) that someone could help (or at least explain why you can't do it) Steve S Developer for hire

            K Offline
            K Offline
            kanduripavan
            wrote on last edited by
            #5

            Sir, Sorry for not explaining the context.Because i want to know that is there any way that we can do it. The actual thing is that i had to use IDiscMaster interface. My os is Windows 2000. I searched through net and came to know that we have to make use this IDiscMaster Interface. I searched for it in my machine i found the key in the registry. but i cannot find a method through which i can get the class object and along with that i can access the interace ptr of IDiscMaster. PSFactoryBuffer is the object i think i have to get not sure of that . How do i traverse through that IDiscMaster Interface ?. Thank you very much

            S 1 Reply Last reply
            0
            • K kanduripavan

              Sir, Sorry for not explaining the context.Because i want to know that is there any way that we can do it. The actual thing is that i had to use IDiscMaster interface. My os is Windows 2000. I searched through net and came to know that we have to make use this IDiscMaster Interface. I searched for it in my machine i found the key in the registry. but i cannot find a method through which i can get the class object and along with that i can access the interace ptr of IDiscMaster. PSFactoryBuffer is the object i think i have to get not sure of that . How do i traverse through that IDiscMaster Interface ?. Thank you very much

              S Offline
              S Offline
              Steve S
              wrote on last edited by
              #6

              IDiscMaster is part of the IMAPI (Image Mastering API). This isn't supported on Win2K, only on XP (and later), so you can't create the object that would provide this interface, as it won't be installed on the system. If you check out the MSDN site, it should point you to stuff written by Paul DiLascia which uses this (April '04 issue of MSDN Magazine, IIRC). Steve S Developer for hire

              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