This document is archived and information here might be outdated.  Recommended version.

IHookHelper.Hook Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IH > IHookHelper Interface > IHookHelper.Hook Property
ArcGIS Developer Help

IHookHelper.Hook Property

Hook object that should be the same as the hook object passed in ICommand::OnCreate.

[Visual Basic .NET]
Public Property Hook As Object
public object Hook {get; set;}
HRESULT get_Hook(
  IDispatch* ppHook
HRESULT putref_Hook(
  System.Object* ppHook
ppHook [in]

ppHook is a parameter of type IDispatch ppHook [out, retval]
ppHook is a parameter of type IDispatch*

Product Availability

Available with ArcGIS Engine.


The hook that is passed to the ICommand::OnCreate event. The hook is a MapControl, PageLayoutControl, ToolbarControl or ArcMap.

Errors Returned

1051 800a041b: The supplied hook is not valid - a menu hook must support IToolbarControl or IToolbarBuddy

See Also

IHookHelper Interface

.NET Samples

Dynamic biking Dynamic biking Tabbed feature inspector Create a geoprocessing tool to buffer a layer and retrieve messages Add a custom bookmarks MultiItem to the ToolbarControl