Platform SDK: Windows Sockets |
This section lists the upcalls that service providers may make into the Windows Sockets client. Service providers receive an upcall dispatch table as a parameter to WSPStartup(), and use entries in this table to make the upcalls. Therefore, a client does not need to export its WPU functions.
It is not mandatory that providers use all of these upcalls. The following table indicates which upcalls must be used and which are optional.
Function | Description | Status | Meaning | |
---|---|---|---|---|
WPUCloseEvent | Closes an open event object handle. | Optional. | The provider may use an appropriate OS call instead. | |
WPUCloseSocketHandle | Closes a socket handle allocated by the Windows Sockets DLL. | Required. | The Ws2_32.dll needs to query and/or modify internal state information associated with the socket handle. | |
WPUCloseThread | Closes a thread ID for an internal service thread. | |||
WPUCompleteOverlappedRequest | Delivers overlapped I/O completion notification where the completion mechanism is something other than user mode APC. | |||
WPUCreateEvent | Creates a new event object. | Optional. | The provider may use an appropriate OS call instead. | |
WPUCreateSocketHandle | Creates a new socket handle for nonIFS providers. | Required for nonIFS providers. | The Ws2_32.dll needs to query and/or modify internal state information associated with the socket handle. | |
WPUFDIsSet | Checks the membership of the specified socket handle. | Optional. | This is just a convenience function that knows how to dig through FD SET structures. A provider may need to dig through these structures explicitly anyway. | |
WPUGetProviderPath | Retrieves the DLL path for the specified provider. | Required. | Only the Ws2_32.dll would know where an adjacent protocol layer (potentially from another vendor) has been installed. | |
WPUModifyIFSHandle | Receives a (possibly) modified IFS handle from the Windows Sockets DLL. | Required for IFS providers. | The Ws2_32.dll needs to query and/or modify internal state information associated with the socket handle. | |
WPUPostMessage | Performs the standard PostMessage function in a way that maintains backward compatibility. | Required. | Windows NT/2000 only. Windows 95 allows post message from kernel mode. | |
WPUQueryBlockingCallback | Returns a pointer to a thread's blocking hook function. | Required. | There is no corresponding OS functionality. Only the Ws2_32.dll has the information to accomplish this. | |
WPUQuerySocketHandleContext | Gets a socket's context value (nonIFS providers only). | Required for nonIFS providers. | The Ws2_32.dll needs to query and/or modify internal state information associated with the socket handle. | |
WPUQueueApc | Queues a user-mode APC to the specified thread. | Optional. | The QueueUserApc may also be used. | |
WPUResetEvent | Resets an event object. | Optional. | The provider may use an appropriate OS call instead. | |
WPUSetEvent | Sets an event object. | Optional. | The provider may use an appropriate OS call instead. |