次の方法で共有


IVsQueryEditQuerySave2.OnAfterSaveUnreloadableFile Method

Definition

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

public:
 int OnAfterSaveUnreloadableFile(System::String ^ pszMkDocument, System::UInt32 rgf, cli::array <Microsoft::VisualStudio::Shell::Interop::VSQEQS_FILE_ATTRIBUTE_DATA> ^ pFileInfo);
int OnAfterSaveUnreloadableFile(std::wstring const & pszMkDocument, unsigned int rgf, std::Array <Microsoft::VisualStudio::Shell::Interop::VSQEQS_FILE_ATTRIBUTE_DATA> const & pFileInfo);
public int OnAfterSaveUnreloadableFile (string pszMkDocument, uint rgf, Microsoft.VisualStudio.Shell.Interop.VSQEQS_FILE_ATTRIBUTE_DATA[] pFileInfo);
abstract member OnAfterSaveUnreloadableFile : string * uint32 * Microsoft.VisualStudio.Shell.Interop.VSQEQS_FILE_ATTRIBUTE_DATA[] -> int
Public Function OnAfterSaveUnreloadableFile (pszMkDocument As String, rgf As UInteger, pFileInfo As VSQEQS_FILE_ATTRIBUTE_DATA()) As Integer

Parameters

pszMkDocument
String

[in] Path to the file on the disk.

rgf
UInt32

[in] Flags whose values for the file attributes are taken from the tagVSQEQSFlags enumeration. The default value is zero.

pFileInfo
VSQEQS_FILE_ATTRIBUTE_DATA[]

[in] Values taken from the VSQEQS_FILE_ATTRIBUTE_DATA structure. Can be null. This parameter is ignored if rgf is zero.

Returns

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

Remarks

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.

Applies to