Write to Windows event log: Difference between revisions
Content added Content deleted
(Using Write-EventLog) |
Thundergnat (talk | contribs) m (→{{header|C}}: Remove vanity tags) |
||
Line 233: | Line 233: | ||
The following is a wrapper on the EventCreate utility provided in Windows. Note that to use this wrapper, the code must be executed from a console/IDE running as Administrator. The utility itself does extensive error-checking and validation, so apart from the check that 5 arguments have been supplied, no other validations or checks are performed. |
The following is a wrapper on the EventCreate utility provided in Windows. Note that to use this wrapper, the code must be executed from a console/IDE running as Administrator. The utility itself does extensive error-checking and validation, so apart from the check that 5 arguments have been supplied, no other validations or checks are performed. |
||
<lang C> |
<lang C> |
||
/*Abhishek Ghosh, 6th October 2017*/ |
|||
#include<stdlib.h> |
#include<stdlib.h> |
||
#include<stdio.h> |
#include<stdio.h> |