vtiCreateWeb

C++: long vtiCreateWeb(LPCTSTR szServerName, 
LPCTSTR szWebName);
VB: vtiCreateWeb(ServerName as String, 
WebName as String) as Long

Description

Creates a new web on the web server. The Root Web (‘/’) is created when the Server Extension software is installed. This method will create a top-level web directly under the Root Web’s URL (‘/subweb1’, ‘/subweb2’, etc.).

This is a blocking call. When it returns successfully, the new web has been created and is ready for use. Most wizards won’t need to use this call, since FrontPage will create a new web (if necessary) before launching a web wizard, if the user hasn’t selected the “Add to Current Web” check-box in the New Web dialog.

Users should typically call vtiRefreshWebFromServer immediately after vtiCreateWeb to make sure the FrontPage Explorer’s views are in sync with the state of the web on the server. Failure to do so may lead to problems in subsequent calls.

Return Value

The return value is currently 1 for success and 0 for failure, but this may change to include other status codes in the future.

Parameters

ServerName is the designation for the web server. It can include the file:// or http:// or https:// prefix. If no prefix is provided, http:// is assumed. If a file path like C:\webdir is provided, the file:// prefix is assumed. Examples: “www.microsoft.com”, “http://www.microsoft.com:8080”, “C:\webdir”.

WebName is the name of the new web you want to create. This name must be a valid directory name in the target web. Example: “myweb”.