RunningDocumentTable.LockDocument Method
Gets a read or edit lock on the specified document.
This API is not CLS-compliant.
Namespace: Microsoft.VisualStudio.Shell
Assemblies: Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)
Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
Syntax
声明
<CLSCompliantAttribute(False)> _
Public Sub LockDocument ( _
lockType As _VSRDTFLAGS, _
cookie As UInteger _
)
用法
Dim instance As RunningDocumentTable
Dim lockType As _VSRDTFLAGS
Dim cookie As UInteger
instance.LockDocument(lockType, cookie)
[CLSCompliantAttribute(false)]
public void LockDocument(
_VSRDTFLAGS lockType,
uint cookie
)
[CLSCompliantAttribute(false)]
public:
void LockDocument(
_VSRDTFLAGS lockType,
unsigned int cookie
)
[<CLSCompliantAttribute(false)>]
member LockDocument :
lockType:_VSRDTFLAGS *
cookie:uint32 -> unit
public function LockDocument(
lockType : _VSRDTFLAGS,
cookie : uint
)
Parameters
- lockType
Type: Microsoft.VisualStudio.Shell.Interop._VSRDTFLAGS
Lock values from the _VSRDTFLAGS enumeration.
- cookie
Type: System.UInt32
The identifier of the document to lock.
Remarks
This method calls LockDocument.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.