@@ -2986,12 +2986,14 @@ _winapi.RegisterEventSource -> HANDLE
29862986 source_name: LPCWSTR
29872987 The name of the event source to register.
29882988 /
2989+
2990+ Retrieves a registered handle to the specified event log.
29892991[clinic start generated code]*/
29902992
29912993static HANDLE
29922994_winapi_RegisterEventSource_impl (PyObject * module , LPCWSTR unc_server_name ,
29932995 LPCWSTR source_name )
2994- /*[clinic end generated code: output=e376c8950a89ae8f input=16ae3c812a905cab ]*/
2996+ /*[clinic end generated code: output=e376c8950a89ae8f input=9642e69236d0a14e ]*/
29952997{
29962998 HANDLE handle ;
29972999
@@ -3013,11 +3015,13 @@ _winapi.DeregisterEventSource
30133015 handle: HANDLE
30143016 The handle to the event log to be deregistered.
30153017 /
3018+
3019+ Closes the specified event log.
30163020[clinic start generated code]*/
30173021
30183022static PyObject *
30193023_winapi_DeregisterEventSource_impl (PyObject * module , HANDLE handle )
3020- /*[clinic end generated code: output=7387ff34c7358bce input=0973c68eddcfd5a7 ]*/
3024+ /*[clinic end generated code: output=7387ff34c7358bce input=947593cf67641f16 ]*/
30213025{
30223026 BOOL success ;
30233027
@@ -3036,23 +3040,25 @@ _winapi.ReportEvent
30363040
30373041 handle: HANDLE
30383042 The handle to the event log.
3039- event_type : int
3043+ type : int
30403044 The type of event being reported.
3041- event_category : int
3045+ category : int
30423046 The event category.
30433047 event_id: int
30443048 The event identifier.
30453049 strings: object(subclass_of='&PyList_Type')
30463050 A list of strings to be inserted into the event message.
30473051 raw_data: Py_buffer = None
30483052 The raw data for the event.
3053+
3054+ Writes an entry at the end of the specified event log.
30493055[clinic start generated code]*/
30503056
30513057static PyObject *
3052- _winapi_ReportEvent_impl (PyObject * module , HANDLE handle , int event_type ,
3053- int event_category , int event_id , PyObject * strings ,
3058+ _winapi_ReportEvent_impl (PyObject * module , HANDLE handle , int type ,
3059+ int category , int event_id , PyObject * strings ,
30543060 Py_buffer * raw_data )
3055- /*[clinic end generated code: output=9066f114cdfdf5f2 input=fade978a0b25e611 ]*/
3061+ /*[clinic end generated code: output=62348d38f92d26e8 input=4ac507ddabbf91ca ]*/
30563062{
30573063 BOOL success ;
30583064 LPCWSTR * string_array = NULL ;
@@ -3098,7 +3104,7 @@ _winapi_ReportEvent_impl(PyObject *module, HANDLE handle, int event_type,
30983104 }
30993105
31003106 Py_BEGIN_ALLOW_THREADS
3101- success = ReportEventW (handle , event_type , event_category , event_id ,
3107+ success = ReportEventW (handle , type , category , event_id ,
31023108 NULL , num_strings , data_size ,
31033109 string_array , data );
31043110 Py_END_ALLOW_THREADS
@@ -3220,6 +3226,12 @@ static int winapi_exec(PyObject *m)
32203226 WINAPI_CONSTANT (F_DWORD , ERROR_PIPE_CONNECTED );
32213227 WINAPI_CONSTANT (F_DWORD , ERROR_PRIVILEGE_NOT_HELD );
32223228 WINAPI_CONSTANT (F_DWORD , ERROR_SEM_TIMEOUT );
3229+ WINAPI_CONSTANT (F_DWORD , EVENTLOG_SUCCESS );
3230+ WINAPI_CONSTANT (F_DWORD , EVENTLOG_AUDIT_FAILURE );
3231+ WINAPI_CONSTANT (F_DWORD , EVENTLOG_AUDIT_SUCCESS );
3232+ WINAPI_CONSTANT (F_DWORD , EVENTLOG_ERROR_TYPE );
3233+ WINAPI_CONSTANT (F_DWORD , EVENTLOG_INFORMATION_TYPE );
3234+ WINAPI_CONSTANT (F_DWORD , EVENTLOG_WARNING_TYPE );
32233235 WINAPI_CONSTANT (F_DWORD , FILE_FLAG_FIRST_PIPE_INSTANCE );
32243236 WINAPI_CONSTANT (F_DWORD , FILE_FLAG_OVERLAPPED );
32253237 WINAPI_CONSTANT (F_DWORD , FILE_GENERIC_READ );
0 commit comments