|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++.windows.32-bits - #import statement in DMC - how to?
I am working on the great DMC plugin for Eclipse that scooter developed (slowly trying to update it to ver 3, but I am way down on the Eclipse/Java learning curve) and I have run into a DMC vs MSVC issue. I have a chunk of code that used the directive: #import "thing.tlb" , and I have two files that were provided to me, thing.tlb and thing.dll (no .h file). What is the proper method of replacing the #import statement in MSVC. Thanks, Andy C Greetings from Pittsburgh PA, home of the tax-subsidized Stealers! Jan 17 2006
Andy C wrote:I am working on the great DMC plugin for Eclipse that scooter developed (slowly trying to update it to ver 3, but I am way down on the Eclipse/Java learning curve) and I have run into a DMC vs MSVC issue. I have a chunk of code that used the directive: #import "thing.tlb" , and I have two files that were provided to me, thing.tlb and thing.dll (no .h file). What is the proper method of replacing the #import statement in MSVC. Jan 18 2006
Yes. #import takes the objects in a .tlb or .odl file and wraps the type library contents in C++ classes to simplify calling them. The output is a .thl and .thi that contains forward references and typedefs, as well as smart ptr declarations using _com_ptr_t. It would require installing some ATL features from the Platform SDK. I will implement a workaround just to get the Eclipse plugin back on track, but this is a good candidate for a future Eclipse tool. Andy CDoing a quick-and-dirty search on what '#import' is supposed to do, it turns out that the MSVC compiler does some interesting transformation to the contents of the 'tlb' file to generate usable C++ classes. So I rather doubt that there is an equivalent in DMC. That said, it would almost appear as if the contents of the tlb file are C code -- importing it just rewraps the contents as C++. -scooter Jan 24 2006
|