Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Wrapping a .dll under windows with SWIG

118 views
Skip to first unread message

Ben C

unread,
Nov 1, 2002, 1:26:12 AM11/1/02
to
Hi there,

I want to wrap a .dll under windows and have access to it's functions
etc. The problem is that all I have is the .dll and header file ... no
source ... and as all the examples that I have seen for swig seem to
need the original source ... I was wondering if it is still possible
to get access to the functions stored in the dll? Would anyone be able
to point me in the write direction, docs examples etc if this can be
done at all?

thanks in advance

Ben C

Leazen

unread,
Nov 1, 2002, 10:25:40 AM11/1/02
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You could use calldll to make the function calls.
You can get it at http://www.nightmare.com/~rushing/dynwin/index.html.

Leazen

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE9wpzmhcKLjUu3XMkRAuz0AJ9TSRc7saEs+AYf2XwZXE4mGESeSQCgsR/R
o3UV9hWZkfjvEcEKMUvyFjM=
=50Zh
-----END PGP SIGNATURE-----


Pete Shinners

unread,
Nov 1, 2002, 12:04:48 PM11/1/02
to

sorry if this is no help at all. I believe there are tools to produce a
.LIB file from a .DLL. I think that is all you should need. Then the
generated SWIG code could be properly linked the the LIB/DLL. Hopefully
that's all it takes, unfortunately you are on your own for figuring out the
DLL to LIB thing.

Les Schaffer

unread,
Nov 1, 2002, 12:52:28 PM11/1/02
to
Ben C wrote:

> Hi there,
>
> I want to wrap a .dll under windows and have access to it's functions
> etc. The problem is that all I have is the .dll and header file ... no
> source ...

i've successfully wrapped DLL files sans .lib files, by using function
pointer table and LoadLibrary() / GetProcAddress().

see the swig stuff for the PyGoldMine library at:

http://sourceforge.net/projects/pygoldmine/
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/pygoldmine/PyGoldMine/SWIG/
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/pygoldmine/PyGoldMine/SWIG/gm5s32.i?rev=1.1&content-type=text/vnd.viewcvs-markup


Les Schaffer

Ben C

unread,
Nov 2, 2002, 6:55:44 AM11/2/02
to
Hi,

I decided to give calldll/windll a go for starters

thanks

Ben

0 new messages