Freigeben über


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

  • 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

See Also

Reference

IVsRunningDocTableEvents4 Interface

Microsoft.VisualStudio.Shell.Interop Namespace