You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For all bugs, please provide the following information:
Expected behavior and actual behavior
expected behavior: EvtNext returns empty tuple when there are no new events
actual behavior: EvtNext raises exception with ERROR_INVALID_OPERATION
I think this is due to nbr_returned being uninitialized when it is passed to EvtNext and maintaining its uninitialized value when EvtNext returns ERROR_INVALID_OPERATION, so then this check fails
Perhaps initializing nbr_returned=0 before the call will fix it. However, the Microsoft event log RPC spec says this about the numActualRecords parameter
If the method fails, the client MUST NOT use the value.
Which may indicate that we can't trust the output value even if we initialize it first, however EvtNext is a wrapper around the RPC API, so the same restriction may or may not apply.
Steps to reproduce the problem
Run the following python snippet
It log exceptions (4317, 'EvtNext', 'The operation identifier is not valid.')
For all bugs, please provide the following information:
Expected behavior and actual behavior
expected behavior:
EvtNext
returns empty tuple when there are no new eventsactual behavior:
EvtNext
raises exception withERROR_INVALID_OPERATION
I think this is due to
nbr_returned
being uninitialized when it is passed toEvtNext
and maintaining its uninitialized value whenEvtNext
returnsERROR_INVALID_OPERATION
, so then this check failsPerhaps initializing
nbr_returned=0
before the call will fix it. However, the Microsoft event log RPC spec says this about thenumActualRecords
parameterWhich may indicate that we can't trust the output value even if we initialize it first, however
EvtNext
is a wrapper around the RPC API, so the same restriction may or may not apply.Steps to reproduce the problem
(4317, 'EvtNext', 'The operation identifier is not valid.')
System information
Python version and distribution:
Python 3.11.5
pywin32 version:
pywin32==306
Installed from PyPI or exe installer:
PyPI
Windows Version:
DLL locations:
The text was updated successfully, but these errors were encountered: