Click to return to the Web Content Management home page    
WpCreateSiteEx Function     WpDoesSiteExist Function     Web Publishing Programmer...    
Web Workshop  |  Web Content Management

WpDeleteSite Function


Deletes a site from the registry.

Syntax

DWORD WpDeleteSite(
    LPTSTR szSiteName
);

Parameters

szSiteName
Posting site name.

Return Value

Returns one of the following values:

NO_ERRORSuccessful
E_INVALIDARGOne of the arguments is invalid.
WEBPOST_ERROR_DELETE_SITEAn error occurred while the Web Publishing API was deleting the requested site.
WEBPOST_ERROR_EXTENDED_ERRORA Web Publishing extended error occurred. This means that the API received an error code that the API client may not be able to translate, so the API performed the translation and cached the error message for retrieval on a call to the WpGetErrorString method.
WEBPOST_ERROR_INIT_FAILEDAn error occurred while attempting to initialize the Web Publishing API DLL.
WEBPOST_ERROR_NO_EXT_ERROR_INFOAn extended error occurred in the Web Publishing API, but the error message could not be retrieved.
WEBPOST_ERROR_PROV_EPThe Web Publishing API could not locate a required entry point in one of its service providers.
WEBPOST_ERROR_SITE_DOESNOTEXISTThe Web Publishing API could not delete the requested site because no site with the specified name exists.

Remarks

WpDeleteSite calls WppDeleteSite on the provider that owns the specified site.

Example

The following example calls WpDeleteSite to delete a site called site1 from the registry.

{
    HRESULT hResult = NOERROR;

    hResult = WpDeleteSite("site1");
}

Function Information

Windows NTUse version 4.0 and later
WindowsUse Windows 95 and later
HeaderDeclared in Wpapi.h
Import LibraryLink with WebPost.lib
Minimum availabilityInternet Explorer 4.0


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.