IVsQueryEditQuerySave2.OnAfterSaveUnreloadableFile Method

Synchronizes or refreshes the file date and size after an editor saves an unreloadable file.

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


Function OnAfterSaveUnreloadableFile ( _
    pszMkDocument As String, _
    rgf As UInteger, _
) As Integer
‘사용 방법
Dim instance As IVsQueryEditQuerySave2
Dim pszMkDocument As String
Dim rgf As UInteger
Dim returnValue As Integer

returnValue = instance.OnAfterSaveUnreloadableFile(pszMkDocument, _
    rgf, pFileInfo)
int OnAfterSaveUnreloadableFile(
    string pszMkDocument,
    uint rgf,
int OnAfterSaveUnreloadableFile(
    [InAttribute] String^ pszMkDocument, 
    [InAttribute] unsigned int rgf, 
    [InAttribute] array<VSQEQS_FILE_ATTRIBUTE_DATA>^ pFileInfo
abstract OnAfterSaveUnreloadableFile : 
        pszMkDocument:string * 
        rgf:uint32 * 
        pFileInfo:VSQEQS_FILE_ATTRIBUTE_DATA[] -> int 
function OnAfterSaveUnreloadableFile(
    pszMkDocument : String, 
    rgf : uint, 
) : int


  • pszMkDocument
    Type: System.String
    [in] Path to the file on the disk.
  • rgf
    Type: System.UInt32
    [in] Flags whose values for the file attributes are taken from the tagVSQEQSFlags enumeration. The default value is zero.

Return Value

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


COM Signature

From ivsqueryeditquerysave2.idl

HRESULT OnAfterSaveUnreloadableFile(
   [in] LPCOLESTR pszMkDocument,
   [in] VSQEQSFlags rgf,
   [in] const VSQEQS_FILE_ATTRIBUTE_DATA* pFileInfo

Normally, when a file is reloadable, the SVsQueryEditQuerySave service synchronizes the Running Document Table events and notes that the file has been changed. This ensures that QuerySaveXX operations function correctly.

For a nonreloadable document, there is no Running Document Table event signaling that the file has changed (been saved). Therefore, the project or solution controlling the document must call this method so that the SVsQueryEditQuerySave service can continue to track the file.

This method is also useful when you have found a way to modify a file without going through the Running Document Table (independent of whether the file is reloadable or not). If you are getting a conflicting modification detected dialog box, and you modified a file (for example, because a modal wizard ran), then this is how to tell the environment that the modification to the file was expected.

.NET Framework Security

See Also


IVsQueryEditQuerySave2 Interface

IVsQueryEditQuerySave2 Members

Microsoft.VisualStudio.Shell.Interop Namespace