Re: psql 8.0 final not working on NT 4.0sp6

From: Mike Mascari <mascarm(at)mascari(dot)com>
To: Magnus Hagander <mha(at)sollentuna(dot)net>
Cc: John DeSoi <desoi(at)pgedit(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql 8.0 final not working on NT 4.0sp6
Date: 2005-01-19 01:37:25
Message-ID: 41EDB9D5.7010505@mascari.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Magnus Hagander wrote:
>>According to this: http://support.microsoft.com/kb/q165695/ Windows
>>Desktop update was included with IE 4, but not with IE 5 or later.
>>Further, if you want to install Windows Desktop Update you have to
>>first remove IE 5 or later. And finally it says that Windows Desktop
>>Update can only be installed using the IE 4 setup, but this is no
>>longer available from Microsoft. What a mess.
>
>
> Yikes. that's certainly a mess. I see the following options

Hello, Magnus. I read the -bugs thread that resulted in this code and
choose not to comment since I thought that perhaps my understanding of
the implications of using SHFolder.dll v. Shell32.dll was in error.

However, installer code that I had authored before that works on both
98, XP, and NT does:

module = LoadLibrary("SHFolder.dll");
if (module != NULL) {
getfolderv1 = GetProcAddress(module, "SHGetFolderPathA");
...
invoke function, deal with ANSI path
...
FreeLibrary(module);
} else {
module = LoadLibrary("shell32.dll");
if (module != NULL) {
getfolderv2 = GetProcAddress(module, "SHGetSpecialFolderLocation");
...
invoke function, deal with UNICODE path
...
FreeLibrary(module);
} else {
throw an exception here...
}
}

I think the way to guarantee success is to ship the redistributable dll,
shfolder.dll with the application, which would eliminate the need to try
and fall back to shell32.dll. shfolder.dll is redistributable:

http://www.microsoft.com/downloads/details.aspx?FamilyID=6ae02498-07e9-48f1-a5d6-dbfa18d37e0f&DisplayLang=en

This article explains what needs to be done to write an installer for
older platforms:

http://support.microsoft.com/default.aspx?scid=kb%3BEN-US%3B227051

Note:

"Important: SHGetFolderPath is new to the Windows 2000 API. If you call
SHGetFolderPath from an application that can be installed on a previous
version of Windows, then you will need to redistribute the file
SHFolder.dll with your application."

as does this one:

http://support.microsoft.com/default.aspx?scid=kb%3BEN-US%3BQ241733

My code expects to find an shfolder.dll on < Windows 2000 systems and a
shell32.dll on >= Windows 2000 systems. As I said, I *believe* you can
guarantee success by just shipping shfolder.dll with the application.

Hope that helps,

Mike Mascari

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message lsunley 2005-01-19 04:12:26 OS/2 port
Previous Message Andrew Dunstan 2005-01-19 01:21:01 buildfarm enhancements