The RPC_ASYNC_STATE structure holds the state of an asynchronous remote procedure call. PRPC_ASYNC_STATE is a handle to this structure, used to wait for, query, reply to, or cancel asynchronous calls.
typedef struct _RPC_ASYNC_STATE {
unsigned int Size;
unsigned long Signature;
long Lock;
void * StubInfo
void * UserInfo
void * RuntimeInfo
RPC_ASYNC_EVENT Event
RPC_NOTIFICATION_TYPES NotificationType
union {
struct {
PFN_RPCNOTIFICATION_ROUTINE NotificationRoutine;
HANDLE hThread;
} APC;
struct {
HANDLE hIOPort;
DWORD dwNumberOfBytesTransferred;
DWORD dwCompletionKey;
LPOVERLAPPED lpOverlapped;
} IOC;
struct {
HWND hWnd;
UINT Msg
} HWND;//not implemented in Beta1
HANDLE hEvent;
PFN_RPCNOTIFICATION_ROUTINE NotificationRoutine;
} u;
long Reserved[4];
} RPC_ASYNC_STATE, *PRPC_ASYNC_STATE ;
The size, in bytes, of this structure. The run-time environment sets this field when RpcAsyncInitializeHandle is called. Do not modify this field.
The run-time environment sets this field when RpcAsyncInitializeHandle is called. Do not modify this field.
The run-time environment sets this field when RpcAsyncInitializeHandle is called. Do not modify this field.
The client allocates space for the RPC_ASYNC_STATE structure and an associated handle, and calls RpcAsyncInitializeHandle to initialize the structure. After the run-time environment has successfully initialized the structure, the client initializes the NotificationType, NotificationRoutine, hThread and UserInfo fields. The notification type may be any one of the following:
Notification Type | Description |
---|---|
RpcNotificationTypeNone | There is no notification. |
RpcNotificationTypeEvent | Notification by event. |
RpcNotificationTypeApc | Notification by Win32 Asynchronous Procedure Calls. |
RpcNotificationTypeIoc | Notification by I/O completion port. |
RpcNotificationTypeHwnd | Notification by Windows message. |
Asynchronous RPC, RpcAsyncAbortCall, RpcAsyncCancelCall, RpcAsyncCompleteCall, RpcAsyncGetCallHandle, RpcAsyncGetCallStatus, RpcAsyncInitializeHandle, RpcAsyncRegisterInfo, RpcServerTestCancel