Freigeben über


IVsRunningDocumentTable.ModifyDocumentFlags Method

Modifies the RDT document flags for a registered document.

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

Syntax

'Declaration
Function ModifyDocumentFlags ( _
    docCookie As UInteger, _
    grfFlags As UInteger, _
    fSet As Integer _
) As Integer
'Usage
Dim instance As IVsRunningDocumentTable
Dim docCookie As UInteger
Dim grfFlags As UInteger
Dim fSet As Integer
Dim returnValue As Integer

returnValue = instance.ModifyDocumentFlags(docCookie, _
    grfFlags, fSet)
int ModifyDocumentFlags(
    uint docCookie,
    uint grfFlags,
    int fSet
)
int ModifyDocumentFlags(
    unsigned int docCookie, 
    unsigned int grfFlags, 
    int fSet
)
abstract ModifyDocumentFlags : 
        docCookie:uint32 * 
        grfFlags:uint32 * 
        fSet:int -> int 
function ModifyDocumentFlags(
    docCookie : uint, 
    grfFlags : uint, 
    fSet : int
) : int

Parameters

  • docCookie
    Type: System.UInt32
    [in] Unique value representing the document.
  • fSet
    Type: System.Int32
    [in]. Flag indicating that the document flag has been set.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsRunningDocumentTable::ModifyDocumentFlags(
   VSCOOKIE   docCookie,
   VSRDTFLAGS grfFlags,
   BOOL       fSet
);

This method is used to modify the RDT document flags for a registered document. Currently the only valid flags to modify are:

Flags

Modification Allowed

RDT_DontSaveAs

Set only (fSet must be true)

RDT_DontSave

Set only

RDT_CantSave

Set only

RDT_DontAddToMRU

Set only

The docCookie parameter is the same value that is returned from the FindAndLockDocument or RegisterAndLockDocument methods.

.NET Framework Security

See Also

Reference

IVsRunningDocumentTable Interface

IVsRunningDocumentTable Members

Microsoft.VisualStudio.Shell.Interop Namespace