共用方式為


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

Definition

Accesses a specified set of files and asks all implementers of this method to release any locks that may exist on those files.

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] A value from the __HANDSOFFMODE enumeration, indicating the type of access requested. This can be used to optimize the locks that actually need to be released.

cFiles
Int32

[in] The number of files in the rgpszMkDocuments array.

rgpszMkDocuments
String[]

[in] If there are any locks on this array of file names, the caller wants them to be released.

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 is called as a result of a call to the HandsOffFiles method.

This method is typically called just before a batch process on a collection of files is performed. This method should release any locks held on the files before returning. If this method returns an error code, the project may still continue with the batch process. This method should be implemented to properly release any locks as quickly as possible.

Applies to