IHWEventHandler::Initialize method (shobjidl.h)

Initializes an object that contains an implementation of the IHWEventHandler interface.

Syntax

HRESULT Initialize(
  [in] LPCWSTR pszParams
);

Parameters

[in] pszParams

Type: LPCWSTR

A pointer to a string buffer that contains the string from the following registry value.

HKEY_LOCAL_MACHINE
   Software
      Microsoft
         Windows
            CurrentVersion
               Explorer
                  AutoPlayHandlers
                     Handlers
                        HandlerName
                           InitCmdLine = string

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This method receives the registry string stored in the InitCmdLine value under the

AutoPlayHandlers\Handlers\HandlerName key. Applications that have registered with AutoPlay as event handlers place this string into the registry as part of the registration process.

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