Re: Why on earth are there no VC++ 2005 SP1 redists on downloads.microsoft.com?
"Larry Smith" <no_spam@_nospam.com> wrote in message
news:%23tt%23XUqVHHA.5068@TK2MSFTNGP03.phx.gbl...
You don't get that far. When a load-time DLL isn't available, no user
code runs. Not a check for system requirements. Not a dialog box. The
dynamic linker just aborts CreateProcess.
In practice, compatibility problems don't occur that early for most apps.
This is vcredist we're discussing, i.e. the C runtime library. Since the
CRT contains the function that calls main or WinMain, I'd say it's "that
early". But since the compiler doesn't mark that DLL as delay-load, it
doesn't matter, the OS performs the check and will fail process startup
before any code executes in the context of the new process.
You can usually launch a message beforehand. If not (say, for an
implicitly loaded DLL that's either missing or might crash at start-up)
you can always get around it with a small launcher for instance (which
checks the minimum requirements and the launches the main app). There is
almost never a need for a program to crash at start-up however because of
this issue (with some cryptic message that makes your organization look
like it's operating out of the back of a truck)
The launcher is a good idea, if only because you're guaranteed that whatever
resources it uses are released and don't become part of your working set.
But it must be linked statically to avoid incurring the same problem itself,
which means that it should be very minimal, because every CRT function it
uses is (1) stored an extra time in your launcher exe, increasing the size
of the download and (2) forever locked in at the version you compiled with,
losing any chance of having a bugfix deployed through Windows Update.