httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: [PATCH] Win32 device files
Date Sat, 05 Dec 1998 13:13:47 GMT

> Subj: RE: [PATCH] Win32 device files
> Paul Sutton writes...
> Part of the problem with supporting Windows is that there are lots of
> incompatibilities between different versions (95/NT), releases, service
> pack updates, MSIE versions, and all the other little packages and
> products which "upgrade" your "system" libraries (if Windows has such as
> concept). So this was probably true on some configuration somewhere, and
> it would be nice to find a list of all the differences between different
> versions of the standard DLL's somewhere (say on MS's site!) but I don't
> think there is one.

Maybe there is...

On the MSDN cd that comes with MSVC 6.0 there's a fair amount
of information about all the different versions of OS, MSIE,
the 'system' files and/or with/without Active Desktop, etc.
All the information on the cd is also online at Microsoft(tm).

As for the 'goodies' referred to this is usually nothing more
than some distribution replacing a dll or two with newer/older
versions and/or adding some registry entries.

The only really safe thing to do is 'check' the versions of
the dll's which are relevant to Apache at runtime and, if
need be, set some flags to take action based on version level.

Throughout the documentation on the cd the key is to watch for
little symbols that indicate the the 'version' number. It
indicates whether that programming element is implemented
in that version and/or later version(s) of the dll(s). If
no version number is specified then Microsoft(tm) says that
element is supposed to be in all versions of the .dll(s).

Proably the most concise information about any particular
'system' dll is found by searching the cd for 'DllGetVersion'.
Most places where this 'hits' there is a discussion of one
system .DLL or another ( shell32, kernel32, user32, advapi32, etc. ).

For example... the 'hit' on 'DllGetVersion' for shell32.dll
pops up a table something like this...

Version  Platform
4.00     Windows 95, Windows NT 4.0, Internet Explorer 3.0,
           and Internet Explorer 4.0 without Web Integrated Desktop.
4.71     Internet Explorer 4.0 with Web Integrated Desktop.
4.72     Internet Explorer 4.01 with Web Integrated Desktop.

etc... detailed information follows the table(s).

Rinse and repeat for the other 'system' DLL's.

Important note: Service Pack version numbers are listed as well.
When user applies a pack... the internal version numbers change.

Just about all 'system' dll's since Windows 3.1 have been
'stamped' with these version ID's and you can always
get/notget the 'features' you want at compile time.

This function retrieves the major and minor version numbers of
whatever Shell32.dll is installed on the local system....

HRESULT GetShell32Version(LPDWORD pdwMajor, LPDWORD pdwMinor)

There are similar calls for other system dlls.

In the case of the Window(tm) 32-bit shell... you can always
ensure that your application ( read Apache ) is compatible with
different targeted versions of the shell by being sure to use
a version macro that hides in the shell header file.

This macro is used to define, exclude, or redefine certain
definitions for different versions of the DLL.

The macro name is _WIN32_IE and it takes a HEX number.

Examples for _WIN32_IE follow...

Version  Description

0x0200 Assures compatibility with Shell32.dll version 4.00 and later.
           The application will not be able to implement the features
           that were added after version 4.00 of Shell32.dll.
0x0400 Assures compatibility with Shell32.dll version 4.71 and later.
           The application will not be able to implement the features that
          were added after version 4.71 of Shell32.dll.
0x0401 Assures compatibility with Shell32.dll version 4.72 and later.
           The application will not be able to implement the features
           that were added after version 4.72 of Shell32.dll.

etc, etc...

The best way to define this macro is at compile time in makefile...

/D _WIN32_IE=0x0400 <- Change desired win version compatibility number

Fallback is to throw it into the code but make sure it comes
before any 'system' header...

#define _WIN32_IE 0x0400
#include "shlobj.h"

If you do not define the macro the compatibility reverts to 0x4000
which puts you 'in the middle of the road' somewhere.

Problems with Apache for Windows(tm) probably relate more to
kernel32.dll than shell32.dll but the line of responsibility
for even simple process and thread management gets blurred.
shell32 handles a lot of things you might think would only be
in kernel32... especially if the user has the Active Desktop
turned on.

Anyway... the same sort of 'version' info stuff is on the CD
regarding kernel32.dll as well... and there are important
version macros that need to be defined at compile time.

The unfortunate truth is that there really is no 'one size
fits all' version number unless you go for the lowest common
denominator on ALL the system dll's. Compiling for different
levels creates different release binaries. Checking dll
versions at runtime allows 1 binary but adds more code.

Disclaimer: I am NOT affiliated with Microsoft(tm) in
any way, shape or form. Just trying to help with some info.

View raw message