WinAsyncAPPC()
This is an asynchronous entry point for all of the APPC verbs. An application uses this entry point if it chooses to be notified of completion through a Windows® message. Personal Communications and Communications Server provide this entry point for compatibility with existing applications.
Syntax
HANDLE WINAPI WinAsyncAPPC(HWND hWnd,long vcb)
Parameters
- hwnd
- Window handle to receive completion message.
- vcb
- Pointer to verb control block.
Returned Values
The return value specifies whether the asynchronous request completed successfully.
If the request was successful, the actual return value is a handle. If the
function was not successful, Personal Communications returns a 0.
Usage Notes
- [MC_]ALLOCATE
- CANCEL_CONVERSATION
- [MC_]CONFIRM
- [MC_]CONFIRMED
- [MC_]DEALLOCATE
- [MC_]FLUSH
- [MC_]PREPARE_TO_RECEIVE
- RECEIVE_ALLOCATE
- [MC_]RECEIVE_AND_WAIT
- [MC_]RECEIVE_EXPEDITED_DATA
- [MC_]REQUEST_TO_SEND
- [MC_]SEND_CONVERSATION
- [MC_]SEND DATA
- [MC_]SEND_ERROR
- [MC_]SEND_EXPEDITED_DATA
- TP_ENDED
- TP_STARTED
The WinAsyncAPPC entry point permits the verb to be canceled, but does not support queue-level nonblocking. The APPC entry point supports queue-level nonblocking, but does not permit the application to cancel the verb.
- REQUEST_TO_SEND
- CANCEL_CONVERSATION
- GET_TYPE
- GET_ATTRIBUTES
- TEST_RTS
- DEALLOCATE (AP_ABEND_PROG, AP_ABEND_SVC, or AP_ABEND_TIMER)
- SEND_ERROR
- TP_ENDED
This enables an application, such as a server, to use an asynchronous RECEIVE_AND_WAIT to receive data. While the RECEIVE_AND_POST or RECEIVE_AND_WAIT is outstanding, the application can still use SEND_ERROR and REQUEST_TO_SEND.
When the asynchronous operation is complete, the application's window hWnd receives the message returned by RegisterWindowMessage with WinAsyncAPPC
as the input string. The wParam argument contains
the asynchronous task handle returned by the original function call. The IParam argument contains the original VCB pointer and can be used to
determine the final return code.
WinAPPCCancelAsyncRequest permits an application to cancel any asynchronous APPC action, but terminates the related conversation or transaction program as appropriate. Any outstanding operations return with AP_CANCELLED as the return code.
If the function returns successfully, Personal Communications posts a WinAsyncAPPC() message to the application when the operation completes or the conversation is canceled.