Bind to a particular ArcGIS product. This is a new requirement for all stand-alone ArcGIS Engine applications beginning at 10.0.

Namespace:  ESRI.ArcGIS

Assembly:  ESRI.ArcGIS.Version (in ESRI.ArcGIS.Version.dll) Version: 10.0.0.0 (10.0.0.0)

Syntax

C#
public static bool Bind(
	ProductCode code
)
Visual Basic (Declaration)
Public Shared Function Bind ( _
	code As ProductCode _
) As Boolean
Visual C++
public:
static bool Bind(
	ProductCode code
)

Parameters

code
Type: ESRI.ArcGIS..::.ProductCode

The ArcGIS product code; e.g., ProductCode.Engine, ProductCode.Desktop.

Return Value

Remarks

Once a custom Engine application is bound to a particular ArcGIS product, the binding cannot be revoked or changed while the application is still running.

Examples

The code below shows how to bind to a particular ArcGIS installation.
CopyC#
if (!RuntimeManager.Bind(ProductCode.Engine))
{
  if (!RuntimeManager.Bind(ProductCode.Desktop))
  {
    MessageBox.Show("Unable to bind to ArcGIS runtime. Application will be shut down.");
    return;
  }
}
CopyVB.NET
If Not ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Engine) Then
  If Not ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop) Then
    MessageBox.Show("Unable to bind to ArcGIS runtime. Application will be shut down.")
    e.Cancel = True 'Abort application start up
  End If
    End If

See Also