IVsTrackProjectDocuments3::HandsOffFiles Method (UInt32, Int32, array<String^>^)
This method is called when a project wants to affect a number of files and wants any locks on those files released.
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
int HandsOffFiles( unsigned int grfRequiredAccess, int cFiles, array<String^>^ rgpszMkDocuments )
Parameters
- grfRequiredAccess
-
Type:
System::UInt32
[in] One of the values from the __HANDSOFFMODE enumeration.
- cFiles
-
Type:
System::Int32
[in] The number of filenames specified in the rgpszMkDocuments array.
- rgpszMkDocuments
-
Type:
array<System::String^>^
[in] An array of file names that the project wants to affect.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
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.