IVsTrackProjectDocumentsEvents3.HandsOffFiles Method
Accesses a specified set of files and asks all implementers of this method to release any locks that may exist on those files.
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] 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
Type: Int32[in] The number of files in the rgpszMkDocuments array.
rgpszMkDocuments
Type: array<String[][in] If there are any locks on this array of file names, the caller wants them to be released.
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 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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.