[Nut-upsdev] cross-compiling the windows_port branch (winevent.h)

Frédéric Bohé fredericbohe at eaton.com
Thu Nov 4 09:24:48 UTC 2010


It is generated from the winevent.mc file.
This is what I do to work with windows event log (Registry edition will
be done by an installer in the future. Arnaud is working on automatic
winevent.h and winevent.dll generation):

Run the following commands :

windmc winevent.mc
windres winevent.rc winevent.o
dllwrap --output-lib=libwinevent.a --dllname=winevent.dll
--driver-name=gcc winevent.o


Create the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet
\Services\EventLog\Application\<Service Name> and add the following
registry values to this key :
Value	Type	Description
EventMessageFile = dll_path	REG_SZ	The path to the resource-only DLL
that contains strings that the service can write to the event log.
TypesSupported = 0x00000007	REG_DWORD	A bit mask that specifies the
supported event types. The value 0x000000007 indicates that all types
are supported.


On mer., 2010-11-03 at 21:21 -0400, Charles Lepple wrote:
> How is winevent.h generated? (From the #include in common/wincompat.c,  
> I assume it is not part of the standard include files.)


--------------------------------------------------------------------------



More information about the Nut-upsdev mailing list