This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IC > ICommandPoolEdit Interface > ICommandPoolEdit.Remove Method (ArcObjects .NET 10.5 SDK) |
Decrements the usage count of the command. If this reaches zero the command is removed from the command pool.
[Visual Basic .NET] Public Sub Remove ( _ ByVal Command As ICommand _ )
[C#] public void Remove ( ICommand Command );
[C++]
HRESULT Remove(
ICommand* Command
);
[C++]
Parameters Command [in]
Command is a parameter of type ICommand
Decrements the supplied command UsageCount by 1. If the UsageCount reaches 0 the command is released from the CommandPool and the ICommandPool::Exists property will return false. If the UsageCount is 1 or more the command will remain in the CommandPool. The number of calls to the AddUID and AddCommand methods for a given UID must typically match the number of calls to Remove.
1036 800a040c: The supplied command does not exist in command pool
Typically the ToolbarControl will manage the commands in the CommandPool as part of IToolbarControl::AddItem and IToolbarControl::Remove methods.