How to access COM component in general ???
-
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
-
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
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!
-
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
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 likeCComPtr
to access the COM component.«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) -
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 likeCComPtr
to access the COM component.«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++)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
-
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
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++) -
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
A Complete ActiveX Web Control Tutorial