user844541
user844541

Reputation: 2958

Write to event log from a driver

I want to write to the event log from a driver. I know that i need to use IoAllocateErrorLogEntry and I also added the registry key

HKLM\System\CurrentControlSet\Services\EventLog\driverName

Now I want to set the source of the log to be the "driverName". I tried to follow the "write log" instruction in here but it doesn't seem to work.

How can I write to the event log with a specific source?

Upvotes: 1

Views: 768

Answers (1)

Brans Ds
Brans Ds

Reputation: 4117

1) Don't forget to register source as Registering as a Source of Error Messages

2)Don't leave spaces between iologmsg.dll and your driver in registry

3) Sometimes you will need to reboot after driver installation to see canges

And all will work!

Upvotes: 1

Related Questions