WPUQueryBlockingCallback

The WPUQueryBlockingCallback function returns a pointer to a callback function the service provider should invoke periodically while servicing blocking operations.

int WPUQueryBlockingCallback (
  DWORD dwCatalogEntryId,                    
  LPBLOCKINGCALLBACK FAR * lplpfnCallback,   
  LPDWORD lpdwContext,                       
  LPINT lpErrno                              
);
 

Parameters

dwCatalogEntryId
[in] A descriptor identifying the calling service provider.
lplpfnCallback
[out] A pointer that receives to the blocking callback function.
lpdwContext
[out] A pointer that receives a context value that the service provider must pass into the blocking callback.
lpErrno
[out] A pointer to the error code.

Remarks

The WPUQueryBlockingCallback function returns a pointer to a callback function in lpfnCallback to be invoked periodically during blocking operations. This function also returns a context value in lpdwContext to be passed into the blocking callback.

Under Win32, this function can return NULL in lpfnCallback, indicating that no user-defined blocking hook is installed. In this case, the service provider should use the native Win32 synchronization objects to implement blocking.

LPBLOCKINGCALLBACK is defined as follows:

typedef BOOL ( CALLBACK FAR * LPBLOCKINGCALLBACK )( DWORD dwContext );
 

The blocking callback will return TRUE if the service provider is to continue waiting for the blocking operation to complete, FALSE if the blocking operation has been canceled with the WSPCancelBlockingCall.

Any missing components of the address will be default to a reasonable values if possible. For example, a missing port number will default to zero.

Return Values

If no error occurs, WPUQueryBlockingCallback returns zero and stores a pointer to a blocking callback function in lpfnCallback and an associated context value in lpdwContext. Otherwise, it returns SOCKET_ERROR, and a specific error code is available in lpErrno.

Error Codes

WSAEFAULT The lpfnCallback or the lpdwContext argument is not a valid part of the process address space.
WSAEINVAL dwCatalogEntryId is invalid.

QuickInfo

  Windows NT: Yes
  Windows: Yes
  Windows CE: Unsupported.
  Header: Declared in ws2spi.h.

See Also

WSPCancelBlockingCall