Leaked source code of windows server 2003
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.

156 lines
4.0 KiB

  1. /************************************************************************
  2. Copyright (c) 1993 Microsoft Corporation
  3. Module Name :
  4. hndl.h
  5. Abstract :
  6. To hold prototypes of support routines for interpreting handles in
  7. support of Format Strings.
  8. Author :
  9. Bruce McQuistan (brucemc)
  10. Revision History :
  11. ***********************************************************************/
  12. #ifndef __HNDL_H__
  13. #define __HNDL_H__
  14. //
  15. // The following is to be used in as masks for flags passed in these
  16. // routines.
  17. //
  18. #define MARSHALL_MASK 0x2
  19. #define IMPLICIT_MASK 0x4
  20. #define BINDING_MASK 0x8
  21. //
  22. // Next, a macro for getting the current call handle. On dos,win16, it'll
  23. // never be called.
  24. //
  25. #if defined(__RPC_MAC__)
  26. #define GET_CURRENT_CALL_HANDLE() NULL
  27. #else
  28. #define GET_CURRENT_CALL_HANDLE() I_RpcGetCurrentCallHandle()
  29. #endif
  30. //
  31. // Some typedefs to keep the front end of the C compiler happy and possibly to
  32. // improve code generation.
  33. //
  34. typedef void * (__RPC_API * GENERIC_BIND_FUNC_ARGCHAR)(uchar);
  35. typedef void * (__RPC_API * GENERIC_BIND_FUNC_ARGSHORT)(ushort);
  36. typedef void * (__RPC_API * GENERIC_BIND_FUNC_ARGLONG)(ulong);
  37. typedef void (__RPC_API * GENERIC_UNBIND_FUNC_ARGCHAR)(uchar, handle_t);
  38. typedef void (__RPC_API * GENERIC_UNBIND_FUNC_ARGSHORT)(ushort, handle_t);
  39. typedef void (__RPC_API * GENERIC_UNBIND_FUNC_ARGLONG)(ulong, handle_t);
  40. #if defined(__RPC_WIN64__)
  41. typedef void * (__RPC_API * GENERIC_BIND_FUNC_ARGINT64)(uint64);
  42. typedef void (__RPC_API * GENERIC_UNBIND_FUNC_ARGINT64)(uint64, handle_t);
  43. #endif
  44. handle_t
  45. GenericHandleMgr(
  46. PMIDL_STUB_DESC pStubDesc,
  47. uchar * ArgPtr,
  48. PFORMAT_STRING FmtString,
  49. uint Flags,
  50. handle_t * pSavedGenericHandle
  51. );
  52. void
  53. GenericHandleUnbind(
  54. PMIDL_STUB_DESC pStubDesc,
  55. uchar * ArgPtr,
  56. PFORMAT_STRING FmtString,
  57. uint Flags,
  58. handle_t * pSavedGenericHandle
  59. );
  60. handle_t
  61. ExplicitBindHandleMgr(
  62. PMIDL_STUB_DESC pStubDesc,
  63. uchar * ArgPtr,
  64. PFORMAT_STRING FmtString,
  65. handle_t * pSavedGenericHandle
  66. );
  67. handle_t
  68. ImplicitBindHandleMgr(
  69. PMIDL_STUB_DESC pStubDesc,
  70. uchar HandleType,
  71. handle_t * pSavedGenericHandle
  72. );
  73. handle_t
  74. Ndr64GenericHandleMgr(
  75. PMIDL_STUB_DESC pStubDesc,
  76. uchar * ArgPtr,
  77. PFORMAT_STRING FmtString,
  78. uint Flags,
  79. handle_t * pSavedGenericHandle
  80. );
  81. void
  82. Ndr64GenericHandleUnbind(
  83. PMIDL_STUB_DESC pStubDesc,
  84. uchar * ArgPtr,
  85. PFORMAT_STRING FmtString,
  86. uint Flags,
  87. handle_t * pSavedGenericHandle
  88. );
  89. handle_t
  90. Ndr64ExplicitBindHandleMgr(
  91. PMIDL_STUB_DESC pStubDesc,
  92. uchar * ArgPtr,
  93. PFORMAT_STRING FmtString,
  94. handle_t * pSavedGenericHandle
  95. );
  96. handle_t
  97. Ndr64ImplicitBindHandleMgr(
  98. PMIDL_STUB_DESC pStubDesc,
  99. uchar HandleType,
  100. handle_t * pSavedGenericHandle
  101. );
  102. void
  103. Ndr64MarshallHandle(
  104. PMIDL_STUB_MESSAGE pStubMsg,
  105. uchar * pArg,
  106. PNDR64_FORMAT FmtString
  107. );
  108. void
  109. Ndr64UnmarshallHandle(
  110. PMIDL_STUB_MESSAGE pStubMsg,
  111. uchar ** ppArg,
  112. PNDR64_FORMAT FmtString,
  113. bool fIgnored
  114. );
  115. void
  116. Ndr64SaveContextHandle (
  117. PMIDL_STUB_MESSAGE pStubMsg,
  118. NDR_SCONTEXT CtxtHandle,
  119. uchar ** ppArg,
  120. PFORMAT_STRING pFormat
  121. );
  122. void
  123. Ndr64ContextHandleQueueFree(
  124. PMIDL_STUB_MESSAGE pStubMsg,
  125. void * FixedArray
  126. );
  127. #endif __HNDL_H__