BOOL AddVirtualHostAlias( |
|
UINT nHostId, |
|
|
LPCTSTR lpszHostAlias |
|
); |
BOOL AddVirtualHostAlias( |
|
LPCTSTR lpszHostAlias |
|
); |
Add an alternate host name for an existing virtual host.
Parameters
- nHostId
- An integer value which identifies the virtual host. If this
parameter is omitted, the alias will be assigned to the default
server.
- lpszHostAlias
- A null-terminated string which specifies the alias
for the virtual host. The alias must be a valid domain name that
uniquely identifies the host. This parameter cannot be a NULL
pointer or specify an empty string.
Return Value
If the function succeeds, the return value is non-zero. If the virtual
host ID does not specify a valid host, the function will return zero. If
the function fails, the last error code will be updated to indicate the
cause of the failure.
Remarks
The AddVirtualHostAlias method adds an alias for an existing virtual host. This
enables a client to establish a connection using a number of different
domain names which all reference the same virtual host. When the
server responds to the client, it will identify itself with the
primary domain name assigned to the virtual host rather than the alias
provided by the client.
Requirements
Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools11.h
Import Library: cshtsv11.lib
Unicode: Implemented as Unicode and ANSI versions
See Also
AddVirtualHost,
AddVirtualPath
|