Retrieves the list of all sites about which Web Publishing currently has information.
Syntax
DWORD WpListSites( LPDWORD pdwSitesBufLen, LPWPSITEINFO pSitesBuffer, LPDWORD pdwNumSites );
Parameters
- pdwSitesBufLen
- Size, in bytes, of pSitesBuffer. On return, contains the actual number of bytes used in pSitesBuffer. If pSitesBuffer is NULL or too small to hold all the sites, this parameter shows the necessary size of the buffer to allocate.
- pSitesBuffer
- Receives an array of WPSITEINFO structures.
- pdwNumSites
- Number of sites. This value is set whether pdwSitesBuffer 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 retrieve the list of sites about which Web Publishing currently has information. WEBPOST_ERROR_INIT_FAILED An error occurred while attempting to initialize the Web Publishing API DLL. WEBPOST_ERROR_LIST_SITES An error occurred while the Web Publishing API was enumerating the sites on this system. WEBPOST_ERROR_SITE_CORRUPT The Web Publishing API could not retrieve all of the required site information.
Example
The following example demonstrates how to call the WpListSites function to retrieve a list of sites about which Web Publishing currently has information.
{ HRESULT hResult = NOERROR; DWORD BufLen; DWORD Num; hResult = WpListSites(&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