Método IVsRunningDocumentTable.LockDocument (UInt32, UInt32)

 

Publicado: abril de 2016

Obtém um bloqueio de leitura ou editar um documento quando ele é aberto.

Namespace:   Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (em Microsoft.VisualStudio.Shell.Interop.dll)

Sintaxe

int LockDocument(
    uint grfRDTLockType,
    uint dwCookie
)
int LockDocument(
    unsigned int grfRDTLockType,
    unsigned int dwCookie
)
abstract LockDocument : 
        grfRDTLockType:uint32 *
        dwCookie:uint32 -> int
Function LockDocument (
    grfRDTLockType As UInteger,
    dwCookie As UInteger
) As Integer

Parâmetros

  • grfRDTLockType
    [in] Sinalizador cujo valor é obtido a partir do _VSRDTFLAGS enumeração.
  • dwCookie
    [in] Valor abstrato que representa o documento aberto para o qual uma leitura ou um bloqueio de edição é para ser obtido.

Valor de retorno

Type: System.Int32

Se o método for bem-sucedido, ele retorna S_OK.Se ele falhar, ele retorna um código de erro.

Comentários

COM assinatura

De vsshell.idl:

HRESULT IVsRunningDocumentTable::LockDocument(
   [in] VSRDTFLAGS grfRDTLockType,
   [in] VSCOOKIE   dwCookie
);

O dwCookie parâmetro é o mesmo valor que é retornado de FindAndLockDocument ou RegisterAndLockDocument métodos.

Consulte também

Interface IVsRunningDocumentTable
Namespace Microsoft.VisualStudio.Shell.Interop

Retornar ao topo