Mail Archives: cygwin-developers/1998/11/17/05:48:02
On Tue, Nov 17, 1998 at 12:01:32AM -0600, Mumit Khan wrote:
>I remember Chris Faylor working on something similar, so perhaps Chris
>already has something? I did steal some code from Emacs/NT that did just
>that (maps the file into memory and looks at dependencies looking for
>some DLL), but there has to be faster way.
Wow, you've got a good memory. I believe that you gave me some code to
scan a binary for DLL information. I was going to use that as a method
for bypassing a lot of the argument and environment handling in spawn
when you know that you're starting a cygwin process.
I never did much with it because it seemed that it was probably too slow.
Offhand, I can't think of any way to find out if an executable is a
cygwin executable. One thing that springs to mind is that we could always
export one symbol from the executable and then use GetProcAddress to
attempt to load that symbol from the main module. If it fails, it's not
a cygwin executable.
I don't know how expensive this would be though.
--
cgf AT cygnus DOT com
http://www.cygnus.com/
- Raw text -