delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/04/27/22:01:26

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
X-Authentication-Warning: modi.xraylith.wisc.edu: khan owned process doing -bs
Date: Tue, 27 Apr 1999 20:59:29 -0500 (CDT)
From: Mumit Khan <khan AT xraylith DOT wisc DOT edu>
To: Eugene Kanter <eugene AT bgs DOT com>
cc: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: putenv does not put env into win32?
In-Reply-To: <372642B7.2E20428B@bgs.com>
Message-ID: <Pine.SUN.3.93.990427205504.16286B-101000@modi.xraylith.wisc.edu>
MIME-Version: 1.0

--1915750185-1955016478-925264769=:16286
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Tue, 27 Apr 1999, Eugene Kanter wrote:

> 
> I did not find where it says to use dlopen. I replaced LoadLibrary with
> dlopen and received the identical results. The advantage of using dlopen
> over LoadLibrary is that I did not have to convert Unix path to Windows
> path. I did not look at the actuall cygwin code (where?). I guess dlopen
> calls LoadLibrary eventually. However I must call CoFreeLibrary() at the
> end (OLE requires) so I guess I must use LoadLibrary.
> 
> Still in magic why mingw32 application allows me to change PATH so all
> DLLs could be loaded and cygwin does not. You mentinoed that putenv
> modifies only current process environment. Which process does the dll
> loader belongs to?
> 
> I solved the problem eventually by doing chdir(). However what if more
> then one directory is required to be added to the path??

Hi Eugene,

I haven't followed the thread, but adding to PATH using putenv() should
and does work with B20.1, at least on NT where I tested it. I'm attaching
a small testcase. Here's what it does when you run make:
  
  - create a subdirectory called "foo"
  - create a small DLL in "foo"
  - create a dll caller that uses dlopen after adding "foo" to PATH.

Please let me know if this helps (or if it doesn't work).

This is code from the time when I was testing dlopen implementation prior
to b20.1, so hopefully it's still working ... In theory, LoadLibrary
should work just as well.

There should be no issue for parent process and so on here, since PATH
belongs to the current, which is looking for the DLL.

Regards,
Mumit


--1915750185-1955016478-925264769=:16286
Content-Type: APPLICATION/octet-stream; name="dlopen-test.tar.gz"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine DOT SUN DOT 3 DOT 93 DOT 990427205929 DOT 16286C AT modi DOT xraylith DOT wisc DOT edu>
Content-Description: dlopen test code

H4sICCRnJjcAA2Rsb3Blbi10ZXN0LnRhcgDtV21P20gQ5mv3V8wZpNqAg/NG
ThRODYGjVGmDINL17jilxl4nezi2tXYCUel/v9ldmyzRcf2S0g+3j5AyO++z
M7tewjjNaOIWNC/2Nr4ToOV12m3YAKh32p789by6+K3gAex36vXWfrNVb6C4
0eh4G9D+XgnpmOWFzwE2bid+8l96dE75Ik3oS+T0ggi1/odxLIlaEKw1BnZ7
v9V6tv8Nz1v2v9lpobjVajQ3wFtrFs/gf97/TZYE8SykcMjSvODUn/5Clrwg
L8KY3egsVGLJWOfMEoZqtYnOC+MoSAQLeVES0gguh/2T0Vl/cNztk01ADkuo
zgSPbNIkZBEhLCmATH2WgC1In4+DXQgm2KZtpOd//uWQLwQA//b2IKfFLINi
QiHziwnMfc78m5hCniLTL0ANOGC4MJdqIeM0KFK+qKEDVQ0k9E5a29ZFd/ju
yHLeoKxi7hzBSb8/Ojm/XOFaB9YKZ0wLmsxLN8pLNlOsUqsWjDCm7UhZQDmH
w0OwPtI7mf4BWGJdeUQStyR+Q4RumuRFlS+e1MSfUgwkziy996dZTGtIi5io
PE9ZuC20RjjVIe7GUbUPdmla5bGretDv/vE7POj9kAmyCOyfND8OEQf2C1EH
t0ofBZynHGxnmbHSoPesALvuqPVX1bQgnRWyatxVKPOTZU/ovXL3mHblDpRl
sciomCUxFfY2izJHTkiZagbRLAkyrNWWojDOF1NZcOluF8R2jYTWCM0srURp
ud7qen4ci1591mO+hoinU8hxmGkI6c3fOIrw2SrLFo2RvoT9a+tJ/0XNcz+e
iV7a2ypfsJtqjqqYl3gYeKL0yllSNronlbaHll8JWbn/a+u9+RW+cf8DtDvV
/V9vNdoobjbanrn/XwLyrtUnVN25TF2xXM0Tg21gclx+dLoGa4Z+/j/4t/hZ
jtc+4t84//W2/v4TdL3l1dvm/L8Eht3Ls9MhflNY8+d9N1iM71jSbLik4pNe
D4Vbtlo74yAA0vv0SecFOzuke6Vz/Jz0fu13zwTTHTTAHZPexcUj57wG7kn5
pDq6trbsknauLUJKGvWiNCWkf1KaIdU/PxaEUBkOBn09It5gRZrGlWj0GMv1
c9TqXjkg7X677F6s2N1xP6tEmh29z1JeuPgRx0Xp3pWPLpmviOLo7uGavEJF
znBOKr1ez8EHMOCA4cMwl6V97H44lQlUNe+tvOCk1vD0aijfbOU/ZPSeqp0Z
HL+/UoJaSoSWxlGquGeY8wFM8TDjU7eMJMI6JS3MHPLqLQ0mKT4ZZsmjMRQp
vqepfCZzms/iIq9hS0pXB2gjtdxQyx8eHmB6u4wkeIRoUQ9KgUgUw8qF2Osy
neW243amsPX2iTrRUhaOHkuWnnAQhZdyRpb2Sy0pFXODroKY+gkW4fIpuJEe
ZtXkmR2Thjx6UuiPPr8GBgYGBgYGBgYGBgYGBgYGBgYGBgYG/4Z/AIBcvOAA
KAAA

--1915750185-1955016478-925264769=:16286
Content-Type: text/plain; charset=us-ascii

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
--1915750185-1955016478-925264769=:16286--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019