I have a handful of MFC applications that connect to a database using ODBC (Informix, at the moment). The system I'm working on has it's own simple security system, the usernames and passwords are stored in the database and checked when the user logs in. Because I'm developing several small applications, I put the Login function into a DLL, which will show a dialog box asking for the username and password if required.
Now here's the funny thing: when I run the application in Debug mode, and the DLL has been built in debug mode, everything works fine; also if both the app and the DLL have been built in release mode it all works fine. However, if the DLL has been build in release mode, and the app is run in debug, I get a "user breakpoint called from 0x..." error.
Similarly, if the DLL has been build in debug and I run a release build of the app, I get an assertion failure in "dbgheap.c" at the expression _CrtlsValidHeapPointer(pUserData) and it won't let me go any further.
I don't have a great deal of experience in writing DLLs so it's possible that I've just done something really daft, but I think it's strange that it works if both the app and the DLL have been built in the same mode. Maybe I'm not initialising something properly but the error information isn't very helpful.
If anyone has seen this kind of thing before, or can tell me where I should start looking I'd be very grateful.
thanks in advance
CMR
Now here's the funny thing: when I run the application in Debug mode, and the DLL has been built in debug mode, everything works fine; also if both the app and the DLL have been built in release mode it all works fine. However, if the DLL has been build in release mode, and the app is run in debug, I get a "user breakpoint called from 0x..." error.
Similarly, if the DLL has been build in debug and I run a release build of the app, I get an assertion failure in "dbgheap.c" at the expression _CrtlsValidHeapPointer(pUserData) and it won't let me go any further.
I don't have a great deal of experience in writing DLLs so it's possible that I've just done something really daft, but I think it's strange that it works if both the app and the DLL have been built in the same mode. Maybe I'm not initialising something properly but the error information isn't very helpful.
If anyone has seen this kind of thing before, or can tell me where I should start looking I'd be very grateful.
thanks in advance
CMR