다음을 통해 공유


IVsQueryEditQuerySave2.IsReloadable(String, Int32) Method

Definition

Returns the SVsQueryEditQuerySave service's understanding of whether this file is reloadable

public:
 int IsReloadable(System::String ^ pszMkDocument, [Runtime::InteropServices::Out] int % pbResult);
int IsReloadable(std::wstring const & pszMkDocument, [Runtime::InteropServices::Out] int & pbResult);
public int IsReloadable (string pszMkDocument, out int pbResult);
abstract member IsReloadable : string * int -> int
Public Function IsReloadable (pszMkDocument As String, ByRef pbResult As Integer) As Integer

Parameters

pszMkDocument
String

[in] Path to the file on the disk.

pbResult
Int32

[out] If nonzero (true), the file is reloadable. If zero (false), the file is not reloadable.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.The parameter pbResult will be:Nonzero (true) if either the DeclareReloadableFile(String, UInt32, VSQEQS_FILE_ATTRIBUTE_DATA[]) method or nothing has been called on this file.Zero (false) if the DeclareUnreloadableFile(String, UInt32, VSQEQS_FILE_ATTRIBUTE_DATA[]) method has been called on this file.

Remarks

Whether or not the file is reloadable is determined either by using IsDocDataReloadable, if the interface is supported, or by using any calls that have previously been made to DeclareReloadableFile or DeclareUnreloadableFile.

COM Signature

From ivsqueryeditquerysave2.idl

HRESULT IsReloadable(  
   [in] LPCOLESTR pszMkDocument,  
   [out, retval] BOOL *pbResult  
);  

The method returns the SVsQueryEditQuerySave service's understanding of whether or not the file is reloadable. This is determined by using IsDocDataReloadable, if the interface is supported by the project, or by using any calls that have previously been made to DeclareReloadableFile method or DeclareUnreloadableFile method.

If no other information is available, then items that are passed to QueryEditFiles, QuerySaveFile, QuerySaveFiles, or OnAfterAttributeChange (RDTA_DocDataIsDirty) are considered to be reloadable only if declared so. An item is also reloadable if the doc object supports IVsPersistDocData or if the parent hierarchy supports IVsPersistHierarchyItem2. It is possible for files to transition from being reloadable to unreloadable during the lifetime of an editor.

Note

By default, a file is assumed to be not reloadable in the absence of IVsPersistDocData or IVsPersistHierarchyItem2.

Applies to