This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
RE: Accessing exported variables in DLL with dlsym().
- To: "Heribert Dahms" <heribert_dahms at icon-gmbh dot de>, <cygwin at sourceware dot cygnus dot com>
- Subject: RE: Accessing exported variables in DLL with dlsym().
- From: "Andrej Borsenkow" <Andrej dot Borsenkow at mow dot siemens dot ru>
- Date: Fri, 7 Jul 2000 11:56:58 +0400
Sorry, folks, it was my fault. I went blind :-(((
>
> if you can rebuild the DLL from source, you may do what TCL/TK
> did years ago due to this Win* deficiency: Add simple wrapper
> functions which just return the pointer to one of your variables.
>
> > foo() {
> > char *bar;
^^^^^
nonsense; should be ``char **bar'' and
> > void *libbar;
> >
> > libbar = dlopen ("libbar.dll", 0);
> > bar = dlsym (libbar, "bar");
> > puts (bar);
of course ``puts (*bar);''
A beg your pardon for this noice.
BTW it looks, like it works even if variable is not declared with
dllexport ...
-andrej
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com