R
richard sancenot
When calling the DrawSomething function, i get an access violation in release
mode.
This error happens when "Increase speed (/02)" is enabled
(Preferences->C/C++ -> Optimisation -> Increase speed (/O2) )
I use VS2005.
#ifdef DLL_EXPORT
#define DLL_EXPORT __declspec(dllexport)
#else
#define DLL_EXPORT __declspec(dllimport)
#endif
DLL_EXPORT short DrawSomething(CDC* DC)
{
CDC*pDC = (CDC*)DC;
//Access violation in release mode with /02!!
pDC->TextOut(0,0,_T("Hello world"));
return 1;
}
Thanks for helping
mode.
This error happens when "Increase speed (/02)" is enabled
(Preferences->C/C++ -> Optimisation -> Increase speed (/O2) )
I use VS2005.
#ifdef DLL_EXPORT
#define DLL_EXPORT __declspec(dllexport)
#else
#define DLL_EXPORT __declspec(dllimport)
#endif
DLL_EXPORT short DrawSomething(CDC* DC)
{
CDC*pDC = (CDC*)DC;
//Access violation in release mode with /02!!
pDC->TextOut(0,0,_T("Hello world"));
return 1;
}
Thanks for helping