IVsTrackProjectDocuments3.HandsOffFiles Method

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

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)

Syntax

‘선언
Function HandsOffFiles ( _
    grfRequiredAccess As UInteger, _
    cFiles As Integer, _
    rgpszMkDocuments As String() _
) As Integer
‘사용 방법
Dim instance As IVsTrackProjectDocuments3
Dim grfRequiredAccess As UInteger
Dim cFiles As Integer
Dim rgpszMkDocuments As String()
Dim returnValue As Integer

returnValue = instance.HandsOffFiles(grfRequiredAccess, _
    cFiles, rgpszMkDocuments)
int HandsOffFiles(
    uint grfRequiredAccess,
    int cFiles,
    string[] rgpszMkDocuments
)
int HandsOffFiles(
    [InAttribute] unsigned int grfRequiredAccess, 
    [InAttribute] int cFiles, 
    [InAttribute] array<String^>^ rgpszMkDocuments
)
abstract HandsOffFiles : 
        grfRequiredAccess:uint32 * 
        cFiles:int * 
        rgpszMkDocuments:string[] -> int 
function HandsOffFiles(
    grfRequiredAccess : uint, 
    cFiles : int, 
    rgpszMkDocuments : String[]
) : int

Parameters

  • 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.Int32
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.

.NET Framework Security

See Also

Reference

IVsTrackProjectDocuments3 Interface

IVsTrackProjectDocuments3 Members

Microsoft.VisualStudio.Shell.Interop Namespace