|
INT GetClientDirectory( |
|
UINT nClientId, |
|
|
LPTSTR lpszDirectory, |
|
|
INT nMaxLength |
|
); |
INT GetClientDirectory( |
|
UINT nClientId, |
|
|
CString& strDirectory |
|
); |
Returns the root document directory for the specified client
session.
Parameters
- nClientId
- An unsigned integer which uniquely identifies the client
session.
- lpszDirectory
- A pointer to a string buffer that will contain the root document directory for the specified client session, terminated with
a null character. This buffer should be at least MAX_PATH characters
in length. This parameter cannot be NULL. An alternate version of
this method accepts a CString object if it is available.
- nMaxLength
- An integer value that specifies the maximum number of characters
that can be copied into the string buffer, including the terminating
null character. This value must be larger than zero or the method
will fail.
Return Value
If the method succeeds, the return value is the number of
characters copied into the string buffer, not including the
terminating null character. If the
client ID does not specify a valid client session,
the method will return zero.
Remarks
This method returns the full path to the root document directory
for the specified client session. If no virtual hosts have been
configured, then this value will be the same as the root directory
assigned to the server when it was started. If the server has been
configured with multiple virtual hosts, this function will return the
path to the root directory associated with the hostname provided by
the client.
To convert a full path to the virtual path for a specific client
session, use the GetClientVirtualPath method.
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
GetClientVirtualPath
|
|