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
21 #ifdef RPC_NO_WINDOWS_H
26 # include <pshpack8.h>
29 typedef struct tagRPC_ERROR_ENUM_HANDLE
34 } RPC_ERROR_ENUM_HANDLE
;
36 typedef enum tagExtendedErrorParamTypes
45 } ExtendedErrorParamTypes
;
47 #define MaxNumberOfEEInfoParams 4
48 #define RPC_EEINFO_VERSION 1
50 typedef struct tagBinaryParam
56 typedef struct tagRPC_EE_INFO_PARAM
58 ExtendedErrorParamTypes ParameterType
;
70 #define EEInfoPreviousRecordsMissing 0x1
71 #define EEInfoNextRecordsMissing 0x2
72 #define EEInfoUseFileTime 0x4
74 #define EEInfoGCCOM 11
75 #define EEInfoGCFRS 12
77 typedef struct tagRPC_EXTENDED_ERROR_INFO
84 SYSTEMTIME SystemTime
;
87 ULONG GeneratingComponent
;
89 USHORT DetectionLocation
;
91 int NumberOfParameters
;
92 RPC_EE_INFO_PARAM Parameters
[MaxNumberOfEEInfoParams
];
93 } RPC_EXTENDED_ERROR_INFO
;
95 #define RPC_ASYNC_VERSION_1_0 sizeof(RPC_ASYNC_STATE)
97 typedef enum _RPC_NOTIFICATION_TYPES
99 RpcNotificationTypeNone
,
100 RpcNotificationTypeEvent
,
101 RpcNotificationTypeApc
,
102 RpcNotificationTypeIoc
,
103 RpcNotificationTypeHwnd
,
104 RpcNotificationTypeCallback
,
105 } RPC_NOTIFICATION_TYPES
;
107 typedef enum _RPC_ASYNC_EVENT
116 struct _RPC_ASYNC_STATE
;
118 typedef void RPC_ENTRY
RPCNOTIFICATION_ROUTINE(struct _RPC_ASYNC_STATE
*,void *,RPC_ASYNC_EVENT
);
119 typedef RPCNOTIFICATION_ROUTINE
*PFN_RPCNOTIFICATION_ROUTINE
;
121 typedef union _RPC_ASYNC_NOTIFICATION_INFO
125 PFN_RPCNOTIFICATION_ROUTINE NotificationRoutine
;
131 DWORD dwNumberOfBytesTransferred
;
132 DWORD_PTR dwCompletionKey
;
133 LPOVERLAPPED lpOverlapped
;
141 PFN_RPCNOTIFICATION_ROUTINE NotificationRoutine
;
142 } RPC_ASYNC_NOTIFICATION_INFO
, *PRPC_ASYNC_NOTIFICATION_INFO
;
144 #define RPC_C_NOTIFY_ON_SEND_COMPLETE 0x1
145 #define RPC_C_INFINITE_TIMEOUT INFINITE
147 typedef struct _RPC_ASYNC_STATE
156 RPC_ASYNC_EVENT Event
;
157 RPC_NOTIFICATION_TYPES NotificationType
;
158 RPC_ASYNC_NOTIFICATION_INFO u
;
159 LONG_PTR Reserved
[4];
160 } RPC_ASYNC_STATE
, *PRPC_ASYNC_STATE
;
162 #define RpcAsyncGetCallHandle(async) (((PRPC_ASYNC_STATE)async)->RuntimeInfo)
165 # include <poppack.h>
172 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcAsyncInitializeHandle(PRPC_ASYNC_STATE
,unsigned int);
173 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcAsyncRegisterInfo(PRPC_ASYNC_STATE
);
174 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcAsyncGetCallStatus(PRPC_ASYNC_STATE
);
175 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcAsyncCompleteCall(PRPC_ASYNC_STATE
,void *);
176 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcAsyncAbortCall(PRPC_ASYNC_STATE
,ULONG
);
177 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcAsyncCancelCall(PRPC_ASYNC_STATE
,BOOL
);
178 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcAsyncCleanupThread(DWORD
);
179 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcErrorStartEnumeration(RPC_ERROR_ENUM_HANDLE
*);
180 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcErrorGetNextRecord(RPC_ERROR_ENUM_HANDLE
*,BOOL
,RPC_EXTENDED_ERROR_INFO
*);
181 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcErrorEndEnumeration(RPC_ERROR_ENUM_HANDLE
*);
182 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcErrorResetEnumeration(RPC_ERROR_ENUM_HANDLE
*);
183 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcErrorGetNumberOfRecords(RPC_ERROR_ENUM_HANDLE
*,int*);
184 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcErrorSaveErrorInfo(RPC_ERROR_ENUM_HANDLE
*,PVOID
*,SIZE_T
*);
185 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcErrorLoadErrorInfo(PVOID
,SIZE_T
,RPC_ERROR_ENUM_HANDLE
*);
186 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcErrorAddRecord(RPC_EXTENDED_ERROR_INFO
*);
187 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcErrorClearInformation(void);
188 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcGetAuthorizationContextForClient(RPC_BINDING_HANDLE
,BOOL
,LPVOID
,PLARGE_INTEGER
,LUID
,DWORD
,PVOID
,PVOID
*);
189 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcFreeAuthorizationContext(PVOID
*);
190 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcSsContextLockExclusive(RPC_BINDING_HANDLE
,PVOID
);
191 RPCRTAPI RPC_STATUS RPC_ENTRY
RpcSsContextLockShared(RPC_BINDING_HANDLE
,PVOID
);
193 RPCRTAPI RPC_STATUS RPC_ENTRY
I_RpcAsyncSetHandle(PRPC_MESSAGE
,PRPC_ASYNC_STATE
);
194 RPCRTAPI RPC_STATUS RPC_ENTRY
I_RpcAsyncAbortCall(PRPC_ASYNC_STATE
,ULONG
);
195 RPCRTAPI
int RPC_ENTRY
I_RpcExceptionFilter(ULONG
);