PDA

Click to See Complete Forum and Search --> : COM Confusion. Please help me with some answers.


SidCMC
Jan 16th, 2008, 06:28 AM
:confused:
Please help me with COM concepts. Following is the matter taken
from MSDN(double quoted) :-

"Referring to an object implementing an interface means that the object uses code that implements each method of the interface and provides COM binary-compliant pointers to those functions to the COM library. COM then makes those functions available to any client who asks for a pointer to the interface, whether the client is inside or outside of the process that implements those functions."
Here are some of my questions ::

1)Does the object implementing the interface belong to the class which
contains the interface ?

2) What is this theory that states pointers to functions being stored
in COM libraries.

3) Let us consider the above points to be true. Now if an object
belonging to some other process wants to use our COM object.
How does this object store the function pointers contained
in our library.

It has all got messed up in my head. Would you please throw some light
on this?:confused:

SidCMC
Jan 16th, 2008, 08:55 PM
Please help me with the above question.
It is a bit theoritical but would certainly clarify
many things...
Thanks in advance.:confused:

sharmasumit45
Jan 23rd, 2008, 12:15 AM
hi,

Let me share what I am working on.Hope this will help you.
I have asp webapplication.That uses the com components.
It reads the excel file.Using public function readexcel().I have to call the class and add the reference to it in vs2003. Supose I have class aExl .I create an object of it and all the avilable functions are listed in it .

So this way I am using it.We have multiple classes and multiple functions inside it.

Hope this understanding helps you.

regards

SidCMC
Jan 23rd, 2008, 09:38 PM
Thanks Sumit,
But the problem I am facing right now is as follows ::
When I create a .NET classlibrary and try to reference it
in VB 6.0 which is COM based, I can reference the .dll file
successfully but there are no functions and members which
I have defined in the original class library.
It just shows up as an emply class. Why does that happen?
Regards,
Sid.:)

sharmasumit45
Jan 23rd, 2008, 10:28 PM
I don't have much time at present .But can you please go through the link
Hope it will helps.
http://msdn2.microsoft.com/En-US/library/ms973802.aspx
http://www.codeproject.com/dotnet/cominterop.asp

SidCMC
Jan 24th, 2008, 04:11 AM
Ok .. I will try.