ycomp
asked on
Accesing a COM object (created by Delphi) from VC++
Hi,
If a COM object is written in Delphi, it should be accessible by VC++ , right?
A customer is asking something about an error he is getting... something about different calling conventions between C++ and pascal.
But shouldn't this be handled correctly simply because my Delphi COM object is a COM object?
If a COM object is written in Delphi, it should be accessible by VC++ , right?
A customer is asking something about an error he is getting... something about different calling conventions between C++ and pascal.
But shouldn't this be handled correctly simply because my Delphi COM object is a COM object?
Yes, I've accessed COM objects writtin in Delphi from VC++ before.
However, customer must be using it as a COM object, not a DLL call. There are different calling conventions between VC++ & Delphi when you interface via DLL's, basically you cannot (easily at least) using object interfaces, only undecorated (classless) functions and procedures.
As COM interfaces, there is no problem.
However, customer must be using it as a COM object, not a DLL call. There are different calling conventions between VC++ & Delphi when you interface via DLL's, basically you cannot (easily at least) using object interfaces, only undecorated (classless) functions and procedures.
As COM interfaces, there is no problem.
ASKER
so alex, are you saying that it is common for this to happen even though there is a type library?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The COM object should have a type library and VC++ should create code with the proper calling convention to these Delphi methods, but apparantly something goes wrong.