When the code is run in debug, there is an access violation error in the doexit() function is called for the dll.
The "if (false)" block is optimised out in relase but taking out the "if" clause will cause it to reappear
CMyHeader.h contains the function calls available in CMyHeader.dll
StackTrace
This didnt happen when the dll was compiled and linked with VC4.2 but has happened since it was upgraded to VC6.
It maybe that there a setting I have missed in VC6 that will correct this.
Can anyone give me any pointers?
Thanks in advance
"If it could have gone wrong earlier and it didn't, it ultimately would have been beneficial for it to have." : Murphy's Ultimate Corollary
The "if (false)" block is optimised out in relase but taking out the "if" clause will cause it to reappear
Code:
#include "stdafx.h"
#include <CMyHeader.H>
int main(int argc, char* argv[])
{
HSAMPLE hTest;
if (false)
{
MyRoutine(&hTest;, "testSystem");
}
return 0;
}
StackTrace
Code:
1e000041()
10000041()
$E40() + 13 bytes
doexit(int 0, int 0, int 1) line 353
_cexit() line 294 + 11 bytes
_CRT_INIT(void * 0x10000000, unsigned long 0, void * 0x00000001) line 157
_DllMainCRTStartup(void * 0x10000000, unsigned long 0, void * 0x00000001) line 252 + 17 bytes
NTDLL! 77f830e7()
NTDLL! 77f8ee02()
KERNEL32! 7c580ed2()
doexit(int 0, int 0, int 0) line 392
exit(int 0) line 279 + 13 bytes
mainCRTStartup() line 212
KERNEL32! 7c581af6()
This didnt happen when the dll was compiled and linked with VC4.2 but has happened since it was upgraded to VC6.
It maybe that there a setting I have missed in VC6 that will correct this.
Can anyone give me any pointers?
Thanks in advance
"If it could have gone wrong earlier and it didn't, it ultimately would have been beneficial for it to have." : Murphy's Ultimate Corollary