Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com X-Envelope-Sender-Is: Andrej DOT Borsenkow AT mow DOT siemens DOT ru (at relayer goliath.siemens.de) From: "Andrej Borsenkow" To: "Heribert Dahms" , 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 AT sourceware DOT cygnus DOT com