Partager via


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

'Declaration
Function HandsOffFiles ( _
    grfRequiredAccess As UInteger, _
    cFiles As Integer, _
    rgpszMkDocuments As String() _
) As Integer
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

  • grfRequiredAccess
    Type: UInt32

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

  • cFiles
    Type: Int32

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

  • rgpszMkDocuments
    Type: array<String[]

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

Return Value

Type: 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

Microsoft.VisualStudio.Shell.Interop Namespace