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.

175 lines
6.7 KiB

  1. // Copyright (c) Microsoft Corporation. All rights reserved.
  2. //+-------------------------------------------------------------------------
  3. //
  4. // Microsoft Windows
  5. //
  6. // File: trkwks.idl
  7. //
  8. // Contents: RPC interface to Tracking (Workstation) Service.
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History:
  15. //
  16. //--------------------------------------------------------------------------
  17. import "trk.idl";
  18. import "trksvr.idl";
  19. // Kludges
  20. #define MAX_PATH 260
  21. [v1_enum] enum RGO_ENUM
  22. {
  23. RGO_GET_OBJECTID = 1,
  24. RGO_READ_OBJECTID
  25. };
  26. typedef struct
  27. {
  28. long volindex;
  29. CVolumeId volume;
  30. } TRK_VOLUME_TRACKING_INFORMATION;
  31. [v1_enum] enum ObjectOwnership
  32. {
  33. OBJOWN_UNKNOWN = 1,
  34. OBJOWN_DOESNT_EXIST = 2,
  35. OBJOWN_OWNED = 3,
  36. OBJOWN_NOT_OWNED = 4,
  37. OBJOWN_NO_ID = 5
  38. };
  39. typedef [v1_enum] enum TrkInfoScope
  40. {
  41. TRKINFOSCOPE_ONE_FILE = 1,
  42. TRKINFOSCOPE_DIRECTORY = 2,
  43. TRKINFOSCOPE_VOLUME = 3,
  44. TRKINFOSCOPE_MACHINE = 4
  45. } TrkInfoScope;
  46. cpp_quote("")
  47. cpp_quote("// 'Restrictions' flags")
  48. typedef enum _TrkMendRestrictions
  49. {
  50. TRK_MEND_DEFAULT = 0,
  51. TRK_MEND_DONT_USE_LOG = 2,
  52. TRK_MEND_DONT_USE_DC = 4,
  53. TRK_MEND_SLEEP_DURING_MEND = 8,
  54. TRK_MEND_DONT_SEARCH_ALL_VOLUMES = 16,
  55. TRK_MEND_DONT_USE_VOLIDS = 32,
  56. TRK_MEND_DONT_SEARCH_LAST_MACHINE = 64
  57. } TrkMendRestrictions;
  58. typedef pipe TCHAR TCHAR_PIPE;
  59. typedef pipe TRK_VOLUME_TRACKING_INFORMATION TRK_VOLUME_TRACKING_INFORMATION_PIPE;
  60. typedef pipe TRK_FILE_TRACKING_INFORMATION TRK_FILE_TRACKING_INFORMATION_PIPE;
  61. // Version 1.0 was beta1. Version 1.1 has some new methods appended to the interface.
  62. [
  63. uuid(300f3532-38cc-11d0-a3f0-0020af6b0add),
  64. version(1.2),
  65. pointer_default(unique)
  66. ]
  67. interface trkwks
  68. {
  69. //
  70. // Original (beta1) Tracking Workstation Service APIs.
  71. //
  72. HRESULT old_LnkMendLink([in] FILETIME ftLimit,
  73. [in] ULONG Restrictions,
  74. [in] const CDomainRelativeObjId * pdroidBirth,
  75. [in] const CDomainRelativeObjId * pdroidLast,
  76. [out] CDomainRelativeObjId * pdroidCurrent,
  77. [out, string] WCHAR wsz[MAX_PATH+1] );
  78. HRESULT old_LnkSearchMachine([in] ULONG Restrictions,
  79. [in] const CDomainRelativeObjId * pdroidLast,
  80. [out] CDomainRelativeObjId * pdroidReferral,
  81. [out, string] TCHAR tsz[MAX_PATH+1] );
  82. HRESULT old_LnkCallSvrMessage( [in, out] TRKSVR_MESSAGE_UNION_OLD * pMsg );
  83. HRESULT LnkSetVolumeId( ULONG volumeIndex, const CVolumeId VolId );
  84. HRESULT LnkRestartDcSynchronization( );
  85. HRESULT GetVolumeTrackingInformation( [in] CVolumeId volid, [in] TrkInfoScope scope, [out] TRK_VOLUME_TRACKING_INFORMATION_PIPE pipeVolInfo );
  86. HRESULT GetFileTrackingInformation( [in] CDomainRelativeObjId droidCurrent, [in] TrkInfoScope scope, [out] TRK_FILE_TRACKING_INFORMATION_PIPE pipeFileInfo );
  87. // Elsewhere, we only allow 26 volumes. Set set a range here to prevent a
  88. // denial of service attack (otherwise clients can set a huge value in cVolumes,
  89. // and cause the server to do a huge allocation).
  90. HRESULT TriggerVolumeClaims( [in, range(1, NUM_VOLUMES)] ULONG cVolumes,
  91. [in, size_is(cVolumes)] const CVolumeId *rgvolid );
  92. HRESULT LnkOnRestore();
  93. //
  94. // Ver 1.1 methods
  95. //
  96. // This typedef (which generates warnings that we ignore) is necessary
  97. // so that we can put a range on the pcbPath below (you can't put a range
  98. // on a pointer type). Without this range a DoS attack can be implemented
  99. // by passing a large cbPath, causing a large server-side allocation.
  100. midl_pragma warning( disable: 2466 2467)
  101. typedef [range(1, 2*(MAX_PATH+1) )] ULONG CBPATH;
  102. HRESULT LnkMendLink([in] FILETIME ftLimit,
  103. [in] DWORD Restrictions,
  104. [in] const CDomainRelativeObjId * pdroidBirth,
  105. [in] const CDomainRelativeObjId * pdroidLast,
  106. [in] const CMachineId * pmcidLast,
  107. [out] CDomainRelativeObjId * pdroidCurrent,
  108. [out] CMachineId * pmcidCurrent,
  109. [in, out] CBPATH * pcbPath,
  110. [out, size_is(*pcbPath), string] WCHAR* pwszPath );
  111. HRESULT old2_LnkSearchMachine([in] DWORD Restrictions,
  112. [in] const CDomainRelativeObjId * pdroidLast,
  113. [out] CDomainRelativeObjId * pdroidNext,
  114. [out] CMachineId * pmcidNext,
  115. [out, max_is(MAX_PATH+1), string] TCHAR* ptszPath );
  116. HRESULT LnkCallSvrMessage( [in, out] TRKSVR_MESSAGE_UNION * pMsg );
  117. //
  118. // Ver 1.2 methods
  119. //
  120. /*
  121. HRESULT LnkMendLink([in] FILETIME ftLimit,
  122. [in] DWORD Restrictions,
  123. [in] const CDomainRelativeObjId *pdroidBirthLast,
  124. [in] const CDomainRelativeObjId *pdroidLast,
  125. [in] const CMachineId *pmcidLast,
  126. [out] CDomainRelativeObjId * pdroidBirthCurrent,
  127. [out] CDomainRelativeObjId * pdroidCurrent,
  128. [out] CMachineId * pmcidCurrent,
  129. [in, out] ULONG * pcbPath,
  130. [out, size_is(*pcbPath), string] WCHAR* pwszPath );
  131. */
  132. HRESULT LnkSearchMachine([in] DWORD Restrictions,
  133. [in] const CDomainRelativeObjId *pdroidBirthLast,
  134. [in] const CDomainRelativeObjId *pdroidLast,
  135. [out] CDomainRelativeObjId *pdroidBirthNext,
  136. [out] CDomainRelativeObjId *pdroidNext,
  137. [out] CMachineId *pmcidNext,
  138. [out, max_is(MAX_PATH+1), string] TCHAR* ptszPath );
  139. }