IVsRunningDocumentTable.UnlockDocument(UInt32, UInt32) Método

Definição

Libera um bloqueio de leitura ou de edição no documento aberto.

public:
 int UnlockDocument(System::UInt32 grfRDTLockType, System::UInt32 dwCookie);
public:
 int UnlockDocument(unsigned int grfRDTLockType, unsigned int dwCookie);
int UnlockDocument(unsigned int grfRDTLockType, unsigned int dwCookie);
public int UnlockDocument (uint grfRDTLockType, uint dwCookie);
abstract member UnlockDocument : uint32 * uint32 -> int
Public Function UnlockDocument (grfRDTLockType As UInteger, dwCookie As UInteger) As Integer

Parâmetros

grfRDTLockType
UInt32

no Os valores são obtidos da _VSRDTFLAGS enumeração. Use o RDT_RequestUnlock sinalizador com esse método para indicar o que deve acontecer se esse for o último desbloqueio, pois o último desbloqueio fará com que o documento seja salvo.

dwCookie
UInt32

no Valor abstrato que representa o documento aberto para o qual o bloqueio de leitura ou edição será liberado.

Retornos

Int32

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

Comentários

Assinatura COM

De VSShell. idl:

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

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

Se não for conveniente lembrar do dwCookie , lembre-se do pszMkDocument e chame o FindAndLockDocument método para recuperar o e, dwCookie em seguida, chame o UnlockDocument método duas vezes. No entanto, há implicações de desempenho para fazer isso.

Aplica-se a