Frank, see my comments bellow. On Wed, 2013-01-09 at 08:04 -0500, K. Frank wrote: > I am hoping that all I need to do is translate the above code > fragment, e.g.: > > #import <msxml3.dll> raw_interfaces_only named_guids > > into the mingw-w64 world (without learning DCOM). > > Any suggestions or even educated guesses would be helpful. > Should I just #include all four msxml headers? Include only > one "master" header file? Something else? Might I have to > manually add some msxml library to the link command? > > I'm speculating that the microsoft #import command is reading > through the .dll to find and extract the function-prototype information > that in the mingw-w64 world is in the #include header files. But > that's just a guess, so any help would be appreciated. > > Again, I'm not asking how to use msxml. I just need to know how > to make msxml available to code that presumably already uses it > correctly by finding the mingw-w64 equivalent of the #import line. >
MS #import command does not read in the .dll. It reads in a binary file called type library, usually with extension .tlb (however, the type library can be also linked as resource to any executable file, e.g. exe, dll and ocx). There is public API for reading type libraries, so virtually a support for #import could be implemented into MinGW, but I am afraid that it would be quite a big job. You don't need to link any COM dll, it is useless. On the other hand, you must link to ole32 (defines CoInitialize, CoUninitialize), oleauto32 (defines CoCreateInstance) and possibly uuid (defines GUID_NULL). Then you must call CoInitialize in the beginning of your code (definitively prior trying to load a COM object) and call CoUninitialize in the end of your application. This all is perhaps handled by the MS _WIN32_DCOM definition, I am not sure. You then create a new instance of a COM object by calling the CoCreateInstance function with appropriate arguments. Pavel > > > > Ruben > > > Thanks again. > > > K. Frank > > ------------------------------------------------------------------------------ > Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery > and much more. Keep your Java skills current with LearnJavaNow - > 200+ hours of step-by-step video tutorials by Java experts. > SALE $49.99 this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122612 > _______________________________________________ > Mingw-w64-public mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public ------------------------------------------------------------------------------ Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery and much more. Keep your Java skills current with LearnJavaNow - 200+ hours of step-by-step video tutorials by Java experts. SALE $49.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122612 _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
