4 * Copyright 2006 Robert Shearman (for CodeWeavers)
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.
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.
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
21 #ifndef __NDRTYPES_H__
22 #define __NDRTYPES_H__
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
59 unsigned char ServerMustSize
: 1; /* 0x01 - the server must perform a
61 unsigned char ClientMustSize
: 1; /* 0x02 - the client must perform a
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
68 unsigned char HasExtensions
: 1; /* 0x40 - indicates that Win2000
69 * extensions are in use. */
70 unsigned char HasAsyncHandle
: 1; /* 0x80 - indicates an asynchronous RPC
72 } INTERPRETER_OPT_FLAGS
, *PINTERPRETER_OPT_FLAGS
;
76 unsigned char HasNewCorrDesc
: 1; /* 0x01 - indicates new correlation
77 * descriptors in use. */
78 unsigned char ClientCorrCheck
: 1; /* 0x02 - client needs correlation
80 unsigned char ServerCorrCheck
: 1; /* 0x04 - server needs correlation
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 @
87 /* The following bits are in fact used by midl but haven't yet been
89 unsigned char Unused
: 3; /* 0x20 - has complex return */
90 /* 0x40 - has range on conformance */
91 } INTERPRETER_OPT_FLAGS2
, *PINTERPRETER_OPT_FLAGS2
;
93 /* Win2000 extensions */
96 /* size in bytes of all following extensions */
99 INTERPRETER_OPT_FLAGS2 Flags2
;
101 /* client cache size hint */
102 unsigned short ClientCorrHint
;
104 /* server cache size hint */
105 unsigned short ServerCorrHint
;
107 /* index of routine in MIDL_STUB_DESC::NotifyRoutineTable to call if
108 * HasNotify or HasNotify2 flag set */
109 unsigned short NotifyIndex
;
110 } NDR_PROC_HEADER_EXTS
;
114 /* size in bytes of all following extensions */
117 INTERPRETER_OPT_FLAGS2 Flags2
;
119 /* client cache size hint */
120 unsigned short ClientCorrHint
;
122 /* server cache size hint */
123 unsigned short ServerCorrHint
;
125 /* index of routine in MIDL_STUB_DESC::NotifyRoutineTable to call if
126 * HasNotify or HasNotify2 flag set */
127 unsigned short NotifyIndex
;
129 /* needed only on IA64 to cope with float/register loading */
130 unsigned short FloatArgMask
;
131 } NDR_PROC_HEADER_EXTS64
;
135 FC_BYTE
= 0x01, /* 0x01 */
138 FC_USMALL
, /* 0x04 */
141 FC_USHORT
, /* 0x07 */
146 FC_DOUBLE
, /* 0x0c */
147 FC_ENUM16
, /* 0x0d */
148 FC_ENUM32
, /* 0x0e */
149 FC_IGNORE
, /* 0x0f */
150 FC_ERROR_STATUS_T
, /* 0x10 */
152 FC_RP
, /* 0x11 */ /* reference pointer */
153 FC_UP
, /* 0x12 */ /* unique pointer */
154 FC_OP
, /* 0x13 */ /* object pointer */
155 FC_FP
, /* 0x14 */ /* full pointer */
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 */
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 */
173 /* flags for all handle types */
174 #define HANDLE_PARAM_IS_VIA_PTR 0x80
175 #define HANDLE_PARAM_IS_IN 0x40
176 #define HANDLE_PARAM_IS_OUT 0x20
177 #define HANDLE_PARAM_IS_RETURN 0x10
179 /* flags for context handles */
180 #define NDR_STRICT_CONTEXT_HANDLE 0x08
181 #define NDR_CONTEXT_HANDLE_NOSERIALIZE 0x04
182 #define NDR_CONTEXT_HANDLE_SERIALIZE 0x02
183 #define NDR_CONTEXT_HANDLE_CANNOT_BE_NULL 0x01