| INT GetProgramName( |
| |
UINT nClientId, |
|
| |
LPTSTR lpszProgramName, |
|
| |
INT nMaxLength |
|
| ); |
| INT GetProgramName( |
| |
UINT nClientId, |
|
| |
CString& strProgramName |
|
| ); |
Return the name of the CGI program executed by the client.
Parameters
- nClientId
- An unsigned integer which uniquely identifies the client
session.
- lpszProgramName
- A null-terminated string buffer that will contain the name of the
CGI program executed by the client. This parameter cannot be NULL
and should be at least MAX_PATH characters in size. 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 parameter must have a value greater than zero.
Return Value
If the method succeeds, the return value is the length of the executable
file name. If the client ID does not specify a valid client session, the
method will return zero. If the client has not executed a CGI program this
method will return zero and the last error code will be set to zero.
Remarks
The GetProgramName method returns the local file name
of the CGI program that was executed in response to a request from the
client. This is the full path to the executable that was registered
with the server using the RegisterProgram method. If the
client specified a regular document or directory, this method will
return a value of zero, indicating that no CGI program has been
executed to handle the request.
To obtain the resource URL that was provided by the client, use the
GetCommandUrl method.
Requirements
Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: cshtsv12.lib
Unicode: Implemented as Unicode and ANSI versions
See Also
|