At ArcGIS 10 you can bind your standalone application to an Engine or Desktop runtime and license your application by making a single call to BindLicense.
Here are the 2 steps:
Reference the ESRI.ArcGIS.Version assembly
Call ESRI.ArcGIS.RuntimeManager.BindLicense(ProductCode.EngineOrDesktop) before calling any ArcObjects code or creating any of the ArcGIS Engine Controls. So a good place for this would be in the main entry point of the application
static void Main()
MessageBox.Show(“Unable to bind to ArcGIS runtime. Application will be shut down.”);
Firstly, this BindLicense method will try to Bind to an Engine Runtime, but if unavailable it will try to bind to a Desktop Runtime. Secondly, it will license the application with the lowest license level available (in the order of ArcGIS Engine, ArcView, ArcEditor, ArcInfo).
For more advanced binding and licensing options please refer to:
Content provided by Gayle Young