OT: Quiet dependency walker?

Does anyone know of a program or DLL that will do essentially what Depends
does, but return an encoded result of something like “OK / Missing DLL /
Missing Entry Point?”

I’m tired of distributing programs that don’t run on some antique version of
Win95 or NT 4 that has never had a service pack applied, and I end up with a
missing entry point in mfc42.dll or some such, and of course it is MY fault
because I shipped a BROKEN program.

I’d like a tool I can run as part of the installer so I can crank out a
message that says “Stupid youk – update this system to something in the
last century if you expect new programs to run!”, and then abort the
install.

Yes, I know I can just copy all the system DLLs into the bogus target
system, after a few hundred lines of code to try to predict which files are
actually older than the files I ship with the product. And sometimes this
works. And sometimes the user ends up having to reinstall an upgrade of
Win95 (from Win 3.0) on a 386SX-16 as a result of copying one of those
files, and complains that I broke a perfectly good system that has never had
a problem.

I’m tired of doing that. I just want to be able to tell them their antique
boatanchor needs to be professionally updated by a trip to windowsupdate and
be done with it. But I only want to tell them that if my program won’t run;
not just because they ought to.

Loren

(Rant off.)

IIRC, depends.exe was originally from Matt Pietrek. And I’ve seen example
code in some Microsoft Journal, when he was almost a regular contributor. It
uses toolhelp library. I would suggest looking at the Msj archieve for
example to start with !!!

-prokash

----- Original Message -----
From: “Loren Wilton”
To: “Windows System Software Devs Interest List”
Sent: Thursday, October 02, 2003 4:00 AM
Subject: [ntdev] OT: Quiet dependency walker?

> Does anyone know of a program or DLL that will do essentially what Depends
> does, but return an encoded result of something like “OK / Missing DLL /
> Missing Entry Point?”
>
> I’m tired of distributing programs that don’t run on some antique version
of
> Win95 or NT 4 that has never had a service pack applied, and I end up with
a
> missing entry point in mfc42.dll or some such, and of course it is MY
fault
> because I shipped a BROKEN program.
>
> I’d like a tool I can run as part of the installer so I can crank out a
> message that says “Stupid youk – update this system to something in the
> last century if you expect new programs to run!”, and then abort the
> install.
>
> Yes, I know I can just copy all the system DLLs into the bogus target
> system, after a few hundred lines of code to try to predict which files
are
> actually older than the files I ship with the product. And sometimes this
> works. And sometimes the user ends up having to reinstall an upgrade of
> Win95 (from Win 3.0) on a 386SX-16 as a result of copying one of those
> files, and complains that I broke a perfectly good system that has never
had
> a problem.
>
> I’m tired of doing that. I just want to be able to tell them their
antique
> boatanchor needs to be professionally updated by a trip to windowsupdate
and
> be done with it. But I only want to tell them that if my program won’t
run;
> not just because they ought to.
>
> Loren
>
> (Rant off.)
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@garlic.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

This might be bit more specific, than previous resp…

http://www.microsoft.com/msj/0297/hood/hood0297.aspx

It is Feb, 1997 Msj article …

-prokash
----- Original Message -----
From: “Loren Wilton”
To: “Windows System Software Devs Interest List”
Sent: Thursday, October 02, 2003 4:00 AM
Subject: [ntdev] OT: Quiet dependency walker?

> Does anyone know of a program or DLL that will do essentially what Depends
> does, but return an encoded result of something like “OK / Missing DLL /
> Missing Entry Point?”
>
> I’m tired of distributing programs that don’t run on some antique version
of
> Win95 or NT 4 that has never had a service pack applied, and I end up with
a
> missing entry point in mfc42.dll or some such, and of course it is MY
fault
> because I shipped a BROKEN program.
>
> I’d like a tool I can run as part of the installer so I can crank out a
> message that says “Stupid youk – update this system to something in the
> last century if you expect new programs to run!”, and then abort the
> install.
>
> Yes, I know I can just copy all the system DLLs into the bogus target
> system, after a few hundred lines of code to try to predict which files
are
> actually older than the files I ship with the product. And sometimes this
> works. And sometimes the user ends up having to reinstall an upgrade of
> Win95 (from Win 3.0) on a 386SX-16 as a result of copying one of those
> files, and complains that I broke a perfectly good system that has never
had
> a problem.
>
> I’m tired of doing that. I just want to be able to tell them their
antique
> boatanchor needs to be professionally updated by a trip to windowsupdate
and
> be done with it. But I only want to tell them that if my program won’t
run;
> not just because they ought to.
>
> Loren
>
> (Rant off.)
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@garlic.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

VERY nice!!! THANK YOU!

Loren

----- Original Message -----
From: “Prokash Sinha”
To: “Windows System Software Devs Interest List”
Sent: Thursday, October 02, 2003 8:07 AM
Subject: [ntdev] Re: OT: Quiet dependency walker?

> This might be bit more specific, than previous resp…
>
> http://www.microsoft.com/msj/0297/hood/hood0297.aspx
>
> It is Feb, 1997 Msj article …
>
> -prokash

For a while I thought my 2k memory became single ported, now it seems like
still it is dual ported once a while(simlutanious r/w) …

BTW, U are very wellcome.

-prokash
----- Original Message -----
From: “Loren Wilton”
To: “Windows System Software Devs Interest List”
Sent: Thursday, October 02, 2003 6:03 PM
Subject: [ntdev] Re: OT: Quiet dependency walker?

> VERY nice!!! THANK YOU!
>
> Loren
>
> ----- Original Message -----
> From: “Prokash Sinha”
> To: “Windows System Software Devs Interest List”
> Sent: Thursday, October 02, 2003 8:07 AM
> Subject: [ntdev] Re: OT: Quiet dependency walker?
>
>
> > This might be bit more specific, than previous resp…
> >
> > http://www.microsoft.com/msj/0297/hood/hood0297.aspx
> >
> > It is Feb, 1997 Msj article …
> >
> > -prokash
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@garlic.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

I believe Steve Miller would disagree with you. Steve wrote
depends.exe, and depends.exe is shipped as part of MSVC / Visual Studio.
Matt’s a fine guy, but he didn’t write that dependency walker. (Maybe
he wrote a different one – I don’t know.)

Depends.exe has many command-line options, and a console mode. In
console mode, it will interpret and act on command-line arguments, print
the result, then exit. You may be able to use this. However, this may
require shipping around a copy of depends.exe with your code, and I
don’t think that’s kosher. I know it’s a long shot, but try asking
Microsoft if you can do this – after all, you’re trying to reduce
install problems on their own products.

– arlie

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Prokash Sinha
Sent: Thursday, October 02, 2003 10:21 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: OT: Quiet dependency walker?

IIRC, depends.exe was originally from Matt Pietrek. And I’ve seen
example code in some Microsoft Journal, when he was almost a regular
contributor. It uses toolhelp library. I would suggest looking at the
Msj archieve for example to start with !!!

-prokash

----- Original Message -----
From: “Loren Wilton”
To: “Windows System Software Devs Interest List”
Sent: Thursday, October 02, 2003 4:00 AM
Subject: [ntdev] OT: Quiet dependency walker?

> Does anyone know of a program or DLL that will do essentially what
> Depends does, but return an encoded result of something like “OK /
> Missing DLL / Missing Entry Point?”
>
> I’m tired of distributing programs that don’t run on some antique
> version
of
> Win95 or NT 4 that has never had a service pack applied, and I end up
> with
a
> missing entry point in mfc42.dll or some such, and of course it is MY
fault
> because I shipped a BROKEN program.
>
> I’d like a tool I can run as part of the installer so I can crank out
> a message that says “Stupid youk – update this system to something in

> the last century if you expect new programs to run!”, and then abort
> the install.
>
> Yes, I know I can just copy all the system DLLs into the bogus target
> system, after a few hundred lines of code to try to predict which
> files
are
> actually older than the files I ship with the product. And sometimes
> this works. And sometimes the user ends up having to reinstall an
> upgrade of Win95 (from Win 3.0) on a 386SX-16 as a result of copying
> one of those files, and complains that I broke a perfectly good system

> that has never
had
> a problem.
>
> I’m tired of doing that. I just want to be able to tell them their
antique
> boatanchor needs to be professionally updated by a trip to
> windowsupdate
and
> be done with it. But I only want to tell them that if my program
> won’t
run;
> not just because they ought to.
>
> Loren
>
> (Rant off.)
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@garlic.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com
>
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@sublinear.org To
unsubscribe send a blank email to xxxxx@lists.osr.com

Arlie,
U r absolutely right I suppose. After I did hit the send button on the prev.
note, I thought that it was a gross misstatement. What I meant to say though
was that I’ve seen an article by Matt that had code also …

This reminds me of one song during the early 80’s

“One thing leads to another” … say what U mean …

-prokash
----- Original Message -----
From: “Arlie Davis”
To: “Windows System Software Devs Interest List”
Sent: Friday, October 03, 2003 6:41 AM
Subject: [ntdev] Re: OT: Quiet dependency walker?

> I believe Steve Miller would disagree with you. Steve wrote
> depends.exe, and depends.exe is shipped as part of MSVC / Visual Studio.
> Matt’s a fine guy, but he didn’t write that dependency walker. (Maybe
> he wrote a different one – I don’t know.)
>
> Depends.exe has many command-line options, and a console mode. In
> console mode, it will interpret and act on command-line arguments, print
> the result, then exit. You may be able to use this. However, this may
> require shipping around a copy of depends.exe with your code, and I
> don’t think that’s kosher. I know it’s a long shot, but try asking
> Microsoft if you can do this – after all, you’re trying to reduce
> install problems on their own products.
>
> – arlie
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Prokash Sinha
> Sent: Thursday, October 02, 2003 10:21 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Re: OT: Quiet dependency walker?
>
>
> IIRC, depends.exe was originally from Matt Pietrek. And I’ve seen
> example code in some Microsoft Journal, when he was almost a regular
> contributor. It uses toolhelp library. I would suggest looking at the
> Msj archieve for example to start with !!!
>
> -prokash
>
> ----- Original Message -----
> From: “Loren Wilton”
> To: “Windows System Software Devs Interest List”
> Sent: Thursday, October 02, 2003 4:00 AM
> Subject: [ntdev] OT: Quiet dependency walker?
>
>
> > Does anyone know of a program or DLL that will do essentially what
> > Depends does, but return an encoded result of something like “OK /
> > Missing DLL / Missing Entry Point?”
> >
> > I’m tired of distributing programs that don’t run on some antique
> > version
> of
> > Win95 or NT 4 that has never had a service pack applied, and I end up
> > with
> a
> > missing entry point in mfc42.dll or some such, and of course it is MY
> fault
> > because I shipped a BROKEN program.
> >
> > I’d like a tool I can run as part of the installer so I can crank out
> > a message that says “Stupid youk – update this system to something in
>
> > the last century if you expect new programs to run!”, and then abort
> > the install.
> >
> > Yes, I know I can just copy all the system DLLs into the bogus target
> > system, after a few hundred lines of code to try to predict which
> > files
> are
> > actually older than the files I ship with the product. And sometimes
> > this works. And sometimes the user ends up having to reinstall an
> > upgrade of Win95 (from Win 3.0) on a 386SX-16 as a result of copying
> > one of those files, and complains that I broke a perfectly good system
>
> > that has never
> had
> > a problem.
> >
> > I’m tired of doing that. I just want to be able to tell them their
> antique
> > boatanchor needs to be professionally updated by a trip to
> > windowsupdate
> and
> > be done with it. But I only want to tell them that if my program
> > won’t
> run;
> > not just because they ought to.
> >
> > Loren
> >
> > (Rant off.)
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@garlic.com To
> > unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@sublinear.org To
> unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@garlic.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

Thanks for the info on this area, all. I haven’t found any command line
switches to either the MS Depends or the one in MSJ (also called Depends)
that will do more or less what I want, without writing a huge amount of
filtering logic on the text output. However, the one in the MSJ came with
source, and it should be a simple matter to hack that code into a DLL that
can be called from Vise to do exactly what I want. So far as I know the
example code in the MSJ article should permit modification and reuse of the
code or code parts. Probably easier than starting from scratch with
toolhelp, which is the only real alternative I see.

Loren

----- Original Message -----
From: “Prokash Sinha”
To: “Windows System Software Devs Interest List”
Sent: Friday, October 03, 2003 7:07 AM
Subject: [ntdev] Re: OT: Quiet dependency walker?

> Arlie,
> U r absolutely right I suppose. After I did hit the send button on the
prev.
> note, I thought that it was a gross misstatement. What I meant to say
though
> was that I’ve seen an article by Matt that had code also …
>
> This reminds me of one song during the early 80’s
>
> “One thing leads to another” … say what U mean …
>
> -prokash
> ----- Original Message -----
> From: “Arlie Davis”
> To: “Windows System Software Devs Interest List”
> Sent: Friday, October 03, 2003 6:41 AM
> Subject: [ntdev] Re: OT: Quiet dependency walker?
>
>
> > I believe Steve Miller would disagree with you. Steve wrote
> > depends.exe, and depends.exe is shipped as part of MSVC / Visual Studio.
> > Matt’s a fine guy, but he didn’t write that dependency walker. (Maybe
> > he wrote a different one – I don’t know.)
> >
> > Depends.exe has many command-line options, and a console mode. In
> > console mode, it will interpret and act on command-line arguments, print
> > the result, then exit. You may be able to use this. However, this may
> > require shipping around a copy of depends.exe with your code, and I
> > don’t think that’s kosher. I know it’s a long shot, but try asking
> > Microsoft if you can do this – after all, you’re trying to reduce
> > install problems on their own products.
> >
> > – arlie
> >
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Prokash Sinha
> > Sent: Thursday, October 02, 2003 10:21 AM
> > To: Windows System Software Devs Interest List
> > Subject: [ntdev] Re: OT: Quiet dependency walker?
> >
> >
> > IIRC, depends.exe was originally from Matt Pietrek. And I’ve seen
> > example code in some Microsoft Journal, when he was almost a regular
> > contributor. It uses toolhelp library. I would suggest looking at the
> > Msj archieve for example to start with !!!
> >
> > -prokash
> >
> > ----- Original Message -----
> > From: “Loren Wilton”
> > To: “Windows System Software Devs Interest List”
> > Sent: Thursday, October 02, 2003 4:00 AM
> > Subject: [ntdev] OT: Quiet dependency walker?
> >
> >
> > > Does anyone know of a program or DLL that will do essentially what
> > > Depends does, but return an encoded result of something like “OK /
> > > Missing DLL / Missing Entry Point?”
> > >
> > > I’m tired of distributing programs that don’t run on some antique
> > > version
> > of
> > > Win95 or NT 4 that has never had a service pack applied, and I end up
> > > with
> > a
> > > missing entry point in mfc42.dll or some such, and of course it is MY
> > fault
> > > because I shipped a BROKEN program.
> > >
> > > I’d like a tool I can run as part of the installer so I can crank out
> > > a message that says “Stupid youk – update this system to something in
> >
> > > the last century if you expect new programs to run!”, and then abort
> > > the install.
> > >
> > > Yes, I know I can just copy all the system DLLs into the bogus target
> > > system, after a few hundred lines of code to try to predict which
> > > files
> > are
> > > actually older than the files I ship with the product. And sometimes
> > > this works. And sometimes the user ends up having to reinstall an
> > > upgrade of Win95 (from Win 3.0) on a 386SX-16 as a result of copying
> > > one of those files, and complains that I broke a perfectly good system
> >
> > > that has never
> > had
> > > a problem.
> > >
> > > I’m tired of doing that. I just want to be able to tell them their
> > antique
> > > boatanchor needs to be professionally updated by a trip to
> > > windowsupdate
> > and
> > > be done with it. But I only want to tell them that if my program
> > > won’t
> > run;
> > > not just because they ought to.
> > >
> > > Loren
> > >
> > > (Rant off.)

Loren,

In the past when a client of mine did not want to have VxD for their code
(win3.1) to work with win95, and full fledge driver for nt,instead a VDD…
I had email conversation with Matt, he encouraged to use his idea and code
from one of his great book “Sys programing secrets”, he is just a hell of
nice guy to put it mildly, so I dont think there is any right violation,
also the code up in Msj server does not have any copywrong stmt…

-prokash
----- Original Message -----
From: “Loren Wilton”
To: “Windows System Software Devs Interest List”
Sent: Friday, October 03, 2003 7:26 AM
Subject: [ntdev] Re: OT: Quiet dependency walker?

> Thanks for the info on this area, all. I haven’t found any command line
> switches to either the MS Depends or the one in MSJ (also called Depends)
> that will do more or less what I want, without writing a huge amount of
> filtering logic on the text output. However, the one in the MSJ came with
> source, and it should be a simple matter to hack that code into a DLL that
> can be called from Vise to do exactly what I want. So far as I know the
> example code in the MSJ article should permit modification and reuse of
the
> code or code parts. Probably easier than starting from scratch with
> toolhelp, which is the only real alternative I see.
>
> Loren
>
>
> ----- Original Message -----
> From: “Prokash Sinha”
> To: “Windows System Software Devs Interest List”
> Sent: Friday, October 03, 2003 7:07 AM
> Subject: [ntdev] Re: OT: Quiet dependency walker?
>
>
> > Arlie,
> > U r absolutely right I suppose. After I did hit the send button on the
> prev.
> > note, I thought that it was a gross misstatement. What I meant to say
> though
> > was that I’ve seen an article by Matt that had code also …
> >
> > This reminds me of one song during the early 80’s
> >
> > “One thing leads to another” … say what U mean …
> >
> > -prokash
> > ----- Original Message -----
> > From: “Arlie Davis”
> > To: “Windows System Software Devs Interest List”
> > Sent: Friday, October 03, 2003 6:41 AM
> > Subject: [ntdev] Re: OT: Quiet dependency walker?
> >
> >
> > > I believe Steve Miller would disagree with you. Steve wrote
> > > depends.exe, and depends.exe is shipped as part of MSVC / Visual
Studio.
> > > Matt’s a fine guy, but he didn’t write that dependency walker. (Maybe
> > > he wrote a different one – I don’t know.)
> > >
> > > Depends.exe has many command-line options, and a console mode. In
> > > console mode, it will interpret and act on command-line arguments,
print
> > > the result, then exit. You may be able to use this. However, this
may
> > > require shipping around a copy of depends.exe with your code, and I
> > > don’t think that’s kosher. I know it’s a long shot, but try asking
> > > Microsoft if you can do this – after all, you’re trying to reduce
> > > install problems on their own products.
> > >
> > > – arlie
> > >
> > >
> > > -----Original Message-----
> > > From: xxxxx@lists.osr.com
> > > [mailto:xxxxx@lists.osr.com] On Behalf Of Prokash Sinha
> > > Sent: Thursday, October 02, 2003 10:21 AM
> > > To: Windows System Software Devs Interest List
> > > Subject: [ntdev] Re: OT: Quiet dependency walker?
> > >
> > >
> > > IIRC, depends.exe was originally from Matt Pietrek. And I’ve seen
> > > example code in some Microsoft Journal, when he was almost a regular
> > > contributor. It uses toolhelp library. I would suggest looking at the
> > > Msj archieve for example to start with !!!
> > >
> > > -prokash
> > >
> > > ----- Original Message -----
> > > From: “Loren Wilton”
> > > To: “Windows System Software Devs Interest List”
> > > Sent: Thursday, October 02, 2003 4:00 AM
> > > Subject: [ntdev] OT: Quiet dependency walker?
> > >
> > >
> > > > Does anyone know of a program or DLL that will do essentially what
> > > > Depends does, but return an encoded result of something like “OK /
> > > > Missing DLL / Missing Entry Point?”
> > > >
> > > > I’m tired of distributing programs that don’t run on some antique
> > > > version
> > > of
> > > > Win95 or NT 4 that has never had a service pack applied, and I end
up
> > > > with
> > > a
> > > > missing entry point in mfc42.dll or some such, and of course it is
MY
> > > fault
> > > > because I shipped a BROKEN program.
> > > >
> > > > I’d like a tool I can run as part of the installer so I can crank
out
> > > > a message that says “Stupid youk – update this system to something
in
> > >
> > > > the last century if you expect new programs to run!”, and then abort
> > > > the install.
> > > >
> > > > Yes, I know I can just copy all the system DLLs into the bogus
target
> > > > system, after a few hundred lines of code to try to predict which
> > > > files
> > > are
> > > > actually older than the files I ship with the product. And
sometimes
> > > > this works. And sometimes the user ends up having to reinstall an
> > > > upgrade of Win95 (from Win 3.0) on a 386SX-16 as a result of copying
> > > > one of those files, and complains that I broke a perfectly good
system
> > >
> > > > that has never
> > > had
> > > > a problem.
> > > >
> > > > I’m tired of doing that. I just want to be able to tell them their
> > > antique
> > > > boatanchor needs to be professionally updated by a trip to
> > > > windowsupdate
> > > and
> > > > be done with it. But I only want to tell them that if my program
> > > > won’t
> > > run;
> > > > not just because they ought to.
> > > >
> > > > Loren
> > > >
> > > > (Rant off.)
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@garlic.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

“link -dump -imports ” gives much of the same information you
get from depends. It’s not too hard to parse the text.

It also isn’t too hard to write an app which walks the import table
itself.

Some good references are:
“Microsoft Portable Executable and Common Object File Format
Specification” on microsoft.com
Several aritcles in MSDN about PE files
constants & structs in winnt.h

Imagehlp.h & imagehlp.dll may also have some useful stuff for ya.

Enjoy

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Loren Wilton
Sent: Friday, October 03, 2003 7:27 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: OT: Quiet dependency walker?

Thanks for the info on this area, all. I haven’t found any command line
switches to either the MS Depends or the one in MSJ (also called
Depends) that will do more or less what I want, without writing a huge
amount of filtering logic on the text output. However, the one in the
MSJ came with source, and it should be a simple matter to hack that code
into a DLL that can be called from Vise to do exactly what I want. So
far as I know the example code in the MSJ article should permit
modification and reuse of the code or code parts. Probably easier than
starting from scratch with toolhelp, which is the only real alternative
I see.

Loren

----- Original Message -----
From: “Prokash Sinha”
To: “Windows System Software Devs Interest List”
Sent: Friday, October 03, 2003 7:07 AM
Subject: [ntdev] Re: OT: Quiet dependency walker?

> Arlie,
> U r absolutely right I suppose. After I did hit the send button on the
prev.
> note, I thought that it was a gross misstatement. What I meant to say
though
> was that I’ve seen an article by Matt that had code also …
>
> This reminds me of one song during the early 80’s
>
> “One thing leads to another” … say what U mean …
>
> -prokash
> ----- Original Message -----
> From: “Arlie Davis”
> To: “Windows System Software Devs Interest List”
> Sent: Friday, October 03, 2003 6:41 AM
> Subject: [ntdev] Re: OT: Quiet dependency walker?
>
>
> > I believe Steve Miller would disagree with you. Steve wrote
> > depends.exe, and depends.exe is shipped as part of MSVC / Visual
Studio.
> > Matt’s a fine guy, but he didn’t write that dependency walker.
(Maybe
> > he wrote a different one – I don’t know.)
> >
> > Depends.exe has many command-line options, and a console mode. In
> > console mode, it will interpret and act on command-line arguments,
print
> > the result, then exit. You may be able to use this. However, this
may
> > require shipping around a copy of depends.exe with your code, and I
> > don’t think that’s kosher. I know it’s a long shot, but try asking
> > Microsoft if you can do this – after all, you’re trying to reduce
> > install problems on their own products.
> >
> > – arlie
> >
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Prokash Sinha
> > Sent: Thursday, October 02, 2003 10:21 AM
> > To: Windows System Software Devs Interest List
> > Subject: [ntdev] Re: OT: Quiet dependency walker?
> >
> >
> > IIRC, depends.exe was originally from Matt Pietrek. And I’ve seen
> > example code in some Microsoft Journal, when he was almost a regular
> > contributor. It uses toolhelp library. I would suggest looking at
the
> > Msj archieve for example to start with !!!
> >
> > -prokash
> >
> > ----- Original Message -----
> > From: “Loren Wilton”
> > To: “Windows System Software Devs Interest List”

> > Sent: Thursday, October 02, 2003 4:00 AM
> > Subject: [ntdev] OT: Quiet dependency walker?
> >
> >
> > > Does anyone know of a program or DLL that will do essentially what
> > > Depends does, but return an encoded result of something like “OK /
> > > Missing DLL / Missing Entry Point?”
> > >
> > > I’m tired of distributing programs that don’t run on some antique
> > > version
> > of
> > > Win95 or NT 4 that has never had a service pack applied, and I end
up
> > > with
> > a
> > > missing entry point in mfc42.dll or some such, and of course it is
MY
> > fault
> > > because I shipped a BROKEN program.
> > >
> > > I’d like a tool I can run as part of the installer so I can crank
out
> > > a message that says “Stupid youk – update this system to
something in
> >
> > > the last century if you expect new programs to run!”, and then
abort
> > > the install.
> > >
> > > Yes, I know I can just copy all the system DLLs into the bogus
target
> > > system, after a few hundred lines of code to try to predict which
> > > files
> > are
> > > actually older than the files I ship with the product. And
sometimes
> > > this works. And sometimes the user ends up having to reinstall an
> > > upgrade of Win95 (from Win 3.0) on a 386SX-16 as a result of
copying
> > > one of those files, and complains that I broke a perfectly good
system
> >
> > > that has never
> > had
> > > a problem.
> > >
> > > I’m tired of doing that. I just want to be able to tell them
their
> > antique
> > > boatanchor needs to be professionally updated by a trip to
> > > windowsupdate
> > and
> > > be done with it. But I only want to tell them that if my program
> > > won’t
> > run;
> > > not just because they ought to.
> > >
> > > Loren
> > >
> > > (Rant off.)


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

> Some good references are:

“Microsoft Portable Executable and Common Object File Format
Specification” on microsoft.com

Too bad it is not in MSDN Library since Jan 2002.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

Yes, but at least it is available on the web
http://www.microsoft.com/whdc/hwdev/hardware/pecoff.mspx

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Friday, October 03, 2003 12:34 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: OT: Quiet dependency walker?

Some good references are:
“Microsoft Portable Executable and Common Object File Format
Specification” on microsoft.com

Too bad it is not in MSDN Library since Jan 2002.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com

Yes, thanks, got it.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Nathan Nesbit”
To: “Windows System Software Devs Interest List”
Sent: Friday, October 03, 2003 11:58 PM
Subject: [ntdev] Re: OT: Quiet dependency walker?

> Yes, but at least it is available on the web
> http://www.microsoft.com/whdc/hwdev/hardware/pecoff.mspx
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
> Sent: Friday, October 03, 2003 12:34 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Re: OT: Quiet dependency walker?
>
> > Some good references are:
> > “Microsoft Portable Executable and Common Object File Format
> > Specification” on microsoft.com
>
> Too bad it is not in MSDN Library since Jan 2002.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@microsoft.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

Loren,

If your program has to work on archaic platforms, wouldn’t it be easier to
just statically link it? That would simplify your install program, too.
And there’s no chance of messing up a working system.

-Dan

----- Original Message -----

Subject: OT: Quiet dependency walker?
From: “Loren Wilton”
> Date: Thu, 2 Oct 2003 04:00:55 -0700
> X-Message-Number: 6
>
> Does anyone know of a program or DLL that will do essentially what Depends
> does, but return an encoded result of something like “OK / Missing DLL /
> Missing Entry Point?”
>
> I’m tired of distributing programs that don’t run on some antique version
of
> Win95 or NT 4 that has never had a service pack applied, and I end up with
a
> missing entry point in mfc42.dll or some such, and of course it is MY
fault
> because I shipped a BROKEN program.
>
> I’d like a tool I can run as part of the installer so I can crank out a
> message that says “Stupid youk – update this system to something in the
> last century if you expect new programs to run!”, and then abort the
> install.
>
> Yes, I know I can just copy all the system DLLs into the bogus target
> system, after a few hundred lines of code to try to predict which files
are
> actually older than the files I ship with the product. And sometimes this
> works. And sometimes the user ends up having to reinstall an upgrade of
> Win95 (from Win 3.0) on a 386SX-16 as a result of copying one of those
> files, and complains that I broke a perfectly good system that has never
had
> a problem.
>
> I’m tired of doing that. I just want to be able to tell them their
antique
> boatanchor needs to be professionally updated by a trip to windowsupdate
and
> be done with it. But I only want to tell them that if my program won’t
run;
> not just because they ought to.
>
> Loren
>
> (Rant off.)

The old microsoft model was to always ship current versions of these DLLs
and replace the ones in System32, based on version resource comparison. All
the common installer platforms contain support for these.

The new microsoft model is ‘disk space is cheap, just ship your dependent
dlls co-located with your own code.’

Either way, this is your responsibility and your bug.

> If your program has to work on archaic platforms, wouldn’t it be easier to

just statically link it? That would simplify your install program, too.
And there’s no chance of messing up a working system.

Static linking has been the solution up to this point, and in general,
although not always, it has worked well.

The problem is that the program talks to what the system thinks are
old-style NT 4 DLL MIDI drivers. Some of these actually speak MIDI on the
outside. Some translate to serial ports. Or link down to kernel drivers to
deal with funny hardware on the parallel port. But the problem children are
the MIDI drivers that actualy speak UDP. These end up linked to the DLL
version of the CRT stuff. And now I have malloc/calloc and the like running
as both static and DLL and getting confused as heck on XP. Works on NT 4
and W2K though. But not XP.

After a day of madly figuring out how to debug “program failed to
initialize” to support a guy with a show opening that night on the other
side of the planet from here, and finally remembering that I had basically
solved this once before about 4 years ago, I finally decided that it was
time for the static linking to go bye bye.

The problem with loading the DLL version, from memory of a few years ago,
tended to occur on versions of NT 4 that hadn’t had IE upgraded to something
reasonable, but were just running original install disks up to about sp3,
sans IE upgrade. The MFC DLLs tend to be missing a bunch of high-numbered
numeric entry points that VC with any of its service packs tend to generate.
An IE install would load new versions of MFCxxx.DLL and fix the problem.

Hopefully those boatanchors should be in fairly short supply these days,
although I’d bet that I probably still have about 10 systems out there on
cruise ships running on that sort of thing. Hopefully though the next time
they do a show upgrade and install the latest version they may have W2K
disks along and will be able to upgrade the OS at the same time if needed.

After a bit of thinking, I suspect I don’t even have to finish hacking the
depends code. I think I should be able to have the installer just
LoadLibrary my exe and check the error return value. If it doesn’t load, I
don’t complete the install. I’ll have to test this to make sure I don’t get
stuck on a stupid popup message rather than an error response; but hopefully
it will work. Hopefully the LoadLibrary on an exe won’t result in it
starting to execute, I’ve never tried that and the docs aren’t real clear on
that point.

Loren