IVsToolboxDataProvider.FileDropped(String, IVsHierarchy, Int32) Method

Definition

Sends notification that a file is being dropped on the Toolbox.

public:
 int FileDropped(System::String ^ pszFilename, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHierSource, [Runtime::InteropServices::Out] int % pfFileProcessed);
int FileDropped(std::wstring const & pszFilename, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy const & pHierSource, [Runtime::InteropServices::Out] int & pfFileProcessed);
public int FileDropped (string pszFilename, Microsoft.VisualStudio.Shell.Interop.IVsHierarchy pHierSource, out int pfFileProcessed);
abstract member FileDropped : string * Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * int -> int
Public Function FileDropped (pszFilename As String, pHierSource As IVsHierarchy, ByRef pfFileProcessed As Integer) As Integer

Parameters

pszFilename
String

[in] Name of file dropped.

pHierSource
IVsHierarchy

[in] Source hierarchy containing the dropped file. This value may be null if the file is not associated with a hierarchy.

pfFileProcessed
Int32

[out, retval] If true, then the file was successfully processed. If false, then the file was not processed.

Returns

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsToolboxDataProvider::FileDropped(  
   [in]LPCOLESTR pszFileName,  
   [in]IVsHierarchy *pHierSource,  
   [out,retval]BOOL *pfFileProcessed  
);  

When your data provider receives notification of a file being dropped on the Toolbox, you can then process the file and add items to the Toolbox. If you successfully process the file, then return a value of true for the pfFileProcessed parameter, or false if you do not process the file.

Applies to