次の方法で共有


RunningDocumentTable.RegisterAndLockDocument Method

Definition

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

public:
 System::UInt32 RegisterAndLockDocument(Microsoft::VisualStudio::Shell::Interop::_VSRDTFLAGS lockType, System::String ^ mkDocument, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ hierarchy, System::UInt32 itemid, IntPtr docData);
public uint RegisterAndLockDocument (Microsoft.VisualStudio.Shell.Interop._VSRDTFLAGS lockType, string mkDocument, Microsoft.VisualStudio.Shell.Interop.IVsHierarchy hierarchy, uint itemid, IntPtr docData);
member this.RegisterAndLockDocument : Microsoft.VisualStudio.Shell.Interop._VSRDTFLAGS * string * Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * uint32 * nativeint -> uint32
Public Function RegisterAndLockDocument (lockType As _VSRDTFLAGS, mkDocument As String, hierarchy As IVsHierarchy, itemid As UInteger, docData As IntPtr) As UInteger

Parameters

lockType
_VSRDTFLAGS

Lock values from the _VSRDTFLAGS enumeration.

mkDocument
String

The absolute path of the document.

hierarchy
IVsHierarchy

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

itemid
UInt32

The item ID of the node.

docData
IntPtr

nativeint

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

Returns

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

Remarks

This method calls RegisterAndLockDocument.

Applies to