SOCKET WINAPI InetGetThreadClient( |
|
DWORD dwThreadId |
|
); |
The GetThreadClient method returns the socket handle
for the client session that is being managed by the specified
thread.
Parameters
- dwThreadId
- An unsigned integer value which identifies the thread managing
the client session. If this parameter has a value of zero, then the
client handle for the current thread is returned.
Return Value
If the method succeeds, the return value is the socket handle
for the specified client session. If the method fails, the return
value is INVALID_SOCKET. To get extended error information, call
InetGetLastError.
Remarks
The GetThreadClient is used to obtain the socket handle
for the client session that is being managed by the specified thread.
If the specified thread ID is zero, then the method will return the
client socket for the current thread, otherwise it will search the
internal table of all active client sessions and return the handle to
the session that is being managed by that thread.
This method will fail if the thread ID does not specify an active
client session thread.
Requirements
Minimum Desktop Platform: Windows 7 (Service Pack 1)
Minimum Server Platform: Windows Server 2008 R2 (Service Pack 1)
Header: Include cswsock10.h
Import Library: cswskv10.lib
See Also
GetActiveClient
GetClientHandle,
GetClientId,
GetClientThreadId
|