Hi all,

First of all, I apologize if the question I pose is silly, stupid or
offtopic.  I had read FAQ, HOWTO and this mailing list archive, but
neither of them could fully solve my problem.  So, I'm here and ask
Gurus how to do this.

I'm not a Windows hacker.  Frankly speaking, I haven't ever programmed
a single Windows app using direct win32 API calls.  Maybe that's why I
am so confused about WineLib.


I have several DLLs that do some OCR work for me.  These libs are
strongly C++ oriented.  They export few global functions for
initialization and deinitialization and one global function that
returns pointer to main application object.  All OCR work is being
done by calling this object's methods.


What I understood from HOWTO: 

At first, I have to create a "glue lib" which itself is an ELF object
(*.so).  The purpose of the "glue lib" is loading "real lib" (*.dll)
into memory and mapping its functions ("real functions") to "glue
functions" that can be called by Linux application.

Then I create a simple .spec file described in HOWTO and create a stub
with winebuild (build?) utility.  That's easy.


Why am I confused about:

So, what's the way I could call the object's methods?  They are not
exported as global functions, so I cannot make a "glue functions" for
them.  If there is no "glue functions", there will be no possibility
to call "real functions".  

One another thing: how does WineLib handle the situation when one DLL
(let's say foo.dll) calls LoadLibrary() on other DLL (bar.dll)?  Do I
have to create both foo.so and bar.so "glue libs"?


I will be grateful for just any advice.


Thanks in advance,
       Peter

Reply via email to