CRXIR2 does not work with VS2010 on Windows 7 and Vista

We are upgrading from VS2005 to VS2010. We are almost there, but there is a problem with Crystal Reports. We use the RDC component (COM) in our C ++ application.

In Windows 7 or on VISTA, I cannot get the viewer or designer controls to work. I get access violations when activating a control:

// from atlhost.h (line 2208) hr = m_spOleObject->DoVerb(OLEIVERB_INPLACEACTIVATE, NULL, spClientSite, 0, m_hWnd, &m_rcPos); 

The strange thing is that when I run the same exe on an XP machine, it works.

We mainly use the "AtlAxWin100" window class to host the Crystal Report control ("CrystalReports11.ActiveXReportViewer.1"). I am using the SP6 version of Crystal reports to the latest version.

Also, when I compile the same code with VS2005 and run it on Windows7 or Vista, everything works fine.

Does anyone have any ideas on what might cause the problem, or ideas for further research?

+7
c ++ visual-studio-2010 uac crystal-reports
source share
2 answers

this seems to have something to do with DEP.

If we completely disable DEP in the system with

 bcdedit /set Nx AlwaysOff 

and then restart, of course, the viewer is working!

Unfortunately, this global system is disabled. Earlier we tried to disable DEP for our exe, but then we received a message from Windows that we were not allowed to disable DEP for our exe ...

+3
source share

All Articles