The ISideShowExtension2::PostEvent method raises a driver event in the SideShow class extension.
HRESULT PostEvent( [in] REFGUID in_EventGuid, [in, optional] const SID *in_pSid, [in, optional] const BYTE *in_pbEventData, [in] const DWORD in_cbEventData );
- in_EventGuid [in]
A GUID that identifies the event being raised. The following list contains permitted values:
- in_pSid [in, optional]
A pointer to a SID that identifies the user for which the event is being raised. In most cases, this is the SID for the current user of the device. If the event being raised is SIDESHOW_USER_CHANGE_REQUEST_EVENT, this parameter must be NULL. If the current user mode is console or assigned, a NULL value corresponds to the current device user. NULL is not a valid value for an all-user device.
- in_pbEventData [in, optional]
A BYTE pointer that points to the event data buffer. This buffer must contain the structure defined in WindowsSideShowDriverEvents.h that corresponds to the specified event type.
- in_cbEventData [in]
A DWORD that contains the size of the event data buffer pointed to by in_pbEventData.
If the operation succeeds, this method returns S_OK. Otherwise, this method returns one of the error codes that are defined in Winerror.h.
You should use ISideShowClassExtension2::PostEvent instead of IWDFDevice::PostEvent to raise SideShow events.
This method provides an improved way to raise Windows SideShow events. In Windows Vista, drivers could raise events by calling the IWDFDevice::PostEvent method. Instead of broadcasting the notification through the UMDF event mechanism, ISideShowClassExtension2::PostEvent keeps the event notification and its associated data contained within the SideShow platform. Because Windows SideShow controls this event mechanism, the data moves more securely and reliably through the system.
You must free any memory you allocate for buffers passed through this method.
The class extension supports all platform-defined events.
|Available in Windows 7|