IPortableDevice::Advise
Previous | Next |
IPortableDevice::Advise
The Advise method registers an application-defined callback that receives device events.
Syntax
HRESULT Advise( const DWORD dwFlags, IPortableDeviceEventCallback* pCallback, IPortableDeviceValues* pParameters, LPWSTR* ppszCookie );
Parameters
dwFlags
[in] DWORD that specifies option flags.
pCallback
[in] Pointer to a callback object.
pParameters
[in] This parameter is ignored and should be set to NULL.
ppszCookie
[out] A string that represents a unique context ID. This is used to unregister for callbacks when calling Unadvise.
Return Values
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
Return code | Description |
S_OK | The application-defined callback was successfully registered. |
Requirements
Header: Defined in PortableDeviceApi.h
Library: PortableDeviceGUIDs.lib
See Also
Previous | Next |