ReadEventLog problems
ReadEventLog problems
(OP)
Hi Guys,
No matter how I try to call the ReadEventLog API it always returns a value of 87 (ERROR_INVALID_PARAMETERS). So I am obviously trying to use the wrong variable types (or values). I have searched extensively across the web but can't find a solution.
Any hints or sample code would be appreciated.
DJ.
No matter how I try to call the ReadEventLog API it always returns a value of 87 (ERROR_INVALID_PARAMETERS). So I am obviously trying to use the wrong variable types (or values). I have searched extensively across the web but can't find a solution.
Any hints or sample code would be appreciated.
DJ.
RE: ReadEventLog problems
Take Care
Matt
If at first you don't succeed, skydiving is not for you.
RE: ReadEventLog problems
Using VB6
lReturnCode = ReadEventLog(lLogHwd, EVENTLOG_SEQUENTIAL_READ, lLogPos, VarPtr(Log), lNumBytesToRead, lBytesRead, lMinNumBytesNeeded)
Where all of the variables are of type long except bLog which is of type Variant. 56 is the value set into lNumBytesToRead and for the examle I am setting lLogPos to 1.
I have no problems opening the Event Log and counting the number of logs so the lLogHwd variable does hold the correct value.
Thanks,
DJ.
RE: ReadEventLog problems
As a shortcut, here's my demonstration code (from forum222) on reading the event log from VB: thread222-395506