I tried this example. After some modification, it works. Following is what I did step by step:
1. Create a console project in VC6.0
2. Copy code to files
ComInterfaces.h
ComInterfaces.cpp
MapPointApp.cpp
3. Build -- lots of errors
So I add
Code:
using namespace MapPoint;
4. Build again -- 1 error
I erase ", geoCountryDefault" from the FindAddressResults parameter list
Build -- No error
5. Run -- 0x00000005 Access Violation
I add 5 release() calls at the end of the code, something like
Code:
...
myMapPtr->Saved = true;
pinAddressPtr.Release();
locAddressPtr.Release();
resultsPtr.Release();
myMapPtr.Release();
g_pMapPoint->Quit();
g_pMapPoint.Release();
CoUninitialize();
}
6. Run -- OK