Is This Content Helpful?
We're glad to know this article was helpful.
When debugging a Visual Basic DLL, one of the following problems occurs:
- The bitmap defined in the implementation of ICommand does not appear on the toolbar while in debug mode.
- Trying to QueryInterface to a valid interface fails.
- An error is returned when executing IFeatureClass::Select against SDE data.
- ArcMap hangs in debug mode.
When the application is run in debug mode, Visual Basic exchanges the CLSID of the component and ArcMap loads the VB6Debug.dll into memory instead of the component. The debugger forwards requests to the ActiveX DLL projects, allowing the user to debug interactively with Visual Basic. Since VB6Debug.dll is running in a different process space than ArcMap, a special marshalling code is required to pass objects across boundaries. This special marshalling is the cause of the debug problems.
Note: Steps 1-3 apply to the Visual Basic project; the remaining steps apply to Visual C++.
Warning: You must have Visual C++ installed in order to continue.
Note: When you step through the code and the debugger reaches a line that has a problem, it will not let you step over to the next line.