RunningDocumentTable::RegisterAndLockDocument Method (_VSRDTFLAGS, String^, IVsHierarchy^, UInt32, IntPtr)

 

Creates an entry in the running document table when a document is created or opened.

Namespace:   Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)

public:
unsigned int RegisterAndLockDocument(
	_VSRDTFLAGS lockType,
	String^ mkDocument,
	IVsHierarchy^ hierarchy,
	unsigned int itemid,
	IntPtr docData
)

Parameters

lockType
Type: Microsoft.VisualStudio.Shell.Interop::_VSRDTFLAGS

Lock values from the _VSRDTFLAGS enumeration.

mkDocument
Type: System::String^

The absolute path of the document.

hierarchy
Type: Microsoft.VisualStudio.Shell.Interop::IVsHierarchy^

The IVsHierarchy interface of the hierarchy element that owns the document.

itemid
Type: System::UInt32

The item ID of the node.

docData
Type: System::IntPtr

[out] Returns a pointer to the IUnknown interface of the document data object.

Return Value

Type: System::UInt32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Return to top
Show: