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)
Syntax
'Déclaration
Function OnAfterSaveUnreloadableFile ( _
pszMkDocument As String, _
rgf As UInteger, _
pFileInfo As VSQEQS_FILE_ATTRIBUTE_DATA() _
) As Integer
'Utilisation
Dim instance As IVsQueryEditQuerySave2
Dim pszMkDocument As String
Dim rgf As UInteger
Dim pFileInfo As VSQEQS_FILE_ATTRIBUTE_DATA()
Dim returnValue As Integer
returnValue = instance.OnAfterSaveUnreloadableFile(pszMkDocument, _
rgf, pFileInfo)
int OnAfterSaveUnreloadableFile(
string pszMkDocument,
uint rgf,
VSQEQS_FILE_ATTRIBUTE_DATA[] pFileInfo
)
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,
pFileInfo : VSQEQS_FILE_ATTRIBUTE_DATA[]
) : int
Parameters
- 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.
- pFileInfo
Type: array<Microsoft.VisualStudio.Shell.Interop.VSQEQS_FILE_ATTRIBUTE_DATA[]
[in] Values taken from the VSQEQS_FILE_ATTRIBUTE_DATA structure. Can be nulla null reference (Nothing in Visual Basic). This parameter is ignored if rgf is zero.
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 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
IVsQueryEditQuerySave2 Interface