IVsRunningDocTableEvents4::OnBeforeFirstDocumentLock Method (IVsHierarchy^, UInt32, String^)
Visual Studio 2015
Called before a document is locked in the Running Document Table (RDT) for the first time.
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
int OnBeforeFirstDocumentLock( IVsHierarchy^ pHier, unsigned int itemid, String^ pszMkDocument )
Parameters
- pHier
-
Type:
Microsoft.VisualStudio.Shell.Interop::IVsHierarchy^
[in] The IVsHierarchy object that owns the document about to be locked.
- itemid
-
Type:
System::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:
System::String^
[in] The path to the document about to be locked.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
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.
Show: