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.

165 lines
7.6 KiB

  1. //+----------------------------------------------------------------------------
  2. //
  3. // Copyright (C) 1995, Microsoft Corporation
  4. //
  5. // File: marshal.hxx
  6. //
  7. // Contents: Dfs Marshalling macros for Dfs Manager structures
  8. //
  9. // Classes:
  10. //
  11. // Functions:
  12. //
  13. // History: April 10, 1995 Milans created
  14. // December 7, 1998 Jharper updated
  15. //
  16. //-----------------------------------------------------------------------------
  17. #ifndef _MARSHAL_
  18. #define _MARSHAL_
  19. //
  20. // Marshalling info for FILETIME structure
  21. //
  22. extern MARSHAL_INFO MiFileTime;
  23. #define INIT_FILE_TIME_INFO() \
  24. static MARSHAL_TYPE_INFO _MCode_FileTime[] = { \
  25. _MCode_ul(FILETIME, dwLowDateTime), \
  26. _MCode_ul(FILETIME, dwHighDateTime) \
  27. }; \
  28. MARSHAL_INFO MiFileTime = _mkMarshalInfo(FILETIME, _MCode_FileTime);
  29. //
  30. // Marshalling info for DFS_ID_PROPS structure
  31. //
  32. extern MARSHAL_INFO MiDfsIdProps;
  33. #define INIT_DFS_ID_PROPS_INFO() \
  34. static MARSHAL_TYPE_INFO _MCode_DfsIdProps[] = { \
  35. _MCode_pwstr(DFS_ID_PROPS, wszPrefix), \
  36. _MCode_pwstr(DFS_ID_PROPS, wszShortPath), \
  37. _MCode_guid(DFS_ID_PROPS, idVolume), \
  38. _MCode_ul(DFS_ID_PROPS, dwState), \
  39. _MCode_ul(DFS_ID_PROPS, dwType), \
  40. _MCode_pwstr(DFS_ID_PROPS, wszComment), \
  41. _MCode_struct(DFS_ID_PROPS, ftEntryPath, &MiFileTime), \
  42. _MCode_struct(DFS_ID_PROPS, ftState, &MiFileTime), \
  43. _MCode_struct(DFS_ID_PROPS, ftComment, &MiFileTime) \
  44. }; \
  45. MARSHAL_INFO MiDfsIdProps = _mkMarshalInfo(DFS_ID_PROPS, _MCode_DfsIdProps);
  46. //
  47. // Marshalling info for DFS_REPLICA_INFO structure
  48. //
  49. extern MARSHAL_INFO MiDfsReplicaInfo;
  50. #define INIT_DFS_REPLICA_INFO_MARSHAL_INFO() \
  51. static MARSHAL_TYPE_INFO _MCode_DfsReplicaInfo[] = { \
  52. _MCode_ul(DFS_REPLICA_INFO, ulReplicaState), \
  53. _MCode_ul(DFS_REPLICA_INFO, ulReplicaType), \
  54. _MCode_pwstr(DFS_REPLICA_INFO, pwszServerName), \
  55. _MCode_pwstr(DFS_REPLICA_INFO, pwszShareName), \
  56. }; \
  57. MARSHAL_INFO MiDfsReplicaInfo = _mkMarshalInfo(DFS_REPLICA_INFO, _MCode_DfsReplicaInfo);
  58. //
  59. // Marshalling info for DFS_SITENAME_INFO
  60. //
  61. extern MARSHAL_INFO MiDfsSiteNameInfo;
  62. #define INIT_DFS_SITENAME_INFO_MARSHAL_INFO() \
  63. static MARSHAL_TYPE_INFO _MCode_DfsSiteNameInfo[] = { \
  64. _MCode_ul(DFS_SITENAME_INFO, SiteFlags), \
  65. _MCode_pwstr(DFS_SITENAME_INFO, SiteName), \
  66. }; \
  67. MARSHAL_INFO MiDfsSiteNameInfo = _mkMarshalInfo(DFS_SITENAME_INFO, _MCode_DfsSiteNameInfo);
  68. //
  69. // Marshalling info for DFS_SITELIST_INFO
  70. //
  71. extern MARSHAL_INFO MiDfsSiteListInfo;
  72. #define INIT_DFS_SITELIST_INFO_MARSHAL_INFO() \
  73. static MARSHAL_TYPE_INFO _MCode_DfsSiteListInfo[] = { \
  74. _MCode_ul(DFS_SITELIST_INFO, cSites), \
  75. _MCode_castruct(DFS_SITELIST_INFO,Site,cSites,&MiDfsSiteNameInfo), \
  76. }; \
  77. MARSHAL_INFO MiDfsSiteListInfo = _mkMarshalInfo(DFS_SITELIST_INFO, _MCode_DfsSiteListInfo);
  78. //
  79. // Marshalling info for DFSM_SITE_ENTRY
  80. //
  81. extern MARSHAL_INFO MiDfsmSiteEntry;
  82. #define INIT_DFSM_SITE_ENTRY_MARSHAL_INFO() \
  83. static MARSHAL_TYPE_INFO _MCode_DfsmSiteEntry[] = { \
  84. _MCode_pwstr(DFSM_SITE_ENTRY, ServerName), \
  85. _MCode_struct(DFSM_SITE_ENTRY,Info,&MiDfsSiteListInfo), \
  86. }; \
  87. MARSHAL_INFO MiDfsmSiteEntry = _mkMarshalInfo(DFSM_SITE_ENTRY, _MCode_DfsmSiteEntry);
  88. //
  89. // Marshalling info for LDAP_OBJECT
  90. //
  91. extern MARSHAL_INFO MiLdapObject;
  92. #define INIT_LDAP_OBJECT_MARSHAL_INFO() \
  93. static MARSHAL_TYPE_INFO _MCode_LdapObjectInfo[] = { \
  94. _MCode_pwstr(LDAP_OBJECT, wszObjectName), \
  95. _MCode_ul(LDAP_OBJECT, cbObjectData), \
  96. _MCode_pcauch(LDAP_OBJECT, pObjectData, cbObjectData) \
  97. }; \
  98. MARSHAL_INFO MiLdapObject = _mkMarshalInfo(LDAP_OBJECT, _MCode_LdapObjectInfo);
  99. //
  100. // Marshalling info for LDAP_PKT
  101. //
  102. extern MARSHAL_INFO MiLdapPkt;
  103. #define INIT_LDAP_PKT_MARSHAL_INFO() \
  104. static MARSHAL_TYPE_INFO _MCode_LdapPktInfo[] = { \
  105. _MCode_ul(LDAP_PKT, cLdapObjects), \
  106. _MCode_pcastruct(LDAP_PKT, rgldapObjects, cLdapObjects, &MiLdapObject) \
  107. }; \
  108. MARSHAL_INFO MiLdapPkt = _mkMarshalInfo(LDAP_PKT, _MCode_LdapPktInfo);
  109. //
  110. // Marshalling info for DFS_VOLUME_PROPERTIES
  111. //
  112. extern MARSHAL_INFO MiVolumeProperties;
  113. #define INIT_LDAP_DFS_VOLUME_PROPERTIES_MARSHAL_INFO() \
  114. static MARSHAL_TYPE_INFO _MCode_VolumePropertiesInfo[] = { \
  115. _MCode_guid(DFS_VOLUME_PROPERTIES, idVolume), \
  116. _MCode_pwstr(DFS_VOLUME_PROPERTIES, wszPrefix), \
  117. _MCode_pwstr(DFS_VOLUME_PROPERTIES, wszShortPrefix), \
  118. _MCode_ul(DFS_VOLUME_PROPERTIES, dwType), \
  119. _MCode_ul(DFS_VOLUME_PROPERTIES, dwState), \
  120. _MCode_pwstr(DFS_VOLUME_PROPERTIES, wszComment), \
  121. _MCode_struct(DFS_VOLUME_PROPERTIES, ftPrefix, &MiFileTime), \
  122. _MCode_struct(DFS_VOLUME_PROPERTIES, ftState, &MiFileTime), \
  123. _MCode_struct(DFS_VOLUME_PROPERTIES, ftComment, &MiFileTime), \
  124. _MCode_ul(DFS_VOLUME_PROPERTIES, dwVersion), \
  125. _MCode_ul(DFS_VOLUME_PROPERTIES, cbSvc), \
  126. _MCode_pcauch(DFS_VOLUME_PROPERTIES, pSvc, cbSvc), \
  127. _MCode_ul(DFS_VOLUME_PROPERTIES, cbRecovery), \
  128. _MCode_pcauch(DFS_VOLUME_PROPERTIES, pRecovery, cbRecovery) \
  129. }; \
  130. MARSHAL_INFO MiVolumeProperties = \
  131. _mkMarshalInfo(DFS_VOLUME_PROPERTIES, _MCode_VolumePropertiesInfo);
  132. #endif // _MARSHAL_