From: | "Magnus Hagander" <mha(at)sollentuna(dot)net> |
---|---|
To: | "Laurent Ballester" <postgresql(dot)ballester(at)wanadoo(dot)fr>, "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>, "Darko Prenosil" <Darko(dot)Prenosil(at)finteh(dot)hr>, <pgsql-hackers-win32(at)postgresql(dot)org> |
Subject: | Re: Postmaster service code |
Date: | 2004-05-11 07:36:26 |
Message-ID: | 6BCB9D8A16AC4241919521715F4D8BCE17167E@algol.sollentuna.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers-win32 |
> I have a question to be able to finish DllRegisterServer
> function. The function must write full pathname of dll in
> registry. In a classical Windows setup program, this path is
> chosen by end-user at runtime.
> We discuss a few week (month ?) ago to store the path in
> registry too and create env variable for backward
> compatibility with existent programs.
>
> Did you remember what was the final decision ?
I think your best bet is to use GetModuleFileNameEx() and friends
(probably need to EnumProcessModules(), I can't remember if there is a
direct API call to give you the current DLL. Or you can save away the
HMODULE value in DllMain() in a global variable - that might be easier)
to find out the exact path of the DLL that regsvr32 is invoked on, and
write that path to the registry.
That way you are completely independent of where the DLL is installed,
as long as it's not moved. (And not being able to move a program/dll
after it has been installed is pretty normal)
//Magnus
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2004-05-11 12:16:21 | Re: FULLTEXT under Win32 PostgreSQL? |
Previous Message | Tom.Zschockelt | 2004-05-11 06:42:17 | ssl on win32 |