MDAC 2.5 SDK - OLE DB Programmer's Reference
OLE DB Interfaces
Unregisters one or more URL mappings for a provider binder object.
HRESULT UnregisterProvider(
LPCOLESTR pwszURL,
DWORD dwReserved,
REFCLSID rclsidProvider
);
Parameters
pwszURL
[in]
The canonical URL scheme or scheme and prefix to be unmapped for the provider designated by rclsidProvider. If pwszURL is a null pointer, all URL scheme or scheme and prefix combinations are unmapped for this provider.
dwReserved
[in]
Reserved for future use; providers should set this to zero.
rclsidProvider
[in]
A reference to the CLSID of the provider binder object for which the root binder will unregister the named URL mapping. This CLSID must be provided and is never ignored.
Return Code
S_OK
The method succeeded.
S_FALSE
*pwszURL is a null pointer, and no scheme/prefix combinations were mapped to rclsidProvider.
*pwszURL was specified, and no matching scheme/prefix combinations were found or were mapped to rclsidProvider.
DB_SEC_E_PERMISSIONDENIED
The caller did not have permission to unregister URL mappings.
E_FAIL
A provider-specific error occurred.
E_INVALIDARG
pwszURL was not a well-formed or canonical URL.
dwReserved was not 0.
Comments
If pwszURL is a null pointer, any URL mappings for the OLE DB provider binder object named by rclsidProvider are removed.
If pwszURL is not a null pointer, the scheme or scheme and prefix combination named by *pwszURL is unmapped.
IRegisterProvider::UnregisterProvider is not transacted. If the root binder encounters a failure, it is possible that some (but not all) mappings might have been removed.