Assembly: Microsoft.VisualStudio.Shell.Interop (in microsoft.visualstudio.shell.interop.dll)
[in] Flags whose values are taken from theenumeration.
Return ValueIf the method succeeds, it returns . If it fails, it returns an error code.
Implement this method if you install items or tools, in the Toolbox. At setup, the environment loads your VSPackage, and calls its IVsPackage::ResetDefaults implementation. Once your VSPackage has successfully configured itself, the ResetDefaults method will not be called during subsequent setups, unless you later increment the Default Items key in the registry (found in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\Packages\<Package GUID>\Toolbox]), or the user resets the Toolbox. If you increment the Default Items registry key, the ResetDefaults method is called with grfFlags set to and if the Toolbox is reset, the ResetDefaults method is called with grfFlags set to . For more information, see Registering Toolbox Item Providers.
The user can reset the Toolbox by selecting Toolbox from the View menu by right clicking in the Components section of the Toolbox, and selecting Add/Remove Items. This shows the Customize Toolbox dialog box, which includes the Reset button. Clicking the Reset button resets the Toolbox.
If you want the IVsPackage.ResetDefaults method to be called during setup only, you do not need to implement grfFlags parameter, call at that time to populate the Browse With dialog box with a specific browser. For example, you can use this approach to provide a special emulator for your product.interface or specify a Formats registry key (found in [<VS Reg Root>\Packages\<Package GUID>\Toolbox]). For more information, see How to: Include Toolbox Support and IVsToolboxDataProvider Interface. When your IVsPackage::ResetDefaults implementation is called with a value of in the