RunningDocumentTable.RegisterAndLockDocument Method

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

This API is not CLS-compliant. 

Namespace:  Microsoft.VisualStudio.Shell
Assemblies:   Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)
  Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)

Syntax

‘선언
<CLSCompliantAttribute(False)> _
Public Function RegisterAndLockDocument ( _
    lockType As _VSRDTFLAGS, _
    mkDocument As String, _
    hierarchy As IVsHierarchy, _
    itemid As UInteger, _
    docData As IntPtr _
) As UInteger
‘사용 방법
Dim instance As RunningDocumentTable
Dim lockType As _VSRDTFLAGS
Dim mkDocument As String
Dim hierarchy As IVsHierarchy
Dim itemid As UInteger
Dim docData As IntPtr
Dim returnValue As UInteger

returnValue = instance.RegisterAndLockDocument(lockType, _
    mkDocument, hierarchy, itemid, docData)
[CLSCompliantAttribute(false)]
public uint RegisterAndLockDocument(
    _VSRDTFLAGS lockType,
    string mkDocument,
    IVsHierarchy hierarchy,
    uint itemid,
    IntPtr docData
)
[CLSCompliantAttribute(false)]
public:
unsigned int RegisterAndLockDocument(
    _VSRDTFLAGS lockType, 
    String^ mkDocument, 
    IVsHierarchy^ hierarchy, 
    unsigned int itemid, 
    IntPtr docData
)
[<CLSCompliantAttribute(false)>]
member RegisterAndLockDocument : 
        lockType:_VSRDTFLAGS * 
        mkDocument:string * 
        hierarchy:IVsHierarchy * 
        itemid:uint32 * 
        docData:IntPtr -> uint32 
public function RegisterAndLockDocument(
    lockType : _VSRDTFLAGS, 
    mkDocument : String, 
    hierarchy : IVsHierarchy, 
    itemid : uint, 
    docData : IntPtr
) : uint

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

RunningDocumentTable Members

Microsoft.VisualStudio.Shell Namespace