IVsRunningDocTableEvents4.OnBeforeFirstDocumentLock Method
Called before a document is locked in the Running Document Table (RDT) for the first time.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
Syntax
'Declaration
Function OnBeforeFirstDocumentLock ( _
pHier As IVsHierarchy, _
itemid As UInteger, _
pszMkDocument As String _
) As Integer
int OnBeforeFirstDocumentLock(
IVsHierarchy pHier,
uint itemid,
string pszMkDocument
)
int OnBeforeFirstDocumentLock(
[InAttribute] IVsHierarchy^ pHier,
[InAttribute] unsigned int itemid,
[InAttribute] String^ pszMkDocument
)
abstract OnBeforeFirstDocumentLock :
pHier:IVsHierarchy *
itemid:uint32 *
pszMkDocument:string -> int
function OnBeforeFirstDocumentLock(
pHier : IVsHierarchy,
itemid : uint,
pszMkDocument : String
) : int
Parameters
pHier
Type: Microsoft.VisualStudio.Shell.Interop.IVsHierarchy[in] The IVsHierarchy object that owns the document about to be locked.
itemid
Type: UInt32[in] The item ID in the hierarchy. This is a unique identifier or it can be one of the following values: VSITEMID_NIL, VSITEMID_ROOT, or VSITEMID_SELECTION.
pszMkDocument
Type: String[in] The path to the document about to be locked.
Return Value
Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From vsshell80.idl:
[C++]
HRESULT IVsRunningDocTableEvents4::OnBeforeFirstDocumentLock(
[in] IVsHierarchy* pHier,
[in] VSITEMID itemid
);
This event can be used to make sure the document about to be locked is actually present on disk. For example, this event can give Source Control a chance to download the specified file from the source control database before it is locked and opened.
.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.