| INT WINAPI InetGetClientMoniker( |
| |
SOCKET hSocket, |
|
| |
LPTSTR lpszMoniker, |
|
| |
INT nMaxLength |
|
| ); |
The InetGetClientMoniker function returns the moniker
associated with the specified client session.
Parameters
- hSocket
- Handle to the client socket.
- lpszMoniker
- Pointer to a string buffer that will contain the moniker for
the specified client session when the function returns.
- nMaxLength
- The maximum number of characters that may be copied into the
string buffer. The buffer must be large enough to store the moniker
and a terminating null character. The maximum length of a moniker is 127
characters.
Return Value
If the function succeeds, the return value is the number of
characters in the moniker string. A return value of zero specifies
that no moniker was assigned to the socket. If the function fails,
the return value is INET_ERROR. To get extended error information,
call InetGetLastError.
Remarks
A client moniker is a string which can be used to uniquely
identify a specific client session aside from its socket handle. A
moniker can be assigned to the client session using the
InetSetClientMoniker function. This function will return the
moniker that was previously assigned to the client, if any. To obtain
the socket handle associated with a given moniker, use the
InetFindClientMoniker function.
The socket handle for the client must be one that was created as
part of the SocketWrench server interface, and cannot be a socket
that was created using the InetConnect or InetAccept
functions.
Requirements
Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cswsock12.h
Import Library: cswskv12.lib
Unicode: Implemented as Unicode and ANSI versions
See Also
|