IHWEventHandler::HandleEvent method (shobjidl.h)
Handles AutoPlay device events for which there is no content of the type the application is registered to handle.
Syntax
HRESULT HandleEvent(
[in] LPCWSTR pszDeviceID,
[in] LPCWSTR pszAltDeviceID,
[in] LPCWSTR pszEventType
);
Parameters
[in] pszDeviceID
Type: LPCWSTR
A pointer to a string buffer that contains the device ID.
[in] pszAltDeviceID
Type: LPCWSTR
A pointer to a string buffer that contains the alternate device ID. The alternate device ID is more human-readable than the primary device ID.
[in] pszEventType
Type: LPCWSTR
A pointer to a string buffer that contains the event type. The event types include DeviceArrival, DeviceRemoval, MediaArrival, and MediaRemoval.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
The event types are not C/C++ language constants; they are literal text strings.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | shobjidl.h |
DLL | Shimgvw.dll |