Using _ATL_DEBUG_INTERFACES
did not yield any additional output...
I defined it on the first line of stdafx.
h, directly after #pragma once
so I guess this is early enough.
Maybe the reason is how I am using the ActiveX control:
I'm not calling AddRef()
or Release()
by myself.
The MapObjects Installer comes with sample code with lots of wrapper classes which must have been generated by VC6 or something earlier.
I tried to generate wrapper classes myself with VC9 but there occured errors which I wasn't able to fix.
I use the control by letting one of my windows have a member of type CMap1
(derived from CWnd
), which is one of those generated wrapper classes. In CMyWnd::OnCreate()
I also call CMap1::Create()
and that's it, I'm finished: I can add a layer and the control displays a world map.
I have pretty much no idea what the reference-count stuff is about as I have not added or released any references. At least not knowingly...
The control is pretty old: The .OCX file has the year 2000 in its version information.
It's also not officially supported anymore but I don't have any substitue.