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.

139 lines
4.2 KiB

  1. //---------------------------------------------------------------------------
  2. //
  3. // File: _Gcc.h
  4. //
  5. // Contents: Gcc private include file
  6. //
  7. // Copyright: (c) 1992 - 1997, Microsoft Corporation.
  8. // All Rights Reserved.
  9. // Information Contained Herein is Proprietary
  10. // and Confidential.
  11. //
  12. // History: 17-JUL-97 BrianTa Created.
  13. //
  14. //---------------------------------------------------------------------------
  15. #ifndef __GCC_H_
  16. #define __GCC_H_
  17. #ifndef RC_INVOKED
  18. #include <nt.h>
  19. #include <ntrtl.h>
  20. #include <nturtl.h>
  21. #endif
  22. #include <windows.h>
  23. #include <t120.h>
  24. #include <tshrutil.h>
  25. //---------------------------------------------------------------------------
  26. // Defines
  27. //---------------------------------------------------------------------------
  28. #define GCC_MAJOR_VERSION 1
  29. #define GCC_MINOR_VERSION 0
  30. #if DBG
  31. #define GCCMCS_TBL_ITEM(_x_, _y_) {_x_, _y_, #_x_, #_y_}
  32. #else
  33. #define GCCMCS_TBL_ITEM(_x_, _y_) {_x_, _y_}
  34. #endif // DBG defines
  35. //---------------------------------------------------------------------------
  36. // Typedefs
  37. //---------------------------------------------------------------------------
  38. // MCS/GCC return code table
  39. typedef struct _GCCMCS_ERROR_ENTRY
  40. {
  41. MCSError mcsError; // MCSError
  42. GCCError gccError; // GCCError
  43. #if DBG
  44. PCHAR pszMcsMessageText; // MCSError text
  45. PCHAR pszGccMessageText; // GCCError text
  46. #endif
  47. } GCCMCS_ERROR_ENTRY, *PGCCMCS_ERROR_ENTRY;
  48. //---------------------------------------------------------------------------
  49. // Data declarations
  50. //---------------------------------------------------------------------------
  51. #ifdef _TGCC_ALLOC_DATA_
  52. BOOL g_fInitialized = FALSE;
  53. GCCMCS_ERROR_ENTRY GccMcsErrorTBL[] = {
  54. GCCMCS_TBL_ITEM(MCS_NO_ERROR, GCC_NO_ERROR),
  55. GCCMCS_TBL_ITEM(MCS_ALLOCATION_FAILURE, GCC_ALLOCATION_FAILURE),
  56. GCCMCS_TBL_ITEM(MCS_ALREADY_INITIALIZED, GCC_ALREADY_INITIALIZED),
  57. GCCMCS_TBL_ITEM(MCS_NOT_INITIALIZED, GCC_NOT_INITIALIZED),
  58. GCCMCS_TBL_ITEM(MCS_INVALID_PARAMETER, GCC_INVALID_PARAMETER),
  59. GCCMCS_TBL_ITEM(MCS_DOMAIN_ALREADY_EXISTS, GCC_FAILURE_CREATING_DOMAIN),
  60. GCCMCS_TBL_ITEM(MCS_NO_SUCH_CONNECTION, GCC_BAD_CONNECTION_HANDLE_POINTER),
  61. GCCMCS_TBL_ITEM(MCS_NO_SUCH_DOMAIN, GCC_DOMAIN_PARAMETERS_UNACCEPTABLE)};
  62. #else
  63. extern BOOL g_fInitialized;
  64. extern GCCMCS_ERROR_ENTRY GccMcsErrorTBL[];
  65. #endif
  66. //---------------------------------------------------------------------------
  67. // Prototypes
  68. //---------------------------------------------------------------------------
  69. GCCError gccMapMcsError(IN MCSError mcsError);
  70. void gccInitialized(IN BOOL fInitialized);
  71. BOOL gccIsInitialized(OUT GCCError *pgccError);
  72. MCSError gccEncodeUserData(IN USHORT usMembers,
  73. IN GCCUserData **ppDataList,
  74. OUT PBYTE *pUserData,
  75. OUT UINT *pUserDataLength);
  76. MCSError gccDecodeUserData(IN PBYTE pData,
  77. IN UINT DataLength,
  78. OUT GCCUserData *pGccUserData);
  79. void gccSetCallback(OUT GCCCallBack control_sap_callback);
  80. MCSError gccConnectProviderIndication(IN PConnectProviderIndication pcpi,
  81. IN PVOID pvContext);
  82. MCSError gccDisconnectProviderIndication(IN PDisconnectProviderIndication pdpi,
  83. IN PVOID pvContext);
  84. MCSError mcsCallback(IN DomainHandle hDomain,
  85. IN UINT Message,
  86. IN PVOID pvParam,
  87. IN PVOID pvContext);
  88. VOID gccFreeUserData(IN GCCUserData *pUserData);
  89. #if DBG
  90. void gccDumpMCSErrorDetails(IN MCSError mcsError,
  91. IN PCHAR pszText);
  92. #else
  93. #define gccDumpMCSErrorDetails(_x_, _y_);
  94. #endif
  95. #endif // __GCC_H_