Hi all,

I am trying to embed Windows binary DLL (Fine Reader Engine) in Linux
program using WineLib.  The problem is that the library is intended to
be used with C++ and it uses COM object model to export its object
interfaces.  I managed to compile a simple WineLib application which
loads the DLL, acquires pointers to global functions and calls them.
These functions return a pointer to an object.  When I try to call a
method implemented by this object, my program crashes.

After quick research at MSDN I learned that a COM object is a
structure in which the first field is a pointer to a vector of methods
(a virtual table pointer).  So, when is the vtable initialized?
Should I load methods with GetProcAddress() and put them into vtable?
Or maybe there is another way to do this?  

Do I have to use macros ICOM_* defined in include/wine/obj_base.h
file?  From what I understood they are helpful when you compile your
own COM-based code to replace native COM DLLs such like Direct3D.


Peter 

Reply via email to