2 * Copyright (C) 2007 Francois Gouget
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 #ifndef __WINE_RPCASYNC_H
19 #define __WINE_RPCASYNC_H
22 typedef struct tagRPC_ERROR_ENUM_HANDLE
27 } RPC_ERROR_ENUM_HANDLE
;
29 typedef enum tagExtendedErrorParamTypes
38 } ExtendedErrorParamTypes
;
40 #define MaxNumberOfEEInfoParams 4
41 #define RPC_EEINFO_VERSION 1
43 typedef struct tagBinaryParam
49 typedef struct tagRPC_EE_INFO_PARAM
51 ExtendedErrorParamTypes ParameterType
;
63 #define EEInfoPreviousRecordsMissing 0x1
64 #define EEInfoNextRecordsMissing 0x2
65 #define EEInfoUseFileTime 0x4
67 #define EEInfoGCCOM 11
68 #define EEInfoGCFRS 12
70 typedef struct tagRPC_EXTENDED_ERROR_INFO
77 SYSTEMTIME SystemTime
;
80 ULONG GeneratingComponent
;
82 USHORT DetectionLocation
;
84 int NumberOfParameters
;
85 RPC_EE_INFO_PARAM Parameters
[MaxNumberOfEEInfoParams
];
86 } RPC_EXTENDED_ERROR_INFO
;
88 #define RPC_ASYNC_VERSION_1_0 sizeof(RPC_ASYNC_STATE)
90 typedef enum _RPC_NOTIFICATION_TYPES
92 RpcNotificationTypeNone
,
93 RpcNotificationTypeEvent
,
94 RpcNotificationTypeApc
,
95 RpcNotificationTypeIoc
,
96 RpcNotificationTypeHwnd
,
97 RpcNotificationTypeCallback
,
98 } RPC_NOTIFICATION_TYPES
;
100 typedef enum _RPC_ASYNC_EVENT
109 struct _RPC_ASYNC_STATE
;
111 typedef void RPC_ENTRY
RPCNOTIFICATION_ROUTINE(struct _RPC_ASYNC_STATE
*,void *,RPC_ASYNC_EVENT
);
112 typedef RPCNOTIFICATION_ROUTINE
*PFN_RPCNOTIFICATION_ROUTINE
;
114 typedef union _RPC_ASYNC_NOTIFICATION_INFO
118 PFN_RPCNOTIFICATION_ROUTINE NotificationRoutine
;
124 DWORD dwNumberOfBytesTransferred
;
125 DWORD_PTR dwCompletionKey
;
126 LPOVERLAPPED lpOverlapped
;
134 PFN_RPCNOTIFICATION_ROUTINE NotificationRoutine
;
135 } RPC_ASYNC_NOTIFICATION_INFO
, *PRPC_ASYNC_NOTIFICATION_INFO
;
137 #define RPC_C_NOTIFY_ON_SEND_COMPLETE 0x1
138 #define RPC_C_INFINITE_TIMEOUT INFINITE
140 typedef struct _RPC_ASYNC_STATE
149 RPC_ASYNC_EVENT Event
;
150 RPC_NOTIFICATION_TYPES NotificationType
;
151 RPC_ASYNC_NOTIFICATION_INFO u
;
152 LONG_PTR Reserved
[4];
153 } RPC_ASYNC_STATE
, *PRPC_ASYNC_STATE
;
155 #define RpcAsyncGetCallHandle(async) (((PRPC_ASYNC_STATE)async)->RuntimeInfo)
161 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcAsyncInitializeHandle(PRPC_ASYNC_STATE
,unsigned int);
162 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcAsyncRegisterInfo(PRPC_ASYNC_STATE
);
163 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcAsyncGetCallStatus(PRPC_ASYNC_STATE
);
164 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcAsyncCompleteCall(PRPC_ASYNC_STATE
,void *);
165 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcAsyncAbortCall(PRPC_ASYNC_STATE
,ULONG
);
166 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcAsyncCancelCall(PRPC_ASYNC_STATE
,BOOL
);
167 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcAsyncCleanupThread(DWORD
);
168 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcErrorStartEnumeration(RPC_ERROR_ENUM_HANDLE
*);
169 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcErrorGetNextRecord(RPC_ERROR_ENUM_HANDLE
*,BOOL
,RPC_EXTENDED_ERROR_INFO
*);
170 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcErrorEndEnumeration(RPC_ERROR_ENUM_HANDLE
*);
171 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcErrorResetEnumeration(RPC_ERROR_ENUM_HANDLE
*);
172 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcErrorGetNumberOfRecords(RPC_ERROR_ENUM_HANDLE
*,int*);
173 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcErrorSaveErrorInfo(RPC_ERROR_ENUM_HANDLE
*,PVOID
*,SIZE_T
*);
174 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcErrorLoadErrorInfo(PVOID
,SIZE_T
,RPC_ERROR_ENUM_HANDLE
*);
175 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcErrorAddRecord(RPC_EXTENDED_ERROR_INFO
*);
176 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcErrorClearInformation(void);
177 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcGetAuthorizationContextForClient(RPC_BINDING_HANDLE
,BOOL
,LPVOID
,PLARGE_INTEGER
,LUID
,DWORD
,PVOID
,PVOID
*);
178 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcFreeAuthorizationContext(PVOID
*);
179 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcSsContextLockExclusive(RPC_BINDING_HANDLE
,PVOID
);
180 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcSsContextLockShared(RPC_BINDING_HANDLE
,PVOID
);
182 RPCRTAPI RPC_STATUS RPC_ENTRY
I_RpcAsyncSetHandle(PRPC_MESSAGE
,PRPC_ASYNC_STATE
);
183 RPCRTAPI RPC_STATUS RPC_ENTRY
I_RpcAsyncAbortCall(PRPC_ASYNC_STATE
,ULONG
);
184 RPCRTAPI
int RPC_ENTRY
I_RpcExceptionFilter(ULONG
);