IVsTrackProjectDocumentsEvents3.OnQueryAddFilesEx Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Determines if it is okay to add a collection of files (possibly from source control) whose final destination may be different from a source location.
public:
int OnQueryAddFilesEx(Microsoft::VisualStudio::Shell::Interop::IVsProject ^ pProject, int cFiles, cli::array <System::String ^> ^ rgpszNewMkDocuments, cli::array <System::String ^> ^ rgpszSrcMkDocuments, cli::array <Microsoft::VisualStudio::Shell::Interop::VSQUERYADDFILEFLAGS> ^ rgFlags, cli::array <Microsoft::VisualStudio::Shell::Interop::VSQUERYADDFILERESULTS> ^ pSummaryResult, cli::array <Microsoft::VisualStudio::Shell::Interop::VSQUERYADDFILERESULTS> ^ rgResults);
public:
int OnQueryAddFilesEx(Microsoft::VisualStudio::Shell::Interop::IVsProject ^ pProject, int cFiles, Platform::Array <Platform::String ^> ^ rgpszNewMkDocuments, Platform::Array <Platform::String ^> ^ rgpszSrcMkDocuments, Platform::Array <Microsoft::VisualStudio::Shell::Interop::VSQUERYADDFILEFLAGS> ^ rgFlags, Platform::Array <Microsoft::VisualStudio::Shell::Interop::VSQUERYADDFILERESULTS> ^ pSummaryResult, Platform::Array <Microsoft::VisualStudio::Shell::Interop::VSQUERYADDFILERESULTS> ^ rgResults);
int OnQueryAddFilesEx(Microsoft::VisualStudio::Shell::Interop::IVsProject const & pProject, int cFiles, std::Array <std::wstring const &> const & rgpszNewMkDocuments, std::Array <std::wstring const &> const & rgpszSrcMkDocuments, std::Array <Microsoft::VisualStudio::Shell::Interop::VSQUERYADDFILEFLAGS> const & rgFlags, std::Array <Microsoft::VisualStudio::Shell::Interop::VSQUERYADDFILERESULTS> const & pSummaryResult, std::Array <Microsoft::VisualStudio::Shell::Interop::VSQUERYADDFILERESULTS> const & rgResults);
public int OnQueryAddFilesEx (Microsoft.VisualStudio.Shell.Interop.IVsProject pProject, int cFiles, string[] rgpszNewMkDocuments, string[] rgpszSrcMkDocuments, Microsoft.VisualStudio.Shell.Interop.VSQUERYADDFILEFLAGS[] rgFlags, Microsoft.VisualStudio.Shell.Interop.VSQUERYADDFILERESULTS[] pSummaryResult, Microsoft.VisualStudio.Shell.Interop.VSQUERYADDFILERESULTS[] rgResults);
abstract member OnQueryAddFilesEx : Microsoft.VisualStudio.Shell.Interop.IVsProject * int * string[] * string[] * Microsoft.VisualStudio.Shell.Interop.VSQUERYADDFILEFLAGS[] * Microsoft.VisualStudio.Shell.Interop.VSQUERYADDFILERESULTS[] * Microsoft.VisualStudio.Shell.Interop.VSQUERYADDFILERESULTS[] -> int
Public Function OnQueryAddFilesEx (pProject As IVsProject, cFiles As Integer, rgpszNewMkDocuments As String(), rgpszSrcMkDocuments As String(), rgFlags As VSQUERYADDFILEFLAGS(), pSummaryResult As VSQUERYADDFILERESULTS(), rgResults As VSQUERYADDFILERESULTS()) As Integer
Parameters
- pProject
- IVsProject
[in] Project making the request about adding files.
- cFiles
- Int32
[in] The number of files represented in the rgpszNewMkDocuments
, rgpszSrcMkDocuments
, rgFlags
, and rgResults
arrays.
- rgpszNewMkDocuments
- String[]
[in] An array of file names that indicate the files' final destination.
- rgpszSrcMkDocuments
- String[]
[in] An array of file names specifying the source location of the files.
- rgFlags
- VSQUERYADDFILEFLAGS[]
[in] An array of values, one element for each file, from the VSQUERYADDFILEFLAGS enumeration.
- pSummaryResult
- VSQUERYADDFILERESULTS[]
[out] Returns an overall status for all files as a value from the VSQUERYADDFILERESULTS enumeration.
- rgResults
- VSQUERYADDFILERESULTS[]
[out] An array that is to be filled in with the status of each file. Each status is a value from the VSQUERYADDFILERESULTS enumeration.
Returns
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From ivstrackprojectdocumentsevents80.idl
HRESULT OnQueryAddFilesEx(
[in] IVsProject *pProject,
[in] int cFiles,
[in, size_is(cFiles)] const LPCOLESTR rgpszNewMkDocuments[],
[in, size_is(cFiles)] const LPCOLESTR rgpszSrcMkDocuments[],
[in, size_is(cFiles)] const VSQUERYADDFILEFLAGS rgFlags[],
[out] VSQUERYADDFILERESULTS *pSummaryResult,
[out, size_is(cFiles)] VSQUERYADDFILERESULTS rgResults[]
);
This method is called as a result of a call to the OnQueryAddFilesEx method.
This method is similar to the OnQueryAddFiles method, except this method takes an additional array of destination file names that reflect the final location of the files.
This method is typically called by a directory-based project in which files extracted from source control are moved to a final location different from where they were originally extracted to.
This method is often implemented by source code control plug-ins.