WinAPPCCancelBlockingCall()

This function cancels any outstanding blocking operation for its thread. If Personal Communications cancels an outstanding blocked call, it generates an error code of AP_CANCELLED. Use this call only from within a blocking hook function. Personal Communications and Communications Server provides this function for backward compatibility with existing applications.

Syntax

Int WINAPI WINAPPCCancelBlockingCall(void);

Returned Values

The return value specifies whether the cancellation request was successful. If the value is 0, Personal Communications canceled the request. Otherwise, the value is the following error code:
WAPPCINVALID
There is no outstanding blocking call.

Usage Notes

If the outstanding verb relates to a conversation (for example, SEND_DATA or RECEIVE_AND_WAIT), Personal Communications purges the verb and deactivates the session. If the verb relates to a transaction program (for example, RECEIVE_ALLOCATE or TP_STARTED), Personal Communications ends the transaction program. In both cases, although Personal Communications deactivates conversations and sessions as cleanly as possible, it does not flush send buffers or waiting-for-confirmations or other pending actions. This call is synchronous. After the previously described processing is complete, the function is finished.

A multithreaded application can have multiple blocking operations outstanding, but only one per thread. To distinguish between multiple outstanding calls, WinAPPCCancelBlockingCall() cancels the outstanding operation on the current, or calling, application thread if one exists; otherwise, it fails. APPC suspends the calling application thread while an operation is outstanding. As a result, the thread on which the blocking operation was initiated does not regain control (and therefore, is not be able to issue a call to WinAPPCCancelBlockingCall()) unless the application has previously registered a blocking hook for the thread by using WinAPPCSetBlockingHook.

Displays the note icon.
This is not supported for Win32® SNA API clients.