Partager via


DesignerDocDataService.IVsRunningDocTableEvents.OnBeforeLastDocumentUnlock Method

Called before the last lock of the specified type is released on the specified document in the Running Document Table (RDT).

Namespace:  Microsoft.VisualStudio.Shell.Design.Serialization
Assembly:  Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)

Syntax

'Declaration
Private Function OnBeforeLastDocumentUnlock ( _
    docCookie As UInteger, _
    lockType As UInteger, _
    readLocksRemaining As UInteger, _
    editLocksRemaining As UInteger _
) As Integer Implements IVsRunningDocTableEvents.OnBeforeLastDocumentUnlock
int IVsRunningDocTableEvents.OnBeforeLastDocumentUnlock(
    uint docCookie,
    uint lockType,
    uint readLocksRemaining,
    uint editLocksRemaining
)
private:
virtual int OnBeforeLastDocumentUnlock(
    unsigned int docCookie, 
    unsigned int lockType, 
    unsigned int readLocksRemaining, 
    unsigned int editLocksRemaining
) sealed = IVsRunningDocTableEvents::OnBeforeLastDocumentUnlock
private abstract OnBeforeLastDocumentUnlock : 
        docCookie:uint32 * 
        lockType:uint32 * 
        readLocksRemaining:uint32 * 
        editLocksRemaining:uint32 -> int  
private override OnBeforeLastDocumentUnlock : 
        docCookie:uint32 * 
        lockType:uint32 * 
        readLocksRemaining:uint32 * 
        editLocksRemaining:uint32 -> int
JScript does not support explicit interface implementations.

Parameters

  • docCookie
    Type: UInt32

    The identifier of the document data object in the Running Document Table.

  • lockType
    Type: UInt32

    __VSRDTFLAGS values specifying the type of lock being released.

  • readLocksRemaining
    Type: UInt32

    The number of read locks remaining.

  • editLocksRemaining
    Type: UInt32

    The number of edit locks remaining.

Return Value

Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Implements

IVsRunningDocTableEvents.OnBeforeLastDocumentUnlock(UInt32, UInt32, UInt32, UInt32)

Remarks

This method responds to the last unlock of the master document data object. If this is the last unlock, and if the user doesn't want to save the document, all the other document data objects in the list are marked so that they are not saved.

.NET Framework Security

See Also

Reference

DesignerDocDataService Class

Microsoft.VisualStudio.Shell.Design.Serialization Namespace