// Copyright (c) Microsoft Corporation. All rights reserved. //+------------------------------------------------------------------------- // // Microsoft Windows // // File: trkwks.idl // // Contents: RPC interface to Tracking (Workstation) Service. // // Classes: // // Functions: // // History: // //-------------------------------------------------------------------------- import "trk.idl"; import "trksvr.idl"; // Kludges #define MAX_PATH 260 [v1_enum] enum RGO_ENUM { RGO_GET_OBJECTID = 1, RGO_READ_OBJECTID }; typedef struct { long volindex; CVolumeId volume; } TRK_VOLUME_TRACKING_INFORMATION; [v1_enum] enum ObjectOwnership { OBJOWN_UNKNOWN = 1, OBJOWN_DOESNT_EXIST = 2, OBJOWN_OWNED = 3, OBJOWN_NOT_OWNED = 4, OBJOWN_NO_ID = 5 }; typedef [v1_enum] enum TrkInfoScope { TRKINFOSCOPE_ONE_FILE = 1, TRKINFOSCOPE_DIRECTORY = 2, TRKINFOSCOPE_VOLUME = 3, TRKINFOSCOPE_MACHINE = 4 } TrkInfoScope; cpp_quote("") cpp_quote("// 'Restrictions' flags") typedef enum _TrkMendRestrictions { TRK_MEND_DEFAULT = 0, TRK_MEND_DONT_USE_LOG = 2, TRK_MEND_DONT_USE_DC = 4, TRK_MEND_SLEEP_DURING_MEND = 8, TRK_MEND_DONT_SEARCH_ALL_VOLUMES = 16, TRK_MEND_DONT_USE_VOLIDS = 32, TRK_MEND_DONT_SEARCH_LAST_MACHINE = 64 } TrkMendRestrictions; typedef pipe TCHAR TCHAR_PIPE; typedef pipe TRK_VOLUME_TRACKING_INFORMATION TRK_VOLUME_TRACKING_INFORMATION_PIPE; typedef pipe TRK_FILE_TRACKING_INFORMATION TRK_FILE_TRACKING_INFORMATION_PIPE; // Version 1.0 was beta1. Version 1.1 has some new methods appended to the interface. [ uuid(300f3532-38cc-11d0-a3f0-0020af6b0add), version(1.2), pointer_default(unique) ] interface trkwks { // // Original (beta1) Tracking Workstation Service APIs. // HRESULT old_LnkMendLink([in] FILETIME ftLimit, [in] ULONG Restrictions, [in] const CDomainRelativeObjId * pdroidBirth, [in] const CDomainRelativeObjId * pdroidLast, [out] CDomainRelativeObjId * pdroidCurrent, [out, string] WCHAR wsz[MAX_PATH+1] ); HRESULT old_LnkSearchMachine([in] ULONG Restrictions, [in] const CDomainRelativeObjId * pdroidLast, [out] CDomainRelativeObjId * pdroidReferral, [out, string] TCHAR tsz[MAX_PATH+1] ); HRESULT old_LnkCallSvrMessage( [in, out] TRKSVR_MESSAGE_UNION_OLD * pMsg ); HRESULT LnkSetVolumeId( ULONG volumeIndex, const CVolumeId VolId ); HRESULT LnkRestartDcSynchronization( ); HRESULT GetVolumeTrackingInformation( [in] CVolumeId volid, [in] TrkInfoScope scope, [out] TRK_VOLUME_TRACKING_INFORMATION_PIPE pipeVolInfo ); HRESULT GetFileTrackingInformation( [in] CDomainRelativeObjId droidCurrent, [in] TrkInfoScope scope, [out] TRK_FILE_TRACKING_INFORMATION_PIPE pipeFileInfo ); // Elsewhere, we only allow 26 volumes. Set set a range here to prevent a // denial of service attack (otherwise clients can set a huge value in cVolumes, // and cause the server to do a huge allocation). HRESULT TriggerVolumeClaims( [in, range(1, NUM_VOLUMES)] ULONG cVolumes, [in, size_is(cVolumes)] const CVolumeId *rgvolid ); HRESULT LnkOnRestore(); // // Ver 1.1 methods // // This typedef (which generates warnings that we ignore) is necessary // so that we can put a range on the pcbPath below (you can't put a range // on a pointer type). Without this range a DoS attack can be implemented // by passing a large cbPath, causing a large server-side allocation. midl_pragma warning( disable: 2466 2467) typedef [range(1, 2*(MAX_PATH+1) )] ULONG CBPATH; HRESULT LnkMendLink([in] FILETIME ftLimit, [in] DWORD Restrictions, [in] const CDomainRelativeObjId * pdroidBirth, [in] const CDomainRelativeObjId * pdroidLast, [in] const CMachineId * pmcidLast, [out] CDomainRelativeObjId * pdroidCurrent, [out] CMachineId * pmcidCurrent, [in, out] CBPATH * pcbPath, [out, size_is(*pcbPath), string] WCHAR* pwszPath ); HRESULT old2_LnkSearchMachine([in] DWORD Restrictions, [in] const CDomainRelativeObjId * pdroidLast, [out] CDomainRelativeObjId * pdroidNext, [out] CMachineId * pmcidNext, [out, max_is(MAX_PATH+1), string] TCHAR* ptszPath ); HRESULT LnkCallSvrMessage( [in, out] TRKSVR_MESSAGE_UNION * pMsg ); // // Ver 1.2 methods // /* HRESULT LnkMendLink([in] FILETIME ftLimit, [in] DWORD Restrictions, [in] const CDomainRelativeObjId *pdroidBirthLast, [in] const CDomainRelativeObjId *pdroidLast, [in] const CMachineId *pmcidLast, [out] CDomainRelativeObjId * pdroidBirthCurrent, [out] CDomainRelativeObjId * pdroidCurrent, [out] CMachineId * pmcidCurrent, [in, out] ULONG * pcbPath, [out, size_is(*pcbPath), string] WCHAR* pwszPath ); */ HRESULT LnkSearchMachine([in] DWORD Restrictions, [in] const CDomainRelativeObjId *pdroidBirthLast, [in] const CDomainRelativeObjId *pdroidLast, [out] CDomainRelativeObjId *pdroidBirthNext, [out] CDomainRelativeObjId *pdroidNext, [out] CMachineId *pmcidNext, [out, max_is(MAX_PATH+1), string] TCHAR* ptszPath ); }