C++: BOOL vtiOpenWebWithPassword (LPCTSTR pszServer, LPCTSTR pszWebName, LPCTSTR pszUser, LPCTSTR pszPassword);
VB: vtiOpenWebWithPassword (Server as String, WebName as String, User as String, Password as String) as Integer
Description
Provides the same functionality as vtiOpenWeb, but allows you to specify a password too. This is useful for creating automated processes which make calls to FrontPage and need to make unattended manipulations of the web.
Return Value
The return value is true (non-zero) if the web is opened successfully, and false (zero) if not.
Parameters
Server is the designation for the web server. It can include a file:// or http:// or https:// prefix. If no prefix is provided, http:// is assumed. If a file path like C:\ is provided, the
file:// prefix is assumed. Examples: “http://www.microsoft.com”, “http://microsoft:8080”.
WebName is the name of the desired web on the server, or the empty string for the Root Web. No inital slash is required for subwebs. Example: “myweb”.
User holds the name of an Administrator or Author in the target web, or the empty string if the user should type in both the username and password.
Password is the password string for the specified user account.
WARNING: As with any program that contains password information, creating a program that uses vtiOpenWebWithPassword ( ) and specifies a Password string creates a potential security hole unless you can protect against physical access to the executable. This is because the executable can be searched for the user account name and password string parameter used in to the call to vtiOpenWebWithPassword. Therefore, we recommend that you use this function with caution.