Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Call to C Library from COM

Status
Not open for further replies.

glassonion

Programmer
May 22, 2002
2
US
Hi all,

I'm writing an ATL COM wrapper object for a 3rd party library. The library is implemented in a suite of "C" dll's. I can successfully call the dll functions from a MFC project or a WIN32 console project but when I try and call them from within my ATL COM object I get error codes returned from the dll.

Any ideas?

Is it anything to do with the calling convention used/marshalling in COM objects to non-COM functions?

Any help would be greatly appreciated.

Mark
 
There's no difference in the way you call a 'C' DLL from ATL COM as opposed to MFC or WIN32 console. The only thing you need to worry about is whether the 'C' DLL is thread-safe and protect the entry point if necessary depending on which COM model you're using.

What error codes are you getting?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top