tags:

views:

55

answers:

1

I have a C++ DLL that imports a .tlb file generated in a C# project. The C++ DLL is a wrapper DLL containing functions that call the corresponding C# functions.

When I call the C++ functions on the computer that I built the projects, all works well. But when I copy the DLL's and generated tlb's to another computer with the same exact version of Windows and installed programs andI call the C++ functions, it breaks with a COM error. However, after recompiling the projects on the new computer, everything works again.

I already checked the "Work on All Computers" for both projects but this keeps happening. What else do I need to do for the DLL's to work on all computers?

+2  A: 

The HRESULT you get would be crucial to diagnose this. Forced to guess: did you run Regasm.exe on that machine? Required to make the necessary registry entries so COM can find the server. It is automatic when you build in the IDE.

Hans Passant
I'll try to do this one more time. I'll inform of this tomorrow. Thanks for the fast response!
aF
Regarding HRESULT I don't know how to see that cause I first use a python project to call the c++ functions. How can I make it to see the HRESULT?
aF
You'll have to use a C++ debugger if you don't get a decent diagnostic. If my guess is right then it won't fail tomorrow.
Hans Passant
how can I call the c++ debugger when I'm using the python app? Should I ask this question here? :P
aF
I would attach the debugger. Maybe there are better techniques for Python, I recommend you ask it as a separate question, using the "Python" tag. I imagine you'll need to explain how you call C++ code from a Python program.
Hans Passant
roger that, thanks m8
aF