Re: Postmaster service code

Поиск
Список
Период
Сортировка
От Laurent Ballester
Тема Re: Postmaster service code
Дата
Msg-id 00e001c435b3$492f9610$1cf0fdc1@fleche
обсуждение исходный текст
Ответ на Postmaster service code  ("Dave Page" <dpage@vale-housing.co.uk>)
Список pgsql-hackers-win32
Yes, we need to create and register a tiny DLL to avoid to have error
message joined to our log message such as describe Dave in it's previous
mail.

By studing the works made by Claudio, a simple way to achieve this work it
to create a message wich contains only %1 like the mc file i'am attached
with this post, and to modify a little bit the write_eventlog function he
made (4 parameters of ReportEvent have to change to 0 with  0x00000001L or
PGWIN32_EVENTLOG_MSG in my sample).

To obtain a DLL, we need Microsoft MC Compiler to create a RC file and after
we can finish the compilation with Msys tools.

for Visual Studio users :

mc EventLogMsg.mc   # produce one rc file and one .h file
rc -r -fo EventLogMsg.res EventLogMsg.rc
link -dd -noentry -out:EventLogMsg.dll EventLogMsg.res

for Msys :
After obtain a .RC file with MC compiler
windres -o EventLogMsg.o EventLogMsg.rc
dllwrap --dllname=EventLogMsg.dll --driver-name=gcc EventLogMsg.o

To finish, we have to register the DLL in
HKEY_LOCAL_MACHINE\system\CurrentControlSet\Services\EventLog\Application
Create a entry name PostGreSQL, add a key EventMessageFile set it with the
full path of the DLL
two issues : made this job by setup program or by write_eventlog() itself.

Do you know, where will be the right place to put these files and
update/create a Makefile

Regards, Laurent


Вложения

В списке pgsql-hackers-win32 по дате отправления:

Предыдущее
От: "Darko Prenosil"
Дата:
Сообщение: Re: Postmaster service code
Следующее
От: "Magnus Hagander"
Дата:
Сообщение: Re: Postmaster service code