Skip to content

Latest commit

 

History

History
138 lines (103 loc) · 4.07 KB

nf-ws2spi-wpuqueryblockingcallback.md

File metadata and controls

138 lines (103 loc) · 4.07 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:ws2spi.WPUQueryBlockingCallback
WPUQueryBlockingCallback function (ws2spi.h)
The WPUQueryBlockingCallback function returns a pointer to a callback function the service provider should invoke periodically while servicing blocking operations.
WPUQueryBlockingCallback
WPUQueryBlockingCallback function [Winsock]
_win32_wpuqueryblockingcallback_2
winsock.wpuqueryblockingcallback_2
ws2spi/WPUQueryBlockingCallback
winsock\wpuqueryblockingcallback_2.htm
WinSock
08e6215c-536f-4ab2-9d34-096b919ef0be
12/05/2018
WPUQueryBlockingCallback, WPUQueryBlockingCallback function [Winsock], _win32_wpuqueryblockingcallback_2, winsock.wpuqueryblockingcallback_2, ws2spi/WPUQueryBlockingCallback
ws2spi.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
Windows
19H1
WPUQueryBlockingCallback
ws2spi/WPUQueryBlockingCallback
c++
APIRef
kbSyntax
UserDefined
Ws2spi.h
WPUQueryBlockingCallback

WPUQueryBlockingCallback function

-description

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

-parameters

-param dwCatalogEntryId [in]

Descriptor identifying the calling service provider.

-param lplpfnCallback [out]

Pointer that receives the blocking callback function.

-param lpdwContext [out]

Pointer that receives a context value that the service provider must pass into the blocking callback.

-param lpErrno [out]

Pointer to the error code.

-returns

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 code Meaning
WSAEFAULT
The lpfnCallback or the lpdwContext parameter is not a valid part of the process address space.
WSAEINVAL
The dwCatalogEntryId parameter is invalid.
 
 

-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.

In Windows, 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 Windows 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. It will return FALSE if the blocking operation has been canceled with the WSPCancelBlockingCall.

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

-see-also

WSPCancelBlockingCall