IHWEventHandler2 interface (shobjidl.h)

Extends the IHWEventHandler interface to address User Account Control (UAC) elevation for device handlers.

Inheritance

The IHWEventHandler2 interface inherits from IHWEventHandler. IHWEventHandler2 also has these types of members:

Methods

The IHWEventHandler2 interface has these methods.

 
IHWEventHandler2::HandleEventWithHWND

Handles AutoPlay device events that contain content types that the application is not registered to handle. This method provides a handle to the owner window so that UI can be displayed if the process requires elevated privileges.

Remarks

This interface also provides the methods of the IHWEventHandler interface, from which it inherits.

Handlers that implement this interface should return quickly from calls to IHWEventHandler::HandleEvent and IHWEventHandler2::HandleEventWithHWND so they do not block the AutoPlay dialog from closing. Also, if a local server must be launched for the creation of this handler, it should not block the CreateInstance call; it should return as soon as possible.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header shobjidl.h