18.04.2015 Views

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

BUILDING A COMMAND-LINE C++ APPLICATION<br />

Any additional extension functionality must use<br />

an extension license that matches the core<br />

license being used at that time. If the application<br />

initially accesses an <strong>ArcGIS</strong> <strong>Engine</strong> Runtime<br />

license, it must use the 3D or Spatial extensions<br />

for <strong>ArcGIS</strong> <strong>Engine</strong> if required. If the application<br />

initially accesses an <strong>ArcGIS</strong> Desktop license<br />

(ArcView, ArcEditor, or ArcInfo), it must use<br />

<strong>ArcGIS</strong> 3D Analyst or <strong>ArcGIS</strong> Spatial Analyst<br />

extension licenses if required.<br />

This is a placeholder comment to indicate where<br />

additional code will be placed later in the<br />

exercise.<br />

license being used, <strong>Engine</strong> or Desktop, either the Spatial extension for <strong>ArcGIS</strong><br />

<strong>Engine</strong> Runtime or an <strong>ArcGIS</strong> Spatial Analyst extension must also be available.<br />

Your application must confirm the availability of, then check out, the necessary<br />

licenses as required.<br />

4. In RasterSlope.cpp’s main(), initialize <strong>ArcGIS</strong> <strong>Engine</strong> and set up the licensing<br />

for the product. Next, shut down and uninitialize <strong>ArcGIS</strong> <strong>Engine</strong>. These lines<br />

of code can be placed after the command-line arguments have been processed;<br />

that part of the application does not need access to <strong>ArcGIS</strong> <strong>Engine</strong> and, if the<br />

arguments are invalid, there is no reason to start <strong>ArcGIS</strong> <strong>Engine</strong>.<br />

if (FAILED(hr) || sourceFileName.Length()

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!