IVsRunningDocumentTable.RegisterDocumentLockHolder Method
Registers a document lock holder in the running document table.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
‘선언
Function RegisterDocumentLockHolder ( _
grfRDLH As UInteger, _
dwCookie As UInteger, _
pLockHolder As IVsDocumentLockHolder, _
<OutAttribute> ByRef pdwLHCookie As UInteger _
) As Integer
‘사용 방법
Dim instance As IVsRunningDocumentTable
Dim grfRDLH As UInteger
Dim dwCookie As UInteger
Dim pLockHolder As IVsDocumentLockHolder
Dim pdwLHCookie As UInteger
Dim returnValue As Integer
returnValue = instance.RegisterDocumentLockHolder(grfRDLH, _
dwCookie, pLockHolder, pdwLHCookie)
int RegisterDocumentLockHolder(
uint grfRDLH,
uint dwCookie,
IVsDocumentLockHolder pLockHolder,
out uint pdwLHCookie
)
int RegisterDocumentLockHolder(
[InAttribute] unsigned int grfRDLH,
[InAttribute] unsigned int dwCookie,
[InAttribute] IVsDocumentLockHolder^ pLockHolder,
[OutAttribute] unsigned int% pdwLHCookie
)
function RegisterDocumentLockHolder(
grfRDLH : uint,
dwCookie : uint,
pLockHolder : IVsDocumentLockHolder,
pdwLHCookie : uint
) : int
Parameters
grfRDLH
Type: System.UInt32[in] This is zero or a flag taken from the __VSREGDOCLOCKHOLDER enumeration.
dwCookie
Type: System.UInt32[in] Abstract value representing the open document for which the read or edit lock is to be released.
pLockHolder
Type: Microsoft.VisualStudio.Shell.Interop.IVsDocumentLockHolder[in] An IVsDocumentLockHolder interface representing the document lock holder for the registered document.
pdwLHCookie
Type: System.UInt32%[out] Unique value representing the document lock holder.
Return Value
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From vsshell.idl:
HRESULT IVsRunningDocumentTable::RegisterDocumentLockHolder(
[in] VSREGDOCLOCKHOLDER grfRDLH,
[in] VSCOOKIE dwCookie,
[in] IVsDocumentLockHolder *pLockHolder,
[out] VSCOOKIE *pdwLHCookie
);
Use this identifier returned in the pdwLHCookie parameter to unregister the document lock holder by calling the UnregisterDocumentLockHolder method.
The dwCookie parameter is same value that is returned from the FindAndLockDocument or RegisterAndLockDocument methods.
Permissions
- 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.
See Also
Reference
IVsRunningDocumentTable Interface