共用方式為


RunningDocumentTable.RegisterAndLockDocument Method

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

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

Syntax

'宣告
Public Function RegisterAndLockDocument ( _
    lockType As _VSRDTFLAGS, _
    mkDocument As String, _
    hierarchy As IVsHierarchy, _
    itemid As UInteger, _
    docData As IntPtr _
) As UInteger
public uint RegisterAndLockDocument(
    _VSRDTFLAGS lockType,
    string mkDocument,
    IVsHierarchy hierarchy,
    uint itemid,
    IntPtr docData
)

Parameters

  • mkDocument
    Type: System.String
    The absolute path of the document.
  • 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.

Remarks

This method calls RegisterAndLockDocument.

.NET Framework Security

See Also

Reference

RunningDocumentTable Class

Microsoft.VisualStudio.Shell Namespace