Windows NT 4.0 source code leak
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.

132 lines
3.1 KiB

4 years ago
  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. #ifdef __RPC_DOS__
  26. #define GET_CURRENT_CALL_HANDLE() NULL
  27. #elif defined(__RPC_WIN16__)
  28. #define GET_CURRENT_CALL_HANDLE() NULL
  29. #elif defined(__RPC_MAC__)
  30. #define GET_CURRENT_CALL_HANDLE() NULL
  31. #else
  32. #define GET_CURRENT_CALL_HANDLE() I_RpcGetCurrentCallHandle()
  33. #endif
  34. //
  35. // Some typedefs to keep the front end of the C compiler happy and possibly to
  36. // improve code generation.
  37. //
  38. typedef void __RPC_FAR *
  39. (__RPC_FAR __RPC_API * GENERIC_BIND_FUNC_ARGCHAR)(uchar);
  40. typedef void __RPC_FAR *
  41. (__RPC_FAR __RPC_API * GENERIC_BIND_FUNC_ARGSHORT)(ushort);
  42. typedef void __RPC_FAR *
  43. (__RPC_FAR __RPC_API * GENERIC_BIND_FUNC_ARGLONG)(ulong);
  44. typedef void
  45. (__RPC_FAR __RPC_API * GENERIC_UNBIND_FUNC_ARGCHAR)(uchar, handle_t);
  46. typedef void
  47. (__RPC_FAR __RPC_API * GENERIC_UNBIND_FUNC_ARGSHORT)(ushort, handle_t);
  48. typedef void
  49. (__RPC_FAR __RPC_API * GENERIC_UNBIND_FUNC_ARGLONG)(ulong, handle_t);
  50. handle_t
  51. GenericHandleMgr(
  52. PMIDL_STUB_DESC pStubDesc,
  53. uchar * ArgPtr,
  54. PFORMAT_STRING FmtString,
  55. uint Flags,
  56. handle_t * pSavedGenericHandle
  57. );
  58. void
  59. GenericHandleUnbind(
  60. PMIDL_STUB_DESC pStubDesc,
  61. uchar * ArgPtr,
  62. PFORMAT_STRING FmtString,
  63. uint Flags,
  64. handle_t * pSavedGenericHandle
  65. );
  66. handle_t
  67. ExplicitBindHandleMgr(
  68. PMIDL_STUB_DESC pStubDesc,
  69. uchar * ArgPtr,
  70. PFORMAT_STRING FmtString,
  71. handle_t * pSavedGenericHandle
  72. );
  73. handle_t
  74. ImplicitBindHandleMgr(
  75. PMIDL_STUB_DESC pStubDesc,
  76. uchar HandleType,
  77. handle_t * pSavedGenericHandle
  78. );
  79. unsigned char * RPC_ENTRY
  80. NdrMarshallHandle(
  81. PMIDL_STUB_MESSAGE pStubMsg,
  82. uchar * pArg,
  83. PFORMAT_STRING FmtString
  84. );
  85. unsigned char * RPC_ENTRY
  86. NdrUnmarshallHandle(
  87. PMIDL_STUB_MESSAGE pStubMsg,
  88. uchar ** ppArg,
  89. PFORMAT_STRING FmtString,
  90. uchar fIgnored
  91. );
  92. void
  93. NdrSaveContextHandle (
  94. PMIDL_STUB_MESSAGE pStubMsg,
  95. NDR_SCONTEXT CtxtHandle,
  96. uchar ** ppArg,
  97. PFORMAT_STRING pFormat
  98. );
  99. void
  100. NdrContextHandleQueueFree(
  101. PMIDL_STUB_MESSAGE pStubMsg,
  102. void * FixedArray
  103. );
  104. #endif __HNDL_H__