ReactOS 0.4.15-dev-7704-gc07eb9f
ndrtypes.h
Go to the documentation of this file.
1/*
2 * NDR Types
3 *
4 * Copyright 2006 Robert Shearman (for CodeWeavers)
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#ifndef __NDRTYPES_H__
22#define __NDRTYPES_H__
23
24#include <limits.h>
25
26typedef struct
27{
28 unsigned short MustSize : 1; /* 0x0001 - client interpreter MUST size this
29 * parameter, other parameters may be skipped, using the value in
30 * NDR_PROC_PARTIAL_OIF_HEADER::constant_client_buffer_size instead. */
31 unsigned short MustFree : 1; /* 0x0002 - server interpreter MUST size this
32 * parameter, other parameters may be skipped, using the value in
33 * NDR_PROC_PARTIAL_OIF_HEADER::constant_server_buffer_size instead. */
34 unsigned short IsPipe : 1; /* 0x0004 - The parameter is a pipe handle */
35 unsigned short IsIn : 1; /* 0x0008 - The parameter is an input */
36 unsigned short IsOut : 1; /* 0x0010 - The parameter is an output */
37 unsigned short IsReturn : 1; /* 0x0020 - The parameter is to be returned */
38 unsigned short IsBasetype : 1; /* 0x0040 - The parameter is simple and has the
39 * format defined by NDR_PARAM_OIF_BASETYPE rather than by
40 * NDR_PARAM_OIF_OTHER. */
41 unsigned short IsByValue : 1; /* 0x0080 - Set for compound types being sent by
42 * value. Can be of type: structure, union, transmit_as, represent_as,
43 * wire_marshal and SAFEARRAY. */
44 unsigned short IsSimpleRef : 1; /* 0x0100 - parameter that is a reference
45 * pointer to anything other than another pointer, and which has no
46 * allocate attributes. */
47 unsigned short IsDontCallFreeInst : 1; /* 0x0200 - Used for some represent_as types
48 * for when the free instance routine should not be called. */
49 unsigned short SaveForAsyncFinish : 1; /* 0x0400 - Unknown */
50 unsigned short Unused : 2;
51 unsigned short ServerAllocSize : 3; /* 0xe000 - If non-zero
52 * specifies the size of the object in numbers of 8byte blocks needed.
53 * It will be stored on the server's stack rather than using an allocate
54 * call. */
56
57typedef struct
58{
59 unsigned char ServerMustSize : 1; /* 0x01 - the server must perform a
60 * sizing pass. */
61 unsigned char ClientMustSize : 1; /* 0x02 - the client must perform a
62 * sizing pass. */
63 unsigned char HasReturn : 1; /* 0x04 - procedure has a return value. */
64 unsigned char HasPipes : 1; /* 0x08 - the pipe package should be used. */
65 unsigned char Unused : 1; /* 0x10 - not used */
66 unsigned char HasAsyncUuid : 1; /* 0x20 - indicates an asynchronous DCOM
67 * procedure. */
68 unsigned char HasExtensions : 1; /* 0x40 - indicates that Win2000
69 * extensions are in use. */
70 unsigned char HasAsyncHandle : 1; /* 0x80 - indicates an asynchronous RPC
71 * procedure. */
73
74typedef struct
75{
76 unsigned char HasNewCorrDesc : 1; /* 0x01 - indicates new correlation
77 * descriptors in use. */
78 unsigned char ClientCorrCheck : 1; /* 0x02 - client needs correlation
79 * check. */
80 unsigned char ServerCorrCheck : 1; /* 0x04 - server needs correlation
81 * check. */
82 unsigned char HasNotify : 1; /* 0x08 - should call MIDL [notify]
83 * routine @ NotifyIndex. */
84 unsigned char HasNotify2 : 1; /* 0x10 - should call MIDL [notify_flag] routine @
85 * NotifyIndex. */
86
87 /* The following bits are in fact used by midl but haven't yet been
88 named in the SDK. */
89 unsigned char Unused : 3; /* 0x20 - has complex return */
90 /* 0x40 - has range on conformance */
92
93/* Win2000 extensions */
94typedef struct
95{
96 /* size in bytes of all following extensions */
97 unsigned char Size;
98
100
101 /* client cache size hint */
102 unsigned short ClientCorrHint;
103
104 /* server cache size hint */
105 unsigned short ServerCorrHint;
106
107 /* index of routine in MIDL_STUB_DESC::NotifyRoutineTable to call if
108 * HasNotify or HasNotify2 flag set */
109 unsigned short NotifyIndex;
111
112typedef struct
113{
114 /* size in bytes of all following extensions */
115 unsigned char Size;
116
118
119 /* client cache size hint */
120 unsigned short ClientCorrHint;
121
122 /* server cache size hint */
123 unsigned short ServerCorrHint;
124
125 /* index of routine in MIDL_STUB_DESC::NotifyRoutineTable to call if
126 * HasNotify or HasNotify2 flag set */
127 unsigned short NotifyIndex;
128
129 /* needed only on IA64 to cope with float/register loading */
130 unsigned short FloatArgMask;
132
133typedef enum
134{
135 FC_BYTE = 0x01, /* 0x01 */
136 FC_CHAR, /* 0x02 */
137 FC_SMALL, /* 0x03 */
138 FC_USMALL, /* 0x04 */
139 FC_WCHAR, /* 0x05 */
140 FC_SHORT, /* 0x06 */
141 FC_USHORT, /* 0x07 */
142 FC_LONG, /* 0x08 */
143 FC_ULONG, /* 0x09 */
144 FC_FLOAT, /* 0x0a */
145 FC_HYPER, /* 0x0b */
146 FC_DOUBLE, /* 0x0c */
147 FC_ENUM16, /* 0x0d */
148 FC_ENUM32, /* 0x0e */
149 FC_IGNORE, /* 0x0f */
151
152 FC_RP, /* 0x11 */ /* reference pointer */
153 FC_UP, /* 0x12 */ /* unique pointer */
154 FC_OP, /* 0x13 */ /* object pointer */
155 FC_FP, /* 0x14 */ /* full pointer */
156
157 FC_STRUCT, /* 0x15 */ /* simple structure */
158 FC_PSTRUCT, /* 0x16 */ /* simple structure w/ pointers */
159 FC_CSTRUCT, /* 0x17 */ /* conformant structure */
160 FC_CPSTRUCT, /* 0x18 */ /* conformant structure w/ pointers */
161 FC_CVSTRUCT, /* 0x19 */ /* conformant varying struct */
162 FC_BOGUS_STRUCT, /* 0x1a */ /* complex structure */
163
164 FC_CARRAY, /* 0x1b */ /* conformant array */
165 FC_CVARRAY, /* 0x1c */ /* conformant varying array */
166 FC_SMFARRAY, /* 0x1d */ /* small (<64K) fixed array */
167 FC_LGFARRAY, /* 0x1e */ /* large (>= 64k) fixed array */
168 FC_SMVARRAY, /* 0x1f */ /* small (<64k) varying array */
169 FC_LGVARRAY, /* 0x20 */ /* large (>= 64k) varying array */
170 FC_BOGUS_ARRAY, /* 0x21 */ /* complex array */
171
172 FC_C_CSTRING, /* 0x22 */ /* conformant char string */
173 FC_C_BSTRING, /* 0x23 */
174 FC_C_SSTRING, /* 0x24 */
175 FC_C_WSTRING, /* 0x25 */ /* conformant wchar string */
176 FC_CSTRING, /* 0x26 */ /* non-conformant char string */
177 FC_BSTRING, /* 0x27 */
178 FC_SSTRING, /* 0x28 */
179 FC_WSTRING, /* 0x29 */ /* non-conformant wchar string */
180
183
184 FC_BYTE_COUNT_POINTER, /* 0x2c */ /* [byte_count] ACF attribute */
185
186 FC_TRANSMIT_AS, /* 0x2d */
187 FC_REPRESENT_AS, /* 0x2e */
188
189 FC_IP, /* 0x2f */ /* interface pointer */
190
191 FC_BIND_CONTEXT, /* 0x30 */
192
193 FC_BIND_GENERIC, /* 0x31 */
195 FC_AUTO_HANDLE, /* 0x33 */
197
198 FC_UNUSED1, /* 0x35 */
199
200 FC_POINTER, /* 0x36 */
201
202 FC_ALIGNM2, /* 0x37 */
203 FC_ALIGNM4, /* 0x38 */
204 FC_ALIGNM8, /* 0x39 */
205
206 FC_UNUSED2, /* 0x3a */
207 FC_UNUSED3, /* 0x3b */
208 FC_UNUSED4, /* 0x3c */
209
210 FC_STRUCTPAD1, /* 0x3d */
211 FC_STRUCTPAD2, /* 0x3e */
212 FC_STRUCTPAD3, /* 0x3f */
213 FC_STRUCTPAD4, /* 0x40 */
214 FC_STRUCTPAD5, /* 0x41 */
215 FC_STRUCTPAD6, /* 0x42 */
216 FC_STRUCTPAD7, /* 0x43 */
217
218 FC_STRING_SIZED, /* 0x44 */
219
220 FC_UNUSED5, /* 0x45 */
221
222 FC_NO_REPEAT, /* 0x46 */
223 FC_FIXED_REPEAT, /* 0x47 */
225 FC_FIXED_OFFSET, /* 0x49 */
227
228 FC_PP, /* 0x4b */ /* pointer layout */
229/* FC_PP: FC_PAD layouts */
230/* layouts: FC_NO_REPEAT FC_PAD instance */
231/* instance: NdrFcShort(memofs), NdrFcShort(bufofs), desc */
232
234
235 FC_IN_PARAM, /* 0x4d */
238 FC_IN_OUT_PARAM, /* 0x50 */
239 FC_OUT_PARAM, /* 0x51 */
240 FC_RETURN_PARAM, /* 0x52 */
242
243 FC_DEREFERENCE, /* 0x54 */
244 FC_DIV_2, /* 0x55 */
245 FC_MULT_2, /* 0x56 */
246 FC_ADD_1, /* 0x57 */
247 FC_SUB_1, /* 0x58 */
248
249 FC_CALLBACK, /* 0x59 */
250
251 FC_CONSTANT_IID, /* 0x5a */
252
253 FC_END, /* 0x5b */
254 FC_PAD, /* 0x5c */
255
257
260
261 FC_USER_MARSHAL, /* 0xb4 */
262
263 FC_PIPE, /* 0xb5 */
264 FC_BLKHOLE, /* 0xb6 */
265
266 FC_RANGE, /* 0xb7 */
267
268 FC_INT3264, /* 0xb8 */
269 FC_UINT3264, /* 0xb9 */
271
272#define FC_ALLOCATE_ALL_NODES 0x01
273#define FC_DONT_FREE 0x02
274#define FC_ALLOCED_ON_STACK 0x04
275#define FC_SIMPLE_POINTER 0x08
276#define FC_POINTER_DEREF 0x10
277
278/* flags for all handle types */
279#define HANDLE_PARAM_IS_VIA_PTR 0x80
280#define HANDLE_PARAM_IS_IN 0x40
281#define HANDLE_PARAM_IS_OUT 0x20
282#define HANDLE_PARAM_IS_RETURN 0x10
283
284/* flags for context handles */
285#define NDR_STRICT_CONTEXT_HANDLE 0x08
286#define NDR_CONTEXT_HANDLE_NOSERIALIZE 0x04
287#define NDR_CONTEXT_HANDLE_SERIALIZE 0x02
288#define NDR_CONTEXT_HANDLE_CANNOT_BE_NULL 0x01
289
290#define Oi_FULL_PTR_USED 0x01
291#define Oi_RPCSS_ALLOC_USED 0x02
292#define Oi_OBJECT_PROC 0x04
293#define Oi_HAS_RPCFLAGS 0x08
294#define Oi_OBJ_USE_V2_INTERPRETER 0x20
295#define Oi_HAS_COMM_OR_FAULT 0x20
296#define Oi_USE_NEW_INIT_ROUTINES 0x40
297
298#define FC_NORMAL_CONFORMANCE (unsigned char) 0x00
299#define FC_POINTER_CONFORMANCE (unsigned char) 0x10
300#define FC_TOP_LEVEL_CONFORMANCE (unsigned char) 0x20
301#define FC_CONSTANT_CONFORMANCE (unsigned char) 0x40
302#define FC_TOP_LEVEL_MULTID_CONFORMANCE (unsigned char) 0x80
303
304#define USER_MARSHAL_UNIQUE 0x80
305#define USER_MARSHAL_REF 0x40
306#define USER_MARSHAL_POINTER 0xc0
307#define USER_MARSHAL_IID 0x20
308
309#endif
FORMAT_CHARACTER
Definition: ndrtypes.h:134
@ FC_STRUCTPAD4
Definition: ndrtypes.h:213
@ FC_BIND_PRIMITIVE
Definition: ndrtypes.h:194
@ FC_UNUSED4
Definition: ndrtypes.h:208
@ FC_ADD_1
Definition: ndrtypes.h:246
@ FC_USMALL
Definition: ndrtypes.h:138
@ FC_INT3264
Definition: ndrtypes.h:268
@ FC_STRUCT
Definition: ndrtypes.h:157
@ FC_BIND_GENERIC
Definition: ndrtypes.h:193
@ FC_SUB_1
Definition: ndrtypes.h:247
@ FC_HARD_STRUCT
Definition: ndrtypes.h:256
@ FC_SMALL
Definition: ndrtypes.h:137
@ FC_BOGUS_STRUCT
Definition: ndrtypes.h:162
@ FC_CPSTRUCT
Definition: ndrtypes.h:160
@ FC_DEREFERENCE
Definition: ndrtypes.h:243
@ FC_C_CSTRING
Definition: ndrtypes.h:172
@ FC_IGNORE
Definition: ndrtypes.h:149
@ FC_ALIGNM4
Definition: ndrtypes.h:203
@ FC_DOUBLE
Definition: ndrtypes.h:146
@ FC_TRANSMIT_AS_PTR
Definition: ndrtypes.h:258
@ FC_RETURN_PARAM_BASETYPE
Definition: ndrtypes.h:241
@ FC_SMFARRAY
Definition: ndrtypes.h:166
@ FC_USHORT
Definition: ndrtypes.h:141
@ FC_ALIGNM2
Definition: ndrtypes.h:202
@ FC_ENUM16
Definition: ndrtypes.h:147
@ FC_UNUSED2
Definition: ndrtypes.h:206
@ FC_C_WSTRING
Definition: ndrtypes.h:175
@ FC_ERROR_STATUS_T
Definition: ndrtypes.h:150
@ FC_BYTE_COUNT_POINTER
Definition: ndrtypes.h:184
@ FC_BLKHOLE
Definition: ndrtypes.h:264
@ FC_LONG
Definition: ndrtypes.h:142
@ FC_ENCAPSULATED_UNION
Definition: ndrtypes.h:181
@ FC_CHAR
Definition: ndrtypes.h:136
@ FC_BSTRING
Definition: ndrtypes.h:177
@ FC_RANGE
Definition: ndrtypes.h:266
@ FC_PIPE
Definition: ndrtypes.h:263
@ FC_OP
Definition: ndrtypes.h:154
@ FC_HYPER
Definition: ndrtypes.h:145
@ FC_NO_REPEAT
Definition: ndrtypes.h:222
@ FC_CONSTANT_IID
Definition: ndrtypes.h:251
@ FC_LGVARRAY
Definition: ndrtypes.h:169
@ FC_STRUCTPAD1
Definition: ndrtypes.h:210
@ FC_CVSTRUCT
Definition: ndrtypes.h:161
@ FC_EMBEDDED_COMPLEX
Definition: ndrtypes.h:233
@ FC_CSTRING
Definition: ndrtypes.h:176
@ FC_BOGUS_ARRAY
Definition: ndrtypes.h:170
@ FC_ULONG
Definition: ndrtypes.h:143
@ FC_UNUSED3
Definition: ndrtypes.h:207
@ FC_STRUCTPAD7
Definition: ndrtypes.h:216
@ FC_PP
Definition: ndrtypes.h:228
@ FC_ALIGNM8
Definition: ndrtypes.h:204
@ FC_MULT_2
Definition: ndrtypes.h:245
@ FC_AUTO_HANDLE
Definition: ndrtypes.h:195
@ FC_UP
Definition: ndrtypes.h:153
@ FC_IN_PARAM_NO_FREE_INST
Definition: ndrtypes.h:237
@ FC_CARRAY
Definition: ndrtypes.h:164
@ FC_SMVARRAY
Definition: ndrtypes.h:168
@ FC_NON_ENCAPSULATED_UNION
Definition: ndrtypes.h:182
@ FC_POINTER
Definition: ndrtypes.h:200
@ FC_UNUSED5
Definition: ndrtypes.h:220
@ FC_CALLBACK
Definition: ndrtypes.h:249
@ FC_PAD
Definition: ndrtypes.h:254
@ FC_STRING_SIZED
Definition: ndrtypes.h:218
@ FC_SSTRING
Definition: ndrtypes.h:178
@ FC_RP
Definition: ndrtypes.h:152
@ FC_FIXED_REPEAT
Definition: ndrtypes.h:223
@ FC_PSTRUCT
Definition: ndrtypes.h:158
@ FC_OUT_PARAM
Definition: ndrtypes.h:239
@ FC_STRUCTPAD5
Definition: ndrtypes.h:214
@ FC_WSTRING
Definition: ndrtypes.h:179
@ FC_FLOAT
Definition: ndrtypes.h:144
@ FC_STRUCTPAD2
Definition: ndrtypes.h:211
@ FC_USER_MARSHAL
Definition: ndrtypes.h:261
@ FC_CSTRUCT
Definition: ndrtypes.h:159
@ FC_C_SSTRING
Definition: ndrtypes.h:174
@ FC_ENUM32
Definition: ndrtypes.h:148
@ FC_BIND_CONTEXT
Definition: ndrtypes.h:191
@ FC_REPRESENT_AS_PTR
Definition: ndrtypes.h:259
@ FC_CVARRAY
Definition: ndrtypes.h:165
@ FC_VARIABLE_OFFSET
Definition: ndrtypes.h:226
@ FC_FIXED_OFFSET
Definition: ndrtypes.h:225
@ FC_UNUSED1
Definition: ndrtypes.h:198
@ FC_STRUCTPAD6
Definition: ndrtypes.h:215
@ FC_FP
Definition: ndrtypes.h:155
@ FC_BYTE
Definition: ndrtypes.h:135
@ FC_REPRESENT_AS
Definition: ndrtypes.h:187
@ FC_END
Definition: ndrtypes.h:253
@ FC_DIV_2
Definition: ndrtypes.h:244
@ FC_UINT3264
Definition: ndrtypes.h:269
@ FC_CALLBACK_HANDLE
Definition: ndrtypes.h:196
@ FC_TRANSMIT_AS
Definition: ndrtypes.h:186
@ FC_RETURN_PARAM
Definition: ndrtypes.h:240
@ FC_STRUCTPAD3
Definition: ndrtypes.h:212
@ FC_IP
Definition: ndrtypes.h:189
@ FC_C_BSTRING
Definition: ndrtypes.h:173
@ FC_LGFARRAY
Definition: ndrtypes.h:167
@ FC_VARIABLE_REPEAT
Definition: ndrtypes.h:224
@ FC_SHORT
Definition: ndrtypes.h:140
@ FC_IN_OUT_PARAM
Definition: ndrtypes.h:238
@ FC_IN_PARAM_BASETYPE
Definition: ndrtypes.h:236
@ FC_WCHAR
Definition: ndrtypes.h:139
@ FC_IN_PARAM
Definition: ndrtypes.h:235
struct INTERPRETER_OPT_FLAGS2 * PINTERPRETER_OPT_FLAGS2
struct INTERPRETER_OPT_FLAGS * PINTERPRETER_OPT_FLAGS
unsigned char ClientCorrCheck
Definition: ndrtypes.h:78
unsigned char HasNotify
Definition: ndrtypes.h:82
unsigned char HasNewCorrDesc
Definition: ndrtypes.h:76
unsigned char Unused
Definition: ndrtypes.h:89
unsigned char ServerCorrCheck
Definition: ndrtypes.h:80
unsigned char HasNotify2
Definition: ndrtypes.h:84
unsigned char ServerMustSize
Definition: ndrtypes.h:59
unsigned char HasAsyncHandle
Definition: ndrtypes.h:70
unsigned char ClientMustSize
Definition: ndrtypes.h:61
unsigned char HasExtensions
Definition: ndrtypes.h:68
unsigned char HasReturn
Definition: ndrtypes.h:63
unsigned char HasPipes
Definition: ndrtypes.h:64
unsigned char Unused
Definition: ndrtypes.h:65
unsigned char HasAsyncUuid
Definition: ndrtypes.h:66
unsigned short ClientCorrHint
Definition: ndrtypes.h:120
unsigned short FloatArgMask
Definition: ndrtypes.h:130
INTERPRETER_OPT_FLAGS2 Flags2
Definition: ndrtypes.h:117
unsigned short NotifyIndex
Definition: ndrtypes.h:127
unsigned short ServerCorrHint
Definition: ndrtypes.h:123
unsigned char Size
Definition: ndrtypes.h:115
INTERPRETER_OPT_FLAGS2 Flags2
Definition: ndrtypes.h:99
unsigned short NotifyIndex
Definition: ndrtypes.h:109
unsigned char Size
Definition: ndrtypes.h:97
unsigned short ClientCorrHint
Definition: ndrtypes.h:102
unsigned short ServerCorrHint
Definition: ndrtypes.h:105
unsigned short IsReturn
Definition: ndrtypes.h:37
unsigned short Unused
Definition: ndrtypes.h:50
unsigned short IsSimpleRef
Definition: ndrtypes.h:44
unsigned short ServerAllocSize
Definition: ndrtypes.h:51
unsigned short SaveForAsyncFinish
Definition: ndrtypes.h:49
unsigned short IsPipe
Definition: ndrtypes.h:34
unsigned short MustFree
Definition: ndrtypes.h:31
unsigned short IsOut
Definition: ndrtypes.h:36
unsigned short IsBasetype
Definition: ndrtypes.h:38
unsigned short IsDontCallFreeInst
Definition: ndrtypes.h:47
unsigned short IsIn
Definition: ndrtypes.h:35
unsigned short MustSize
Definition: ndrtypes.h:28
unsigned short IsByValue
Definition: ndrtypes.h:41