Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The WPUQuerySocketHandleContext function queries the context value associated with the specified socket handle.
Syntax
int WPUQuerySocketHandleContext(
[in] SOCKET s,
[out] PDWORD_PTR lpContext,
[out] LPINT lpErrno
);
Parameters
[in] s
Description that identifies the socket whose context is to be queried.
[out] lpContext
Pointer that will receive the context value.
[out] lpErrno
Pointer to the error code.
Return value
If no error occurs, WPUQuerySocketHandleContext returns zero and stores the current context value in lpContext. Otherwise, it returns SOCKET_ERROR, and a specific error code is available in lpErrno.
Error code | Meaning |
---|---|
The descriptor is not a socket created by WPUCreateSocketHandle. |
Remarks
The WPUQuerySocketHandleContext function queries the current context value associated with the specified socket handle. Service providers typically use this function to retrieve a pointer to provider-specific data associated with the socket. For example, a service provider can use the socket context to store a pointer to a structure containing the socket's state, local and remote transport addresses, and event objects for signaling network events.
Only non-IFS providers use this function, because IFS providers are not able to supply a context value.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | ws2spi.h |