Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

625 lines
21 KiB

  1. /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. Copyright (c) 1989-2000 Microsoft Corporation
  3. Module Name:
  4. cgcommon.hxx
  5. Abstract:
  6. common definitions across back-end and analysis modules.
  7. Notes:
  8. History:
  9. VibhasC Aug-15-1993 Created.
  10. ----------------------------------------------------------------------------*/
  11. #ifndef __CGCOMMON_HXX__
  12. #define __CGCOMMON_HXX__
  13. // If we want temporary Oi server stubs in order to make stress failure
  14. // debugging easier uncomment the following line
  15. // #define TEMPORARY_OI_SERVER_STUBS
  16. /////////////////////////////////////////////////////////////////////////////
  17. // Code generation phase identification.
  18. /////////////////////////////////////////////////////////////////////////////
  19. //
  20. // This enumeration specifies the codegen or analysis side.
  21. //
  22. typedef enum _side
  23. {
  24. C_SIDE, // client
  25. S_SIDE, // server side
  26. A_SIDE // aux routines
  27. } SIDE;
  28. //
  29. // This enumeration identifies the code generation or analysis phase.
  30. //
  31. typedef enum _cgphase
  32. {
  33. CGPHASE_MARSHALL
  34. ,CGPHASE_UNMARSHALL
  35. //
  36. // This is actually the count of phases
  37. //
  38. ,CGPHASE_COUNT
  39. } CGPHASE;
  40. //////////////////////////////////////////////////////////////////////////////
  41. // Code generation side (client/server) identification.
  42. //////////////////////////////////////////////////////////////////////////////
  43. //
  44. // This enumeration identifies which side code is currently being
  45. // generated for.
  46. //
  47. typedef enum _cgside
  48. {
  49. CGSIDE_CLIENT
  50. ,CGSIDE_SERVER
  51. } CGSIDE;
  52. //
  53. // The standard resource identifier is a quick means of identifying the
  54. // resource.
  55. //
  56. typedef enum _standard_res_id
  57. {
  58. ST_LOCAL_RESOURCE_START
  59. ,ST_RES_RPC_MESSAGE_VARIABLE = ST_LOCAL_RESOURCE_START
  60. ,ST_RES_STUB_MESSAGE_VARIABLE
  61. ,ST_RES_STUB_DESC_VARIABLE
  62. ,ST_RES_BUFFER_POINTER_VARIABLE
  63. ,ST_RES_RPC_STATUS_VARIABLE
  64. ,ST_RES_LENGTH_VARIABLE
  65. ,ST_RES_BH_VARIABLE
  66. ,ST_RES_PXMIT_VARIABLE
  67. ,ST_LOCAL_RESOURCE_END
  68. ,ST_PARAM_RESOURCE_START = ST_LOCAL_RESOURCE_END
  69. ,ST_RES_PRPC_MESSAGE = ST_PARAM_RESOURCE_START
  70. ,ST_PARAM_RESOURCE_END
  71. ,ST_GLOBAL_RESOURCE_START= ST_PARAM_RESOURCE_END
  72. ,ST_RES_AUTO_BH_VARIABLE = ST_GLOBAL_RESOURCE_START
  73. ,ST_RES_FORMAT_STRING_VARIABLE
  74. ,ST_GLOBAL_RESOURCE_END
  75. } STANDARD_RES_ID;
  76. #define IS_STANDARD_LOCAL_RESOURCE( ResID ) \
  77. ((ResID >= ST_LOCAL_RESOURCE_START) && (ResID < ST_LOCAL_RESOURCE_END))
  78. #define IS_STANDARD_PARAM_RESOURCE( ResID ) \
  79. ((ResID >= ST_PARAM_RESOURCE_START) && (ResID < ST_PARAM_RESOURCE_END))
  80. #define IS_STANDARD_GLOBAL_RESOURCE( ResID ) \
  81. ((ResID >= ST_GLOBAL_RESOURCE_START) && (ResID < ST_GLOBAL_RESOURCE_END))
  82. //////////////////////////////////////////////////////////////////////////////
  83. // stub resource name and type name strings.
  84. // Note:: If uou add a standard resource name here, add to the standard
  85. // resource id enumeration list too !
  86. //////////////////////////////////////////////////////////////////////////////
  87. #define LOCAL_NAME_POINTER_MANGLE "_p_"
  88. #define LOCAL_NAME_ARRAY_MANGLE "_a_"
  89. #define PRPC_MESSAGE_TYPE_NAME "PRPC_MESSAGE"
  90. #define PRPC_MESSAGE_VAR_NAME "_pRpcMessage"
  91. #define RPC_MESSAGE_TYPE_NAME "RPC_MESSAGE"
  92. #define RPC_MESSAGE_VAR_NAME "_RpcMessage"
  93. #define RPC_MESSAGE_HANDLE_VAR_NAME RPC_MESSAGE_VAR_NAME".Handle"
  94. #define PRPC_MESSAGE_HANDLE_VAR_NAME PRPC_MESSAGE_VAR_NAME"->Handle"
  95. #define PRPC_MESSAGE_MANAGER_EPV_NAME PRPC_MESSAGE_VAR_NAME"->ManagerEpv"
  96. #define RPC_MESSAGE_DATA_REP RPC_MESSAGE_VAR_NAME".DataRepresentation"
  97. #define PRPC_MESSAGE_DATA_REP PRPC_MESSAGE_VAR_NAME"->DataRepresentation"
  98. #define STUB_MESSAGE_TYPE_NAME "MIDL_STUB_MESSAGE"
  99. #define STUB_MESSAGE_VAR_NAME "_StubMsg"
  100. #define PSTUB_MESSAGE_TYPE_NAME "PMIDL_STUB_MESSAGE"
  101. #define PSTUB_MESSAGE_VAR_NAME "_pStubMsg"
  102. #define PSTUB_MESSAGE_PAR_NAME "pStubMsg"
  103. #define STUB_MSG_LENGTH_VAR_NAME STUB_MESSAGE_VAR_NAME".BufferLength"
  104. #define PSTUB_MSG_LENGTH_VAR_NAME PSTUB_MESSAGE_PAR_NAME"->BufferLength"
  105. #define STUB_MSG_BUFFER_VAR_NAME STUB_MESSAGE_VAR_NAME".Buffer"
  106. #define STUB_MSG_BUFFER_END_VAR_NAME STUB_MESSAGE_VAR_NAME".BufferEnd"
  107. #define RETURN_VALUE_VAR_NAME "_RetVal"
  108. #define STUB_DESC_STRUCT_TYPE_NAME "MIDL_STUB_DESC"
  109. #define STUB_DESC_STRUCT_VAR_NAME "_StubDesc"
  110. #define PSTUB_DESC_STRUCT_TYPE_NAME "PMIDL_STUB_DESC"
  111. #define SERVER_INFO_TYPE_NAME "MIDL_SERVER_INFO"
  112. #define SERVER_INFO_VAR_NAME "_ServerInfo"
  113. #define SERVER_ROUTINE_TYPE_NAME "SERVER_ROUTINE"
  114. #define SERVER_ROUTINE_TABLE_NAME "_ServerRoutineTable"
  115. #define MIDL_SYNTAX_INFO_TYPE_NAME "MIDL_SYNTAX_INFO"
  116. #define MIDL_SYNTAX_INFO_VAR_NAME "_SyntaxInfo"
  117. #define PMIDL_PROXY_INFO_TYPE_NAME "PMIDL_STUBLESS_PROXY_INFO"
  118. #define MIDL_PROXY_INFO_TYPE_NAME "MIDL_STUBLESS_PROXY_INFO"
  119. #define MIDL_PROXY_INFO_VAR_NAME "_ProxyInfo"
  120. #define FORMAT_STRING_OFFSET_TABLE_NAME "_FormatStringOffsetTable"
  121. #define NDR64_FORMAT_STRING_OFFSET_TABLE_NAME "_NDR64FormatStringOffsetTable"
  122. #define MIDL_CALLBACK_VAR_NAME "_callback"
  123. //#define CALLBACK_FORMAT_STRING_OFFSET_TABLE_NAME "_CallbackFormatStringOffsetTable"
  124. //#define NDR64_CALLBACK_FORMAT_STRING_OFFSET_TABLE_NAME "_CallbackNDR64FormatStringOffsetTable"
  125. #define STUB_THUNK_TYPE_NAME "STUB_THUNK"
  126. #define STUB_THUNK_TABLE_NAME "_StubThunkTable"
  127. #define BUFFER_POINTER_TYPE_NAME "RPC_BUFPTR"
  128. #define BUFFER_POINTER_VAR_NAME "_pBuffer"
  129. #define RPC_STATUS_TYPE_NAME "RPC_STATUS"
  130. #define RPC_STATUS_VAR_NAME "_Status"
  131. #define BH_LOCAL_VAR_TYPE_NAME "RPC_BINDING_HANDLE"
  132. #define BH_LOCAL_VAR_NAME "_Handle"
  133. #define LENGTH_VAR_NAME "_Length"
  134. #define LENGTH_VAR_TYPE_NAME "RPC_LENGTH"
  135. #define RPC_C_INT_INFO_TYPE_NAME "RPC_CLIENT_INTERFACE"
  136. #define RPC_C_INT_INFO_STRUCT_NAME "___RpcClientInterface"
  137. #define RPC_S_INT_INFO_TYPE_NAME "RPC_SERVER_INTERFACE"
  138. #define RPC_S_INT_INFO_STRUCT_NAME "___RpcServerInterface"
  139. #define FORMAT_STRING_TYPE_NAME "MIDL_TYPE_FORMAT_STRING"
  140. #define PFORMAT_STRING_TYPE_NAME "PFORMAT_STRING"
  141. #define FORMAT_STRING_STRUCT_NAME "__MIDL_TypeFormatString"
  142. #define FORMAT_STRING_STRING_FIELD FORMAT_STRING_STRUCT_NAME ".Format"
  143. #if 0
  144. // BUG BUG, delete once code is stable
  145. #define NDR64_FORMAT_STRING_TYPE_NAME "NDR64_MIDL_TYPE_FORMAT_STRING"
  146. #define NDR64_FORMAT_STRING_STRUCT_NAME "__MIDL_NDR64TypeFormatString"
  147. #define NDR64_FORMAT_STRING_STRING_FIELD NDR64_FORMAT_STRING_STRUCT_NAME ".Format"
  148. #endif
  149. #define PROC_FORMAT_STRING_TYPE_NAME "MIDL_PROC_FORMAT_STRING"
  150. #define PPROC_FORMAT_STRING_TYPE_NAME FORMAT_STRING_TYPE_NAME
  151. #define PROC_FORMAT_STRING_STRUCT_NAME "__MIDL_ProcFormatString"
  152. #define PROC_FORMAT_STRING_STRING_FIELD PROC_FORMAT_STRING_STRUCT_NAME ".Format"
  153. #if 0
  154. // BUG BUG, delete once code is stable
  155. #define NDR64_PROC_FORMAT_STRING_TYPE_NAME "NDR64_MIDL_PROC_FORMAT_STRING"
  156. #define NDR64_PROC_FORMAT_STRING_STRUCT_NAME "__MIDL_NDR64ProcFormatString"
  157. #define NDR64_PROC_FORMAT_STRING_STRING_FIELD NDR64_PROC_FORMAT_STRING_STRUCT_NAME ".Format"
  158. #define NDR64_PROC_FORMAT_STRING_STRING_FIELD NDR64_PROC_FORMAT_STRING_STRUCT_NAME ".Format"
  159. #endif
  160. #define EXPR_FORMAT_STRING_TYPE_NAME "MIDL_EXPR_FORMAT_STRING"
  161. #define PEXPR_FORMAT_STRING_TYPE_NAME "PEXPR_FORMAT_STRING"
  162. #define EXPR_FORMAT_STRING_STRUCT_NAME "__MIDL_ExprFormatString"
  163. #define EXPR_FORMAT_STRING_STRING_FIELD FORMAT_STRING_STRUCT_NAME ".Format"
  164. #define EXPR_FORMAT_STRING_OFFSET_TABLE EXPR_FORMAT_STRING_STRUCT_NAME"OffsetTable"
  165. #define RUNDOWN_ROUTINE_TABLE_TYPE "NDR_RUNDOWN"
  166. #define RUNDOWN_ROUTINE_TABLE_VAR "RundownRoutines"
  167. #define BINDING_ROUTINE_TABLE_TYPE "GENERIC_BINDING_ROUTINE_PAIR"
  168. #define BINDING_ROUTINE_TABLE_VAR "BindingRoutines"
  169. #define EXPR_EVAL_ROUTINE_TABLE_TYPE "EXPR_EVAL"
  170. #define EXPR_EVAL_ROUTINE_TABLE_VAR "ExprEvalRoutines"
  171. #define TRANSMIT_AS_TABLE_SIZE "TRANSMIT_AS_TABLE_SIZE"
  172. #define XMIT_AS_ROUTINE_TABLE_TYPE "XMIT_ROUTINE_QUINTUPLE"
  173. #define XMIT_AS_ROUTINE_TABLE_VAR "TransmitAsRoutines"
  174. #define XMIT_TO_XMIT "_XmitTranslateToXmit"
  175. #define XMIT_FROM_XMIT "_XmitTranslateFromXmit"
  176. #define XMIT_FREE_XMIT "_XmitFreeXmit"
  177. #define XMIT_FREE_INST "_XmitFreeInst"
  178. #define REP_AS_ROUTINE_TABLE_TYPE "XMIT_ROUTINE_QUINTUPLE"
  179. #define REP_AS_ROUTINE_TABLE_VAR "RepresentAsRoutines"
  180. #define REP_FROM_LOCAL "_RepAsTranslateFromLocal"
  181. #define REP_TO_LOCAL "_RepAsTranslateToLocal"
  182. #define REP_FREE_INST "_RepAsFreeInst"
  183. #define REP_FREE_LOCAL "_RepAsFreeLocal"
  184. #define WIRE_MARSHAL_TABLE_SIZE "WIRE_MARSHAL_TABLE_SIZE"
  185. #define USER_MARSHAL_ROUTINE_TABLE_TYPE "USER_MARSHAL_ROUTINE_QUADRUPLE"
  186. #define USER_MARSHAL_ROUTINE_TABLE_VAR "UserMarshalRoutines"
  187. #define USER_MARSHAL_SIZE "_UserSize"
  188. #define USER_MARSHAL_MARSHALL "_UserMarshal"
  189. #define USER_MARSHAL_UNMARSHALL "_UserUnmarshal"
  190. #define USER_MARSHAL_FREE "_UserFree"
  191. #define NDR64_USER_MARSHAL_ROUTINE_TABLE_VAR "NDR64_UserMarshalRoutines"
  192. #define NDR64_USER_MARSHAL_SIZE "_UserSize64"
  193. #define NDR64_USER_MARSHAL_MARSHALL "_UserMarshal64"
  194. #define NDR64_USER_MARSHAL_UNMARSHALL "_UserUnmarshal64"
  195. #define NDR64_USER_MARSHAL_FREE "_UserFree64"
  196. #define CS_SIZE_CONVERT_ROUTINE_TABLE_TYPE "NDR_CS_SIZE_CONVERT_ROUTINES"
  197. #define CS_SIZE_CONVERT_ROUTINE_TABLE_VAR "CsSizeConvertRoutines"
  198. #define CS_NET_SIZE "_net_size"
  199. #define CS_TO_NET_CS "_to_netcs"
  200. #define CS_LOCAL_SIZE "_local_size"
  201. #define CS_FROM_NET_CS "_from_netcs"
  202. #define CS_TAG_ROUTINE_TABLE_TYPE "CS_TAG_GETTING_ROUTINE"
  203. #define CS_TAG_ROUTINE_TABLE_VAR "CsTagGettingRoutines"
  204. #define CS_ROUTINE_TABLES_TYPE "NDR_CS_ROUTINES"
  205. #define CS_ROUTINE_TABLES_VAR "CsTypeTables"
  206. #define FC_FIELD_OFFSET_MACRO "NdrFieldOffset"
  207. #define FC_FIELD_PAD_MACRO "NdrFieldPad"
  208. #define GENERIC_BINDING_TABLE_SIZE "GENERIC_BINDING_TABLE_SIZE"
  209. #define GENERIC_BINDING_ROUTINE_TYPE "GENERIC_BINDING_ROUTINE"
  210. #define GENERIC_UNBINDING_ROUTINE_TYPE "GENERIC_UNBIND_ROUTINE"
  211. #define GENERIC_BINDING_INFO_TYPE "GENERIC_BINDING_INFO"
  212. #define GENERIC_BINDING_INFO_VAR "GenericBindingInfo"
  213. #define PXMIT_VAR_NAME "_pXmit"
  214. #define PXMIT_VAR_TYPE_NAME "PMIDL_XMIT_TYPE"
  215. #define PARAM_STRUCT_TYPE_NAME "struct _PARAM_STRUCT"
  216. #define MALLOC_FREE_STRUCT_TYPE_NAME "MALLOC_FREE_STRUCT"
  217. #define MALLOC_FREE_STRUCT_VAR_NAME "_MallocFreeStruct"
  218. /////////////////////////////////////////////////////////////////////////////
  219. // standard routine names.
  220. /////////////////////////////////////////////////////////////////////////////
  221. #define FULL_POINTER_INIT_RTN_NAME "NdrFullPointerXlatInit"
  222. #define FULL_POINTER_FREE_RTN_NAME "NdrFullPointerXlatFree"
  223. #define RPC_SS_ENABLE_ALLOCATE_RTN_NAME "NdrRpcSsEnableAllocate"
  224. #define RPC_SS_DISABLE_ALLOCATE_RTN_NAME "NdrRpcSsDisableAllocate"
  225. #define RPC_SM_SET_CLIENT_TO_OSF_RTN_NAME "NdrRpcSmSetClientToOsf"
  226. #define RPC_SS_SERVER_ALLOCATE_RTN_NAME "RpcSsAllocate"
  227. #define RPC_SS_SERVER_FREE_RTN_NAME "RpcSsFree"
  228. #define RPC_SM_CLIENT_ALLOCATE_RTN_NAME "NdrRpcSmClientAllocate"
  229. #define RPC_SM_CLIENT_FREE_RTN_NAME "NdrRpcSmClientFree"
  230. #define DEFAULT_ALLOC_OSF_RTN_NAME "NdrRpcSsDefaultAllocate"
  231. #define DEFAULT_FREE_OSF_RTN_NAME "NdrRpcSsDefaultFree"
  232. #define DEFAULT_ALLOC_RTN_NAME "MIDL_user_allocate"
  233. #define DEFAULT_FREE_RTN_NAME "MIDL_user_free"
  234. #define OLE_ALLOC_RTN_NAME "NdrOleAllocate"
  235. #define OLE_FREE_RTN_NAME "NdrOleFree"
  236. #define NDR_CONVERT_RTN_NAME "NdrConvert"
  237. #define NDR_CONVERT_RTN_NAME_V2 "NdrConvert2"
  238. #define DEFAULT_GB_RTN_NAME "I_RpcGetBuffer"
  239. #define DEFAULT_SR_RTN_NAME "I_RpcSendReceive"
  240. #define DEFAULT_FB_RTN_NAME "I_RpcFreeBuffer"
  241. #define DEFAULT_NDR_SR_RTN_NAME "NdrSendReceive"
  242. #define DEFAULT_NDR_FB_RTN_NAME "NdrFreeBuffer"
  243. #define DEFAULT_NDR_GB_RTN_NAME "NdrGetBuffer"
  244. #define AUTO_GB_RTN_NAME "I_RpcNsGetBuffer"
  245. #define AUTO_SR_RTN_NAME "I_RpcNsSendReceive"
  246. #define AUTO_FB_RTN_NAME "I_RpcFreeBuffer"
  247. #define CALLBACK_HANDLE_RTN_NAME "I_RpcGetCurrentCallHandle"
  248. #define AUTO_NDR_SR_RTN_NAME "NdrNsSendReceive"
  249. #define AUTO_NDR_GB_RTN_NAME "NdrNsGetBuffer"
  250. #define AUTO_BH_VAR_NAME "__MIDL_AutoBindHandle"
  251. #define AUTO_BH_TYPE_NAME "RPC_BINDING_HANDLE"
  252. #define CSTUB_INIT_RTN_NAME "NdrClientInitializeNew"
  253. #define SSTUB_INIT_RTN_NAME "NdrServerInitializeNew"
  254. #define S_NDR_CALL_RTN_NAME "NdrServerCall"
  255. #define C_NDR_CALL_RTN_NAME "NdrClientCall"
  256. #define S_NDR_CALL_RTN_NAME_V2 "NdrServerCall2"
  257. #define C_NDR_CALL_RTN_NAME_V2 "NdrClientCall2"
  258. #define S_NDR64_CALL_RTN_NAME "NdrServerCallNdr64"
  259. #define S_ALL_CALL_RTN_NAME "NdrServerCallAll"
  260. #define C_NDR64_CALL_RTN_NAME "NdrClientCall3"
  261. #define S_NDR_CALL_RTN_NAME_ASYNC "NdrAsyncServerCall"
  262. #define C_NDR_CALL_RTN_NAME_ASYNC "NdrAsyncClientCall"
  263. #define S_NDR64_CALL_RTN_NAME_ASYNC "Ndr64AsyncServerCall64"
  264. #define S_ALL_CALL_RTN_NAME_ASYNC "Ndr64AsyncServerCallAll"
  265. #define C_NDR64_CALL_RTN_NAME_ASYNC "Ndr64AsyncClientCall"
  266. #define S_NDR_CALL_RTN_NAME_DCOM_ASYNC "NdrDcomAsyncStubCall"
  267. #define C_NDR_CALL_RTN_NAME_DCOM_ASYNC "NdrDcomAsyncClientCall"
  268. #define S_NDR64_CALL_RTN_NAME_DCOM_ASYNC "Ndr64DcomAsyncStubCall"
  269. #define C_NDR64_CALL_RTN_NAME_DCOM_ASYNC "Ndr64DcomAsyncClientCall"
  270. #define S_OBJECT_NDR_CALL_RTN_NAME "NdrStubCall"
  271. #define C_OBJECT_NDR_CALL_RTN_NAME "NdrClientCall"
  272. #define S_OBJECT_NDR_CALL_RTN_NAME_V2 "NdrStubCall2"
  273. #define C_OBJECT_NDR_CALL_RTN_NAME_V2 "NdrClientCall2"
  274. #define S_OBJECT_NDR64_CALL_RTN_NAME "NdrStubCall3"
  275. #define C_OBJECT_NDR64_CALL_RTN_NAME "NdrClientCall3"
  276. #define S_OBJECT_NDR_CALL_RTN_NAME_ASYNC "NdrAsyncStubCall"
  277. #define S_NDR_MARSHALL_RTN_NAME "NdrServerMarshall"
  278. #define S_NDR_UNMARSHALL_RTN_NAME "NdrServerUnmarshall"
  279. #define C_NDR_CLEAR_OUT_PARAMS_RTN_NAME "NdrClearOutParameters"
  280. #define AUTO_SR_NDR_RTN_NAME "NdrAHSendReceive"
  281. #define NORMAL_SR_NDR_RTN_NAME "NdrSendReceive"
  282. #define NORMAL_FB_NDR_RTN_NAME "NdrFreeBuffer"
  283. #define ADD_PTR_RTN_NAME "_midl_addp"
  284. #define MARSHALL_UNIQUE_PTR_RTN_NAME "_midl_marsh_up"
  285. #define CHECK_UNIQUE_PTR_IN_BUFFER "_midl_unmarsh_up"
  286. #define RAISE_EXCEPTION_RTN_NAME "RpcRaiseException"
  287. #define STUB_MSG_ALLOCATE_RTN_NAME STUB_MESSAGE_VAR_NAME".pfnAllocate"
  288. #define STUB_MSG_FREE_RTN_NAME STUB_MESSAGE_VAR_NAME".pfnFree"
  289. #define PSTUB_MSG_ALLOCATE_RTN_NAME PSTUB_MESSAGE_PAR_NAME"->pfnAllocate"
  290. #define ENGINE_CHECKED_ALLOC_RTN_NAME "NdrAllocate"
  291. #define MIDL_MEMSET_RTN_NAME "MIDL_memset"
  292. // Correlation stuff
  293. #define CSTUB_CORR_INIT_RTN_NAME "NdrCorrelationInitialize"
  294. #define CSTUB_CORR_PASS_RTN_NAME "NdrCorrelationPass"
  295. #define CSTUB_CORR_FREE_RTN_NAME "NdrCorrelationFree"
  296. #define NDR_CORR_CACHE_VAR_NAME "_NdrCorrCache"
  297. #define NDR_CORR_CACHE_SIZE 256
  298. /////////////////////////////////////////////////////////////////////////////
  299. // context handle related stuff.
  300. /////////////////////////////////////////////////////////////////////////////
  301. #define CTXT_HDL_C_CONTEXT_TYPE_NAME "NDR_CCONTEXT"
  302. #define CTXT_HDL_S_CONTEXT_TYPE_NAME "NDR_SCONTEXT"
  303. #define CTXT_HDL_RUNDOWN_TYPE_NAME "NDR_RUNDOWN"
  304. #define CTXT_HDL_BIND_RTN_NAME "NDRCContextBinding"
  305. #define CTXT_HDL_C_MARSHALL_RTN_NAME "NDRCContextMarshall"
  306. #define CTXT_HDL_C_UNMARSHALL_RTN_NAME "NDRCContextUnmarshall"
  307. #define CTXT_HDL_S_UNMARSHALL_RTN_NAME "NDRSContextUnmarshall"
  308. #define CTXT_HDL_S_MARSHALL_RTN_NAME "NDRSContextMarshall"
  309. //
  310. // Stuff emitted in the client and server stub files.
  311. //
  312. #define SIZEOF_RPC_CLIENT_INTERFACE "sizeof("RPC_C_INT_INFO_TYPE_NAME")"
  313. #define SIZEOF_RPC_SERVER_INTERFACE "sizeof("RPC_S_INT_INFO_TYPE_NAME")"
  314. #define PROTSEQ_EP_TYPE_NAME "RPC_PROTSEQ_ENDPOINT"
  315. #define PROTSEQ_EP_VAR_NAME "___RpcProtseqEndpoint"
  316. #define TRANSFER_SYNTAX_GUID_STR_1 "8A885D04"
  317. #define TRANSFER_SYNTAX_GUID_STR_2 "1CEB"
  318. #define TRANSFER_SYNTAX_GUID_STR_3 "11C9"
  319. #define TRANSFER_SYNTAX_GUID_STR_4 "9FE8"
  320. #define TRANSFER_SYNTAX_GUID_STR_5 "08002B104860"
  321. //INTERFACENAME = { /* 71710533-beba-4937-8319-b5dbef9ccc36 */
  322. // 0x71710533,
  323. // 0xbeba,
  324. // 0x4937,
  325. // {0x83, 0x19, 0xb5, 0xdb, 0xef, 0x9c, 0xcc, 0x36}
  326. // };
  327. #define NDR64_TRANSFER_SYNTAX_GUID_STR_1 "71710533"
  328. #define NDR64_TRANSFER_SYNTAX_GUID_STR_2 "beba"
  329. #define NDR64_TRANSFER_SYNTAX_GUID_STR_3 "4937"
  330. #define NDR64_TRANSFER_SYNTAX_GUID_STR_4 "8319"
  331. #define NDR64_TRANSFER_SYNTAX_GUID_STR_5 "b5dbef9ccc36"
  332. //INTERFACENAME = { /* b4537da9-3d03-4f6b-b594-52b2874ee9d0 */
  333. // 0xb4537da9,
  334. // 0x3d03,
  335. // 0x4f6b,
  336. // {0xb5, 0x94, 0x52, 0xb2, 0x87, 0x4e, 0xe9, 0xd0}
  337. // };
  338. #define FAKE_NDR64_TRANSFER_SYNTAX_GUID_STR_1 "b4537da9"
  339. #define FAKE_NDR64_TRANSFER_SYNTAX_GUID_STR_2 "3d03"
  340. #define FAKE_NDR64_TRANSFER_SYNTAX_GUID_STR_3 "4f6b"
  341. #define FAKE_NDR64_TRANSFER_SYNTAX_GUID_STR_4 "b594"
  342. #define FAKE_NDR64_TRANSFER_SYNTAX_GUID_STR_5 "52b2874ee9d0"
  343. #define TRANSFER_SYNTAX_TYPE_NAME "RPC_SYNTAX_IDENTIFIER"
  344. #define NDR_TRANSFER_SYNTAX_VAR_NAME "_RpcTransferSyntax"
  345. #define NDR64_TRANSFER_SYNTAX_VAR_NAME "_NDR64_RpcTransferSyntax"
  346. #define RPC_DISPATCH_FUNCTION_TYPE_NAME "RPC_DISPATCH_FUNCTION"
  347. #define RPC_DISPATCH_TABLE_TYPE_NAME "RPC_DISPATCH_TABLE"
  348. // File names of standard include files.
  349. //
  350. #define RPCNDR_H_INC_FILE_NAME "rpcndr.h"
  351. #define STRING_H_INC_FILE_NAME "string.h"
  352. #define MEMORY_H_INC_FILE_NAME "memory.h"
  353. #define STDARG_H_INC_FILE_NAME "stdarg.h"
  354. //
  355. // xfer syntax version
  356. //
  357. #define NDR_UUID_MAJOR_VERSION 2
  358. #define NDR_UUID_MINOR_VERSION 0
  359. #define NDR64_UUID_MAJOR_VERSION 1
  360. #define NDR64_UUID_MINOR_VERSION 0
  361. // encode / decode specific definitions.
  362. #define NO_FREEING_FOR_PICKLING TRUE
  363. // functions.
  364. #define NDR_MES_TYPE_ALIGN_SIZE "NdrMesTypeAlignSize"
  365. #define NDR_MES_TYPE_ENCODE "NdrMesTypeEncode"
  366. #define NDR_MES_TYPE_DECODE "NdrMesTypeDecode"
  367. #define NDR_MES_TYPE_FREE "NdrMesTypeFree"
  368. #define NDR_MES_TYPE_ALIGN_SIZE2 "NdrMesTypeAlignSize2"
  369. #define NDR_MES_TYPE_ENCODE2 "NdrMesTypeEncode2"
  370. #define NDR_MES_TYPE_DECODE2 "NdrMesTypeDecode2"
  371. #define NDR_MES_TYPE_FREE2 "NdrMesTypeFree2"
  372. #define PROC_ENCODE_DECODE_RTN_NAME "NdrMesProcEncodeDecode"
  373. #define PROC_ENCODE_DECODE_RTN_NAME2 "NdrMesProcEncodeDecode2"
  374. // types.
  375. #define MIDL_ES_HANDLE_TYPE_NAME "handle_t"
  376. #define MIDL_ES_HANDLE_VAR_NAME "_MidlEsHandle"
  377. #define PTYPE_VAR_NAME "_pType"
  378. #define PICKLING_INFO_STRUCT_NAME "__MIDL_TypePicklingInfo"
  379. #define MIDL_TYPE_PICKLING_INFO_NAME "MIDL_TYPE_PICKLING_INFO"
  380. #define PMIDL_TYPE_PICKLING_INFO_NAME "PMIDL_TYPE_PICKLING_INFO"
  381. // notify related stuff
  382. #define NOTIFY_SUFFIX "_notify"
  383. #define NOTIFY_FLAG_SUFFIX "_notify_flag"
  384. #define SIZEOF_NOTIFY_FLAG_SUFFIX strlen( NOTIFY_FLAG_SUFFIX )
  385. #define NOTIFY_FLAG_VAR_NAME "__MIDL_NotifyFlag"
  386. //////////////////////////////////////////////////////////////////////////////
  387. // sundry definitions
  388. //////////////////////////////////////////////////////////////////////////////
  389. typedef char * PNAME;
  390. typedef char * PFILENAME;
  391. /////////////////////////////////////////////////////////////////////////////
  392. // Binding related definitions.
  393. /////////////////////////////////////////////////////////////////////////////
  394. //
  395. // The handle usage refers to handle usage being explicit or implicit. This
  396. // is deliberately defined as an unsigned long, so we can use a bit field.
  397. // Otherwise it could be defined as an enum.
  398. //
  399. typedef unsigned long HANDLE_USAGE;
  400. //
  401. // binding handle usage.
  402. //
  403. #define HU_EXPLICIT 0x0
  404. #define HU_IMPLICIT 0x1
  405. /////////////////////////////////////////////////////////////////////////////
  406. // Some definitions relating to code generation that are used only for ndr
  407. // classes.
  408. /////////////////////////////////////////////////////////////////////////////
  409. //
  410. // This definition specifies the location where the param will be allocated
  411. // on the server stub.
  412. //
  413. typedef unsigned long S_STUB_ALLOC_LOCATION;
  414. #define S_STUB_ALLOC_LOCATION_UNKNOWN 0x0
  415. #define S_STUB_ALLOC_LOCATION_ON_STACK 0x1
  416. #define S_STUB_ALLOC_LOCATION_IN_HEAP 0x2
  417. #define S_STUB_ALLOC_LOCATION_NOT_NEEDED 0x3
  418. //
  419. // This definition specifies the actual entity allocated, whether it is a
  420. // reference to the entity or the entity itself.
  421. //
  422. typedef unsigned long S_STUB_ALLOC_TYPE;
  423. #define S_STUB_ALLOC_TYPE_NONE 0x0
  424. #define S_STUB_ALLOC_TYPE_REFERENCE 0x1
  425. #define S_STUB_ALLOC_TYPE_TYPE 0x2
  426. #define S_STUB_ALLOC_TYPE_DONT_CARE 0x3
  427. //
  428. // This definition specifies if initialization is needed for the parameter
  429. // on the server side before unmarshalling. This is used only for out params.
  430. //
  431. typedef unsigned long S_STUB_INIT_NEED;
  432. #define S_STUB_INIT_NOT_NEEDED 0x0
  433. #define S_STUB_INIT_NEEDED 0x1
  434. //////////////////////////////////////////////////////////////////////////////
  435. // other module definitions.
  436. //////////////////////////////////////////////////////////////////////////////
  437. // #include "optprop.hxx"
  438. #endif // __CGCOMMON_HXX__