Contents Index Topic Contents | ||
Previous Topic: WpCreateSite Next Topic: WpDeleteSite |
WpCreateSiteEx
DWORD WpCreateSiteEx( [in, string] LPTSTR szSiteName [in, string] LPTSTR szSiteLocalBaseDir [in, string] LPTSTR szSiteURL [in, string] LPTSTR szProviderCLSID [in, string] LPTSTR szUsername, [in, string] LPSTR szPassword, [in] DWORD dwFlags, [out] Iunknown **ppSPI, [out] DWORD *pdwCharSet );Creates a new site in the registry, using a user name and password, and returns a pointer to the service provider interface.
- Returns NO_ERROR if successful. Otherwise, returns an error code, which may be one of the following:
E_INVALIDARG E_OUTOFMEMORY WEBPOST_ERROR_INIT_FAILED WEBPOST_ERROR_CREATE_SITE WEBPOST_ERROR_INVALID_POSTINFO WEBPOST_ERROR_NO_POSTINFO WEBPOST_ERROR_PROV_DLL WEBPOST_ERROR_PROV_EP WEBPOST_ERROR_SITE_EXISTS WEBPOST_ERROR_EXTENDED_ERROR WEBPOST_ERROR_NO_EXT_ERROR_INFO WEBPOST_ERROR_POSTINFO_REQUIRED WEBPOST_ERROR_AUTOBIND_FAILED More information about these error codes can be found in Appendix B, Error Codes.
- szSiteName
- Posting site name.
- szSiteLocalBaseDir
- Optional. Local base directory for the site. If NULL, then the local base directory feature is not used for the site.
- szSiteURL
- Posting site URL.
- szProviderCLSID
- Optional. CLSID as string, of the provider that will handle this site. If NULL, then this method will search for a posting information (postinfo) file or attempt to auto-bind to an appropriate provider.
- szUsername
- Optional. The user name to use when logging on to the remote servers. If NULL or incorrect, the user is prompted to supply a user name and password.
- szPassword
- Optional. The password to use when logging on to the remote servers. If NULL or incorrect, the user is prompted to supply a user name and password.
- dwFlags
- Optional.
WPF_USE_PROVIDER_PASSED If WpCreateSite has been called and returned WEBPOST_ERROR_PROV_NOT_IN_POSTINFO, use this flag to have WpCreateSiteExuse the provider specified in szProviderCLSID even if there is a postinfo file and it does not list this provider. - **ppSPI
- Optional. If WpCreateSiteExreturns successfully, *pSPI should point to a IWPSiteA, IWPSiteW, or IWPProvider interface.
Examples
C/C=++{ HRESULT hResult = NOERROR; IUnknown *pUnkSPI = NULL; DWORD dwCharSet; hResult = WpCreateSiteEx( "site1", NULL, "http://site1", NULL, "CRSadmin", "ptmyhygmn", NULL, 0, &pUnkSPI, &dwCharSet); }
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.