Retrieves the list of all currently registered providers.
Syntax
DWORD WpEnumProviders( LPDWORD pdwProvidersBufLen, LPWPPROVINFO pProvidersBuffer, LPDWORD pdwNumProviders );
Parameters
- pdwProvidersBufLen
- Size, in bytes, of pProvidersBuffer. On return, contains the actual number of bytes used in pProvidersBuffer. If pProvidersBuffer is NULL or too small to hold all the providers, this parameter shows the necessary size of the buffer to allocate.
- pProvidersBuffer
- Receives an array of WPPROVINFO structures.
- pdwNumProviders
- Number of providers. This value is set whether pProvidersBuffer is NULL or points to a large enough buffer.
Return Value
Returns one of the following values:
NO_ERROR Successful. E_INVALIDARG One of the arguments is invalid. E_OUTOFMEMORY Not enough memory to list all currently registered providers. WEBPOST_ERROR_ENUM_PROVS An error occurred while the Web Publishing API was enumerating the providers on this system. WEBPOST_ERROR_INIT_FAILED An error occurred while attempting to initialize the Web Publishing API DLL. WEBPOST_ERROR_PROV_CORRUPT The Web Publishing API could not retrieve all of the required service provider information.
Example
The following example shows how the WpEnumProviders function is called to retrieve the list of all currently registered providers.
{ HRESULT hResult = NOERROR; DWORD BufLen; DWORD Num; hResult = WpEnumProviders(&BufLen, NULL, &Num); }
Function Information
Windows NT Use version 4.0 and later Windows Use Windows 95 and later Header Declared in Wpapi.h Import Library Link with WebPost.lib Minimum availability Internet Explorer 4.0