Posted 16 September 2017, 8:35 am EST
Hi,
We are considering upgrading an existing ATL-based application that uses the VSPrinter ActiveX control (8.0.20082.148) to 64 bit. I’ve downloaded an evaluation version of the 64 bit control (v8.0.20132.171) for testing and it seems to work correctly in a 64 bit application on Windows 7.
However, when I run the same application on Windows 8.1 (or Windows 10) it crashes with an access violation initializing the control. The crash occurs calling IPersistStreamInit::Load. The call stack from the crash is:
msvcrt.dll!memcpy() Unknown combase.dll!CMemStm::Read(void * pb, unsigned long cb, unsigned long * pcbRead) Line 406 C++ VSPrint8.ocx!00007ffb0dfad811() Unknown VSPrint8.ocx!00007ffb0dfa2a6c() Unknown
CCFTReport.dll!ATL::CAxHostWindow::ActivateAx(IUnknown * pUnkControl, bool bInited, IStream * pStream) Line 2158 C++
CCFTReport.dll!ATL::CAxHostWindow::CreateControlLicEx(const wchar_t * lpszTricsData, HWND__ * hWnd, IStream * pStream, IUnknown * * ppUnk, const _GUID & iidAdvise, IUnknown * punkSink, wchar_t * bstrLic) Line 960 C++
CCFTReport.dll!ATL::CAxWindow2TATL::CWindow::CreateControlLicEx(const wchar_t * lpszName, IStream * pStream, IUnknown * * ppUnkContainer, IUnknown * * ppUnkControl, const _GUID & iidSink, IUnknown * punkSink, wchar_t * bstrLicKey) Line 2572 C++
CCFTReport.dll!ATL::CAxWindow2TATL::CWindow::CreateControlLic(const wchar_t * lpszName, IStream * pStream, IUnknown * * ppUnkContainer, wchar_t * bstrLicKey) Line 2537 C++
The same binary does not crash on a Windows 7 machine and a 32 bit version of the same application works on the Windows 8.1 machine. Do you have any ideas as to what might be causing the crash?
Thanks,
Mark