MDAC 2.5 SDK - OLE DB Programmer's Reference
OLE DB Interfaces


 

IRegisterProvider::GetURLMapping

Returns the CLSID of the provider binder object that is mapped to a URL scheme or scheme and prefix.

HRESULT GetURLMapping(
   LPCOLESTR   pwszURL,
   DWORD       dwReserved,
   CLSID *     pclsidProvider
);

Parameters

pwszURL

[in]
The canonical URL scheme or scheme and prefix whose mapping is to be returned.

dwReserved

[in]
Reserved for future use; caller should set this to zero.

pclsidProvider

[out]
A pointer to the CLSID of the provider binder object that is mapped to this URL scheme or scheme and prefix. *pclsidProvider is set to DB_NULLGUID if an error code is returned.

Return Code

S_OK

The method succeeded. pclsidProvider points to the CLSID of the provider binder object.

S_FALSE

No provider binder object was mapped to this URL scheme or scheme and prefix. *pclsidProvider is set to DB_NULLGUID.

E_FAIL

A provider-specific error occurred.

E_INVALIDARG

pwszURL or pclsidProvider was a null pointer.

dwReserved was not 0.

Comments

Each URL scheme and prefix combination may be mapped to at most a single OLE DB provider binder object.

Note   "Provider Binder Objects," in Chapter 8, discusses case-sensitivity issues for URL-to-provider mapping.