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