INT GetCommandQuery( |
|
UINT nClientId, |
|
|
LPTSTR lpszParameters, |
|
|
INT nMaxLength |
|
); |
INT GetCommandQuery( |
|
UINT nClientId, |
|
|
CString& strParameters |
|
); |
Return the query parameters included with the command.
Parameters
- nClientId
- An unsigned integer which uniquely identifies the client
session.
- lpszParameters
- A null-terminated string buffer that will contain the query
parameters when the method returns. The string buffer will be null
terminated up to the maximum number of characters specified by the
caller. If this parameter is NULL the method will return the
length of the query string. 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. If the lpszParameters
parameter is NULL, this value should be zero.
Return Value
An integer value which specifies the number of characters copied
into the buffer, not including the terminating null character. If the
method fails, the return value will be zero and the GetLastError
method can be used to retrieve the last
error code. If the client did not provide any query parameters, this
method will return zero and the last error code will be zero.
Remarks
The GetCommandQuery method is used to obtain a copy of
the query parameters that were included in the request URL. If there
were no query parameters, the string buffer will be empty and the
return value will be zero. If the request did include query
parameters, they will be returned to the caller in their original,
encoded form.
This method should not be called within an OnConnect event
handler because the client request has not been processed at that point.
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
GetCommandName,
GetCommandResource,
ReceiveRequest
|