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 access COM component in general ???

How to access COM component in general ???

Scheduled Pinned Locked Moved COM
comtutorialquestionlounge
6 Posts 4 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.
  • D Offline
    D Offline
    davarun
    wrote on last edited by
    #1

    how many ways a client can access com componet ? ex, I have created a com comp(inproc) which is registerd and ready to use, i want my clinet to access this, what all the steps to be taken from my end (like what all info i need to give to them )and client side ? thanks

    S _ E 3 Replies Last reply
    0
    • D davarun

      how many ways a client can access com componet ? ex, I have created a com comp(inproc) which is registerd and ready to use, i want my clinet to access this, what all the steps to be taken from my end (like what all info i need to give to them )and client side ? thanks

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #2

      You need to give them something which defines your components interface - the IDL you used to define the component interface is probably the best thing... Or you might find that the DLL containing your component is all that's needed - COM components can store metadata (in a type library in the DLL) if they're derived from IDispatch.

      Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p MVP for 2010 - who'd'a thunk it!

      1 Reply Last reply
      0
      • D davarun

        how many ways a client can access com componet ? ex, I have created a com comp(inproc) which is registerd and ready to use, i want my clinet to access this, what all the steps to be taken from my end (like what all info i need to give to them )and client side ? thanks

        _ Offline
        _ Offline
        _Superman_
        wrote on last edited by
        #3

        I'm familiar with 3 ways to access an in-proc COM component - You can use the COM APIs like CoCreateInstance to access the component. You can use #import to instantiate the COM component using its type library and also create smart pointers for all its interfaces. You can use ATL smart pointer classes like CComPtr to access the COM component.

        «_Superman_» I love work. It gives me something to do between weekends.
        Microsoft MVP (Visual C++)

        D 1 Reply Last reply
        0
        • _ _Superman_

          I'm familiar with 3 ways to access an in-proc COM component - You can use the COM APIs like CoCreateInstance to access the component. You can use #import to instantiate the COM component using its type library and also create smart pointers for all its interfaces. You can use ATL smart pointer classes like CComPtr to access the COM component.

          «_Superman_» I love work. It gives me something to do between weekends.
          Microsoft MVP (Visual C++)

          D Offline
          D Offline
          davarun
          wrote on last edited by
          #4

          hi, But before using coCreateInstance u need to know what all the interfaces and components avaiable, so that u can have CLSID and IID of the the component. Also if i am writting client pgm for a component , what should i do to know abt components before i call CoCreateInstance ?? Is there any way client can find details about ur component apart from importing typelib ?? thanks

          _ 1 Reply Last reply
          0
          • D davarun

            hi, But before using coCreateInstance u need to know what all the interfaces and components avaiable, so that u can have CLSID and IID of the the component. Also if i am writting client pgm for a component , what should i do to know abt components before i call CoCreateInstance ?? Is there any way client can find details about ur component apart from importing typelib ?? thanks

            _ Offline
            _ Offline
            _Superman_
            wrote on last edited by
            #5

            A COM client must know what interfaces and methods the COM component implements. If it does not, then why would it need to use it at all!!! Usually this is documented by the creator of the COM component.

            «_Superman_» I love work. It gives me something to do between weekends.
            Microsoft MVP (Visual C++)

            1 Reply Last reply
            0
            • D davarun

              how many ways a client can access com componet ? ex, I have created a com comp(inproc) which is registerd and ready to use, i want my clinet to access this, what all the steps to be taken from my end (like what all info i need to give to them )and client side ? thanks

              E Offline
              E Offline
              elsetryfly
              wrote on last edited by
              #6

              A Complete ActiveX Web Control Tutorial

              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