This topic has not yet been rated - Rate this topic

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 (
	[InAttribute] uint grfRDLH,
	[InAttribute] uint dwCookie,
	[InAttribute] IVsDocumentLockHolder pLockHolder,
	out uint pdwLHCookie
)
int RegisterDocumentLockHolder (
	/** @attribute InAttribute() */ UInt32 grfRDLH, 
	/** @attribute InAttribute() */ UInt32 dwCookie, 
	/** @attribute InAttribute() */ IVsDocumentLockHolder pLockHolder, 
	/** @attribute OutAttribute() */ /** @ref */ UInt32 pdwLHCookie
)
JScript does not support passing value-type arguments by reference.

Parameters

grfRDLH

[in] This is zero or a flag taken from the __VSREGDOCLOCKHOLDER enumeration.

dwCookie

[in] Abstract value representing the open document for which the read or edit lock is to be released.

pLockHolder

[in] An IVsDocumentLockHolder interface representing the document lock holder for the registered document.

pdwLHCookie

[out] Unique value representing the document lock holder.

Return Value

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.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.