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
/*
A REGHANDLE represents an event provider session.
A REGHANDLE is opened with EventRegister and closed with EventUnregister.
*/
typedef ULONGLONG REGHANDLE, *PREGHANDLE;
From docs:
If EventRegister fails, it returns a zero-valued RegHandle. ETW APIs such as EventWrite and EventUnregister will safely accept a zero-valued RegHandle value, do nothing, and return immediately. Callers do not need to check for a zero-valued RegHandle before calling EventWrite or EventUnregister.
Suggested fixes:
Add [InvalidHandleValue(0)]
Add metadata test to fail if IHV metadata is missing from RAIIFree marked types.
I was curious what you meant by this (I'm still curious) and then I happened to notice that there seems to be a new metadata attribute I wasn't aware of. HSTRING for example has the NativeTypedef attribute while PROCESSTRACE_HANDLE has the MetadataTypedef attribute. Rust only deals with the former, but the latter seems to indicate the same or similar thing. Why are there two attributes?
I was just making a note to indicate which types shouldn't get an InvalidHandleValue assigned to them, given that attribute is meant for handles and not pointers. I recognize HSTRING is a handle; HSTRING is notable though as it has no invalid value.
NativeTypedef indicates the typedef declaration natively appears in the headers, while MetadataTypedef indicates it was artificially created.
From
evtprov.h
:From docs:
Suggested fixes:
[InvalidHandleValue(0)]
Originally posted by @kennykerr in #1891
The text was updated successfully, but these errors were encountered: