IVsRunningDocumentTable::LockDocument Method (UInt32, UInt32)
Visual Studio 2015
Obtains a read or edit lock on a document when it is opened.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Parameters
- grfRDTLockType
-
Type:
System::UInt32
[in] Flag whose value is taken from the _VSRDTFLAGS enumeration.
- dwCookie
-
Type:
System::UInt32
[in] Abstract value representing the open document for which a read or an edit lock is to be obtained.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
From vsshell.idl:
HRESULT IVsRunningDocumentTable::LockDocument( [in] VSRDTFLAGS grfRDTLockType, [in] VSCOOKIE dwCookie );
The dwCookie parameter is the same value that is returned from the FindAndLockDocument or RegisterAndLockDocument methods.
Show: