forlano Messages: 1189 Registered: March 2006 Location: Italy
Senior Contributor
Hello,
I'm trying to use an external library made by a COM object.
This is the first time I face such animal. It seems I must register it in some way. I remind to have seen a discussion about this topic in the past but I cannot find it with the search function.
In particular I would like to know if I can import it and how. In visual C++ the command seems to be
#import “<path>\my_library.dll”
forlano Messages: 1189 Registered: March 2006 Location: Italy
Senior Contributor
forlano wrote on Fri, 18 April 2008 01:29
Hello,
I'm trying to use an external library made by a COM object.
This is the first time I face such animal. It seems I must register it in some way. I remind to have seen a discussion about this topic in the past but I cannot find it with the search function.
In particular I would like to know if I can import it and how. In visual C++ the command seems to be
#import “<path>\my_library.dll”
tvanriper Messages: 85 Registered: September 2007 Location: Germantown, MD, USA
Member
I do not think so... the .dli mechanism looks to me as if it is intended to be used with arbitrary DLLs and the functions they expose.
I've bound to COM objects using Ultimate++ before, at my job. Basically, I sorta cheated.
I had another project in Microsoft Visual C++ that used the COM objects I wanted to use. These generated a .c and .h file that provided the bindings I needed for the COM object. I simply pulled these into my Ultimate++ project.
This said, I should think you ought to be able to use the #import trick if the DLL in question supports it. You'll need to include the right headers to make use of it (I can't recall what they are right now, and I'm at home... won't be back to work for a week or so). And, honestly, I haven't really tried it.