IVsToolboxDataProvider.FileDropped Method
Sends notification that a file is being dropped on the Toolbox.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function FileDropped ( _
pszFilename As String, _
pHierSource As IVsHierarchy, _
<OutAttribute> ByRef pfFileProcessed As Integer _
) As Integer
int FileDropped(
string pszFilename,
IVsHierarchy pHierSource,
out int pfFileProcessed
)
int FileDropped(
[InAttribute] String^ pszFilename,
[InAttribute] IVsHierarchy^ pHierSource,
[OutAttribute] int% pfFileProcessed
)
abstract FileDropped :
pszFilename:string *
pHierSource:IVsHierarchy *
pfFileProcessed:int byref -> int
function FileDropped(
pszFilename : String,
pHierSource : IVsHierarchy,
pfFileProcessed : int
) : int
Parameters
pszFilename
Type: System.String[in] Name of file dropped.
pHierSource
Type: Microsoft.VisualStudio.Shell.Interop.IVsHierarchy[in] Source hierarchy containing the dropped file. This value may be nulla null reference (Nothing in Visual Basic) if the file is not associated with a hierarchy.
pfFileProcessed
Type: System.Int32%[out, retval] If true, then the file was successfully processed. If false, then the file was not processed.
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 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.
.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.