There is a bit of info in Google if you search by "write to windows events"
There is also a windows command logevent.exe that was available in Win2000 that you may be able to use in later versions of Windows.
[support.microsoft.com]
Thank you for your fast reaction. I tried it under Xp and it worked.
Have to test it under Vista.
The only thing is that I have to start another exe!
And this at a moment when there is already a problem.