Export (0) Print
Expand All

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)

int RegisterDocumentLockHolder(
	uint grfRDLH,
	uint dwCookie,
	IVsDocumentLockHolder pLockHolder,
	out uint pdwLHCookie
)

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.

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.

Community Additions

ADD
Show:
© 2015 Microsoft