Freigeben über


IVsTrackProjectDocuments3.HandsOffFiles(UInt32, Int32, String[]) Method

Definition

This method is called when a project wants to affect a number of files and wants any locks on those files released.

public:
 int HandsOffFiles(System::UInt32 grfRequiredAccess, int cFiles, cli::array <System::String ^> ^ rgpszMkDocuments);
public:
 int HandsOffFiles(unsigned int grfRequiredAccess, int cFiles, Platform::Array <Platform::String ^> ^ rgpszMkDocuments);
int HandsOffFiles(unsigned int grfRequiredAccess, int cFiles, std::Array <std::wstring const &> const & rgpszMkDocuments);
public int HandsOffFiles (uint grfRequiredAccess, int cFiles, string[] rgpszMkDocuments);
abstract member HandsOffFiles : uint32 * int * string[] -> int
Public Function HandsOffFiles (grfRequiredAccess As UInteger, cFiles As Integer, rgpszMkDocuments As String()) As Integer

Parameters

grfRequiredAccess
UInt32

[in] One of the values from the __HANDSOFFMODE enumeration.

cFiles
Int32

[in] The number of filenames specified in the rgpszMkDocuments array.

rgpszMkDocuments
String[]

[in] An array of file names that the project wants to affect.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From ivstrackprojectdocumentsevents80.idl

HRESULT HandsOffFiles(  
   [in] HANDSOFFMODE grfRequiredAccess,  
   [in] int cFiles,  
   [in, size_is(cFiles)] const LPCOLESTR rgpszMkDocuments[]  
);  

This method should be called before anything is done to the files. In a source control situation, a project would call the necessary OnQueryXX methods of the IVsTrackProjectDocuments2 interface to determine whether a particular operation will succeed. If the OnQueryXX method indicates that everything is okay, then the project calls HandsOffFiles to gain access to the files. After any operations are completed on the files, the project calls the HandsOnFiles method to indicate that it is done with the files.

Applies to