Calling a COM DLL(built in visual studio 2008) from a COM DLL VC++ (visual studio 6.0)
-
-
Hi All, I am facing problem while calling a COM DLL built in visual studio 2008 VC++ from a COM DLL built in visual studio 6.0,VC++. Can someone tell me how to call this DLL from VS6.0 dll? DO you have any practical example? Please share. regards, Vatsa
rana ray wrote:
I am facing problem while calling a COM DLL built in visual studio 2008 VC++ from a COM DLL built in visual studio 6.0,VC++.
What problem? Please share... Given how COM works, it doesn't matter if the COM DLL is built in VC++2008, VC++6 or VB6 - it gets called the same way whichever you use to build hte DLL or call it.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
rana ray wrote:
I am facing problem while calling a COM DLL built in visual studio 2008 VC++ from a COM DLL built in visual studio 6.0,VC++.
What problem? Please share... Given how COM works, it doesn't matter if the COM DLL is built in VC++2008, VC++6 or VB6 - it gets called the same way whichever you use to build hte DLL or call it.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
remember I am calling a dll from another dll. my vs 6.0 com dll is not identifying VS 2008 com dll's interface. I have included my vs2008's _i.c file and header file as well in my VS 6.0 com dll. Is there any other things which i need to do? sharing code is not possible for me as of now.
-
remember I am calling a dll from another dll. my vs 6.0 com dll is not identifying VS 2008 com dll's interface. I have included my vs2008's _i.c file and header file as well in my VS 6.0 com dll. Is there any other things which i need to do? sharing code is not possible for me as of now.
rana ray wrote:
remember I am calling a dll from another dll.
Should make no difference.
rana ray wrote:
my vs 6.0 com dll is not identifying VS 2008 com dll's interface
There are many reasons why that might happen. Have you checked you can access the VS2008 COM object from other clients?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
rana ray wrote:
remember I am calling a dll from another dll.
Should make no difference.
rana ray wrote:
my vs 6.0 com dll is not identifying VS 2008 com dll's interface
There are many reasons why that might happen. Have you checked you can access the VS2008 COM object from other clients?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
OK, so when you call it from the VS2008 DLL, what function call fails (is it CoCreateInstance possibly) and what error status does it return?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
remember I am calling a dll from another dll. my vs 6.0 com dll is not identifying VS 2008 com dll's interface. I have included my vs2008's _i.c file and header file as well in my VS 6.0 com dll. Is there any other things which i need to do? sharing code is not possible for me as of now.
First of all: are we talking about a compile time error or a runtime error?
rana ray wrote:
my vs 6.0 com dll is not identifying VS 2008 com dll's interface. I have included my vs2008's _i.c file and header file as well in my VS 6.0 com dll.
What does this mean? How do you "import" the COM server you're trying to use? Are you using the
#import
statement? If you are: what does it look like?"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown -
OK, so when you call it from the VS2008 DLL, what function call fails (is it CoCreateInstance possibly) and what error status does it return?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
First of all: are we talking about a compile time error or a runtime error?
rana ray wrote:
my vs 6.0 com dll is not identifying VS 2008 com dll's interface. I have included my vs2008's _i.c file and header file as well in my VS 6.0 com dll.
What does this mean? How do you "import" the COM server you're trying to use? Are you using the
#import
statement? If you are: what does it look like?"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown -
Right, that's kind of an important detail. If I were you, I'd take note of what Roger said, and use #import[^] to get a reference to the VS80 DLLs. The code generated by MIDL has changed enough between VC6 and VS2008 that I wouldn't guarantee that VS2008 MIDL code will compile under VC6.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p