RE: Lin32Lib?

new topic     » goto parent     » topic index » view thread      » older message » newer message

> -----Original Message-----
> From: Irv Mullins [mailto:irvm at ellijay.com]
 
> Most of the good packages, like QT, are written in C++, which 
> makes interfacing
> with them very difficult.  

Actually, I don't think that it would be as difficult as you might think
(not that it'll be simple).  Working with COM has given me a new insight on
interfacing with C++, since that's effectively what happens with COM.  Also,
in working with COM, I think I might have solved some other problems that
might get in your way.

Here's what I think you'll need to do:
- Get a hold of the constructor for an object.  It should return a pointer
to the object.
- Wrap the member functions just like you would with C.
- Pass the pointer to the object as the first argument in any function call
(C++ does this implicitly).

I suspect that the functions will have to be loaded by ordinal (C++ name
decoration isn't much to look at), so you'll probably need to get your hands
on a lib file or some other kind of documentation on the lib.  This could be
the most difficult part, except that I guess since this is linux, you ought
to be able to get a look at the full source, right?

And then you'll probably need to load the .so's manually (since
open_dll/define_c_func don't seem to work by ordinal).  So you'll probably
have to call them by pointer (no problem, since fptr.e in EuCOM should work
in linux :).

Matt Lewis

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu