1 | /*
|
---|
2 | * Copyright (C) 2007 Francois Gouget
|
---|
3 | *
|
---|
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.
|
---|
8 | *
|
---|
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.
|
---|
13 | *
|
---|
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
|
---|
17 | */
|
---|
18 |
|
---|
19 | /*
|
---|
20 | * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
21 | * other than GPL or LGPL is available it will apply instead, Sun elects to use only
|
---|
22 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
23 | * a choice of LGPL license versions is made available with the language indicating
|
---|
24 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
25 | * of the LGPL is applied is otherwise unspecified.
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef __WINE_RPCASYNC_H
|
---|
29 | #define __WINE_RPCASYNC_H
|
---|
30 |
|
---|
31 |
|
---|
32 | typedef struct tagRPC_ERROR_ENUM_HANDLE
|
---|
33 | {
|
---|
34 | ULONG Signature;
|
---|
35 | void* CurrentPos;
|
---|
36 | void* Head;
|
---|
37 | } RPC_ERROR_ENUM_HANDLE;
|
---|
38 |
|
---|
39 | typedef enum tagExtendedErrorParamTypes
|
---|
40 | {
|
---|
41 | eeptAnsiString = 1,
|
---|
42 | eeptUnicodeString,
|
---|
43 | eeptLongVal,
|
---|
44 | eeptShortVal,
|
---|
45 | eeptPointerVal,
|
---|
46 | eeptNone,
|
---|
47 | eeptBinary
|
---|
48 | } ExtendedErrorParamTypes;
|
---|
49 |
|
---|
50 | #define MaxNumberOfEEInfoParams 4
|
---|
51 | #define RPC_EEINFO_VERSION 1
|
---|
52 |
|
---|
53 | typedef struct tagBinaryParam
|
---|
54 | {
|
---|
55 | void *Buffer;
|
---|
56 | short Size;
|
---|
57 | } BinaryParam;
|
---|
58 |
|
---|
59 | typedef struct tagRPC_EE_INFO_PARAM
|
---|
60 | {
|
---|
61 | ExtendedErrorParamTypes ParameterType;
|
---|
62 | union
|
---|
63 | {
|
---|
64 | LPSTR AnsiString;
|
---|
65 | LPWSTR UnicodeString;
|
---|
66 | LONG LVal;
|
---|
67 | short SVal;
|
---|
68 | ULONGLONG PVal;
|
---|
69 | BinaryParam BVal;
|
---|
70 | } u;
|
---|
71 | } RPC_EE_INFO_PARAM;
|
---|
72 |
|
---|
73 | #define EEInfoPreviousRecordsMissing 0x1
|
---|
74 | #define EEInfoNextRecordsMissing 0x2
|
---|
75 | #define EEInfoUseFileTime 0x4
|
---|
76 |
|
---|
77 | #define EEInfoGCCOM 11
|
---|
78 | #define EEInfoGCFRS 12
|
---|
79 |
|
---|
80 | typedef struct tagRPC_EXTENDED_ERROR_INFO
|
---|
81 | {
|
---|
82 | ULONG Version;
|
---|
83 | LPWSTR ComputerName;
|
---|
84 | ULONG ProcessID;
|
---|
85 | union
|
---|
86 | {
|
---|
87 | SYSTEMTIME SystemTime;
|
---|
88 | FILETIME FileTime;
|
---|
89 | } u;
|
---|
90 | ULONG GeneratingComponent;
|
---|
91 | ULONG Status;
|
---|
92 | USHORT DetectionLocation;
|
---|
93 | USHORT Flags;
|
---|
94 | int NumberOfParameters;
|
---|
95 | RPC_EE_INFO_PARAM Parameters[MaxNumberOfEEInfoParams];
|
---|
96 | } RPC_EXTENDED_ERROR_INFO;
|
---|
97 |
|
---|
98 | #define RPC_ASYNC_VERSION_1_0 sizeof(RPC_ASYNC_STATE)
|
---|
99 |
|
---|
100 | typedef enum _RPC_NOTIFICATION_TYPES
|
---|
101 | {
|
---|
102 | RpcNotificationTypeNone,
|
---|
103 | RpcNotificationTypeEvent,
|
---|
104 | RpcNotificationTypeApc,
|
---|
105 | RpcNotificationTypeIoc,
|
---|
106 | RpcNotificationTypeHwnd,
|
---|
107 | RpcNotificationTypeCallback,
|
---|
108 | } RPC_NOTIFICATION_TYPES;
|
---|
109 |
|
---|
110 | typedef enum _RPC_ASYNC_EVENT
|
---|
111 | {
|
---|
112 | RpcCallComplete,
|
---|
113 | RpcSendComplete,
|
---|
114 | RpcReceiveComplete,
|
---|
115 | RpcClientDisconnect,
|
---|
116 | RpcClientCancel,
|
---|
117 | } RPC_ASYNC_EVENT;
|
---|
118 |
|
---|
119 | struct _RPC_ASYNC_STATE;
|
---|
120 |
|
---|
121 | typedef void RPC_ENTRY RPCNOTIFICATION_ROUTINE(struct _RPC_ASYNC_STATE *,void *,RPC_ASYNC_EVENT);
|
---|
122 | typedef RPCNOTIFICATION_ROUTINE *PFN_RPCNOTIFICATION_ROUTINE;
|
---|
123 |
|
---|
124 | typedef union _RPC_ASYNC_NOTIFICATION_INFO
|
---|
125 | {
|
---|
126 | struct
|
---|
127 | {
|
---|
128 | PFN_RPCNOTIFICATION_ROUTINE NotificationRoutine;
|
---|
129 | HANDLE hThread;
|
---|
130 | } APC;
|
---|
131 | struct
|
---|
132 | {
|
---|
133 | HANDLE hIOPort;
|
---|
134 | DWORD dwNumberOfBytesTransferred;
|
---|
135 | DWORD_PTR dwCompletionKey;
|
---|
136 | LPOVERLAPPED lpOverlapped;
|
---|
137 | } IOC;
|
---|
138 | struct
|
---|
139 | {
|
---|
140 | HWND hWnd;
|
---|
141 | UINT Msg;
|
---|
142 | } HWND;
|
---|
143 | HANDLE hEvent;
|
---|
144 | PFN_RPCNOTIFICATION_ROUTINE NotificationRoutine;
|
---|
145 | } RPC_ASYNC_NOTIFICATION_INFO, *PRPC_ASYNC_NOTIFICATION_INFO;
|
---|
146 |
|
---|
147 | #define RPC_C_NOTIFY_ON_SEND_COMPLETE 0x1
|
---|
148 | #define RPC_C_INFINITE_TIMEOUT INFINITE
|
---|
149 |
|
---|
150 | typedef struct _RPC_ASYNC_STATE
|
---|
151 | {
|
---|
152 | unsigned int Size;
|
---|
153 | ULONG Signature;
|
---|
154 | LONG Lock;
|
---|
155 | ULONG Flags;
|
---|
156 | void *StubInfo;
|
---|
157 | void *UserInfo;
|
---|
158 | void *RuntimeInfo;
|
---|
159 | RPC_ASYNC_EVENT Event;
|
---|
160 | RPC_NOTIFICATION_TYPES NotificationType;
|
---|
161 | RPC_ASYNC_NOTIFICATION_INFO u;
|
---|
162 | LONG_PTR Reserved[4];
|
---|
163 | } RPC_ASYNC_STATE, *PRPC_ASYNC_STATE;
|
---|
164 |
|
---|
165 | #define RpcAsyncGetCallHandle(async) (((PRPC_ASYNC_STATE)async)->RuntimeInfo)
|
---|
166 |
|
---|
167 | #ifdef __cplusplus
|
---|
168 | extern "C" {
|
---|
169 | #endif
|
---|
170 |
|
---|
171 | RPCRTAPI RPC_STATUS RPC_ENTRY RpcAsyncInitializeHandle(PRPC_ASYNC_STATE,unsigned int);
|
---|
172 | RPCRTAPI RPC_STATUS RPC_ENTRY RpcAsyncRegisterInfo(PRPC_ASYNC_STATE);
|
---|
173 | RPCRTAPI RPC_STATUS RPC_ENTRY RpcAsyncGetCallStatus(PRPC_ASYNC_STATE);
|
---|
174 | RPCRTAPI RPC_STATUS RPC_ENTRY RpcAsyncCompleteCall(PRPC_ASYNC_STATE,void *);
|
---|
175 | RPCRTAPI RPC_STATUS RPC_ENTRY RpcAsyncAbortCall(PRPC_ASYNC_STATE,ULONG);
|
---|
176 | RPCRTAPI RPC_STATUS RPC_ENTRY RpcAsyncCancelCall(PRPC_ASYNC_STATE,BOOL);
|
---|
177 | RPCRTAPI RPC_STATUS RPC_ENTRY RpcAsyncCleanupThread(DWORD);
|
---|
178 | RPCRTAPI RPC_STATUS RPC_ENTRY RpcErrorStartEnumeration(RPC_ERROR_ENUM_HANDLE*);
|
---|
179 | RPCRTAPI RPC_STATUS RPC_ENTRY RpcErrorGetNextRecord(RPC_ERROR_ENUM_HANDLE*,BOOL,RPC_EXTENDED_ERROR_INFO*);
|
---|
180 | RPCRTAPI RPC_STATUS RPC_ENTRY RpcErrorEndEnumeration(RPC_ERROR_ENUM_HANDLE*);
|
---|
181 | RPCRTAPI RPC_STATUS RPC_ENTRY RpcErrorResetEnumeration(RPC_ERROR_ENUM_HANDLE*);
|
---|
182 | RPCRTAPI RPC_STATUS RPC_ENTRY RpcErrorGetNumberOfRecords(RPC_ERROR_ENUM_HANDLE*,int*);
|
---|
183 | RPCRTAPI RPC_STATUS RPC_ENTRY RpcErrorSaveErrorInfo(RPC_ERROR_ENUM_HANDLE*,PVOID*,SIZE_T*);
|
---|
184 | RPCRTAPI RPC_STATUS RPC_ENTRY RpcErrorLoadErrorInfo(PVOID,SIZE_T,RPC_ERROR_ENUM_HANDLE*);
|
---|
185 | RPCRTAPI RPC_STATUS RPC_ENTRY RpcErrorAddRecord(RPC_EXTENDED_ERROR_INFO*);
|
---|
186 | RPCRTAPI RPC_STATUS RPC_ENTRY RpcErrorClearInformation(void);
|
---|
187 | RPCRTAPI RPC_STATUS RPC_ENTRY RpcGetAuthorizationContextForClient(RPC_BINDING_HANDLE,BOOL,LPVOID,PLARGE_INTEGER,LUID,DWORD,PVOID,PVOID*);
|
---|
188 | RPCRTAPI RPC_STATUS RPC_ENTRY RpcFreeAuthorizationContext(PVOID*);
|
---|
189 | RPCRTAPI RPC_STATUS RPC_ENTRY RpcSsContextLockExclusive(RPC_BINDING_HANDLE,PVOID);
|
---|
190 | RPCRTAPI RPC_STATUS RPC_ENTRY RpcSsContextLockShared(RPC_BINDING_HANDLE,PVOID);
|
---|
191 |
|
---|
192 | RPCRTAPI RPC_STATUS RPC_ENTRY I_RpcAsyncSetHandle(PRPC_MESSAGE,PRPC_ASYNC_STATE);
|
---|
193 | RPCRTAPI RPC_STATUS RPC_ENTRY I_RpcAsyncAbortCall(PRPC_ASYNC_STATE,ULONG);
|
---|
194 | RPCRTAPI int RPC_ENTRY I_RpcExceptionFilter(ULONG);
|
---|
195 |
|
---|
196 | #ifdef __cplusplus
|
---|
197 | }
|
---|
198 | #endif
|
---|
199 |
|
---|
200 | #endif
|
---|