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.

THE V ISUAL BASIC 6 DEVELOPMENT ENVIRONMENT<br />

2. Start Microsoft Visual C++.<br />

3. Attach to the ArcMap process using the Menu options Build > Start Debug ><br />

Attach to process.<br />

4. Load the appropriate Visual Basic Source file into the Visual C++ debugger<br />

and set the break point.<br />

5. Call the method within ArcMap.<br />

No changes can be made to the source code within the debugger, and variables<br />

cannot be inspected, but code execution can be viewed and altered. This is often<br />

sufficient to determine what is wrong, especially with logic-related problems.<br />

ATL wrapper classes<br />

Using the ATL, you can create a class that implements the same interfaces as the<br />

Visual Basic class. When you create the ATL object, you create the Visual Basic<br />

object. All method calls are then passed to the Visual Basic object for execution.<br />

You debug the contained object by setting a break point in the appropriate C++<br />

wrapper method, and when the code reaches the break point, the debugger<br />

proceeds through the Visual Basic code. For more information on this technique,<br />

look at the ATL debugger sample in the <strong>Developer</strong> Samples of the <strong>ArcGIS</strong><br />

<strong>Developer</strong> Help system.<br />

98 • <strong>ArcGIS</strong> <strong>Engine</strong> <strong>Developer</strong> <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!