Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer goliath.siemens.de)
From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: "Heribert Dahms" <heribert_dahms@icon-gmbh.de>,
        <cygwin@sourceware.cygnus.com>
Subject: RE: Accessing exported variables in DLL with dlsym().
Date: Fri, 7 Jul 2000 11:56:58 +0400
Message-ID: <000201bfe7e8$eccc8ac0$21c9ca95@mow.siemens.ru>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="koi8-r"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Importance: Normal
In-Reply-To: <99B82AA9708ED0119B55006097125A00363ED0@ifk63.mach.uni-karlsruhe.de>


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

