IPNPXDeviceAssociation::Delete method (pnpxassoc.h)
[Function Discovery is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]
Removes an entry from the association database and sends an appropriate notification.
Syntax
HRESULT Delete(
[in, optional] const WCHAR *pszSubcategory,
[in] IFunctionDiscoveryNotification *pIFunctionDiscoveryNotification
);
Parameters
[in, optional] pszSubcategory
The subcategory of the association database in which the entry is stored. This parameter can be NULL.
[in] pIFunctionDiscoveryNotification
An IFunctionDiscoveryNotification object that is registered for notifications with Function Discovery.
Return value
Possible return values include, but are not limited to, the following.
Return code | Description |
---|---|
|
The method succeeded. |
|
The method failed. |
Remarks
This method modifies the association database entry corresponding to the function instance from which the IPNPXDeviceAssociation interface was obtained.
The following logic is used to determine the callback method used for notification:
- If a PnP notification is received after the device is deleted, then the IFunctionDiscoveryNotification::OnUpdate method is called with the enumQueryUpdateAction parameter set to QUA_REMOVE.
- If no PnP notification is received after the device is deleted, and there are no pending PnP events, then the IFunctionDiscoveryNotification::OnError method is called.
- Finally, if no PnP notification is received after the device is deleted, and there are pending PnP events, then no callback method is called.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | pnpxassoc.h |