Click here to Skip to main content
15,888,270 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Best Way to Respond to IE dialog boxes? Pin
David Crow12-May-03 8:05
David Crow12-May-03 8:05 
GeneralRe: Best Way to Respond to IE dialog boxes? Pin
RickGavin12-May-03 9:19
RickGavin12-May-03 9:19 
GeneralDLL loading in debug and release mode Pin
Dominik Reichl12-May-03 7:22
Dominik Reichl12-May-03 7:22 
GeneralRe: DLL loading in debug and release mode Pin
valikac12-May-03 9:09
valikac12-May-03 9:09 
GeneralRe: DLL loading in debug and release mode Pin
Neville Franks12-May-03 13:04
Neville Franks12-May-03 13:04 
GeneralRe: DLL loading in debug and release mode Pin
Dominik Reichl13-May-03 0:23
Dominik Reichl13-May-03 0:23 
GeneralRe: DLL loading in debug and release mode Pin
Neville Franks13-May-03 1:32
Neville Franks13-May-03 1:32 
GeneralRe: DLL loading in debug and release mode Pin
Dominik Reichl13-May-03 1:57
Dominik Reichl13-May-03 1:57 
Neville Franks wrote:
Your solution doesn't sound right to me and I think you still have a problem.

At least I cannot see any problems in debug and release version any more. Also, I don't have memory leaks.
A working, dirty solution is better than a clean, not-working solution Big Grin | :-D .

Neville Franks wrote:
I've never seen VC++ code or Windows unload a DLL for no good reason.

Me too. I've also never seen this behavior before.
Here is what exactly happenED (not any more): I load the DLL (works, I get a valid, non-NULL handle), then I get 3 functions of it (works, all function pointers are non-NULL). I have to call the first function one time, the second function about 200 times, and the last function one time. The first function worked very well. The problem now was, that when I call the second function, I can call this only once. When I attempt to make a second call to the second function, the pointer points to the last function. But I didn't change the pointer! The compiler must have done this. So instead of calling the second function again, it calls the third. After the third call, the DLL automatically unloads. What now happens is clear: the next call to the DLL function will crash the app.

I know this sounds stupid and more like a simple programming error. But I am sure there is no error by my side. I also have never seen this behaviour before. It cannot be a programming error, because now, after I disabled the optimizations, it works very fine.

This is not my first project dealing with libraries, I've build at least 5 projects which use DLLs before!

Neville Franks wrote:
Are you using LoadLibrary() to load the DLL or normal linking.

LoadLibrary, yes. The library is built with Dev-C++/GCC, the main project with MSVC++ (please don't ask why we make the DLL with Dev-C++/GCC...Big Grin | :-D ).

-Dominik



_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? Wink | ;)

GeneralRe: DLL loading in debug and release mode Pin
Neville Franks13-May-03 2:04
Neville Franks13-May-03 2:04 
GeneralRe: DLL loading in debug and release mode Pin
Dominik Reichl13-May-03 2:09
Dominik Reichl13-May-03 2:09 
GeneralRe: DLL loading in debug and release mode Pin
Neville Franks13-May-03 2:13
Neville Franks13-May-03 2:13 
GeneralNamespace and Temmplate function Pin
Shah Shehpori12-May-03 5:57
sussShah Shehpori12-May-03 5:57 
GeneralRe: Namespace and Temmplate function Pin
Brigsoft12-May-03 21:23
Brigsoft12-May-03 21:23 
QuestionHELP! Anyone know MFC here? Pin
Bigsteiny12-May-03 5:55
Bigsteiny12-May-03 5:55 
AnswerRe: HELP! Anyone know MFC here? Pin
Nitron12-May-03 6:03
Nitron12-May-03 6:03 
GeneralRe: HELP! Anyone know MFC here? Pin
Bigsteiny12-May-03 6:09
Bigsteiny12-May-03 6:09 
GeneralRe: HELP! Anyone know MFC here? Pin
David Crow12-May-03 6:54
David Crow12-May-03 6:54 
GeneralRe: HELP! Anyone know MFC here? Pin
Bigsteiny12-May-03 16:20
Bigsteiny12-May-03 16:20 
GeneralRe: HELP! Anyone know MFC here? Pin
David Crow13-May-03 2:12
David Crow13-May-03 2:12 
AnswerRe: HELP! Anyone know MFC here? Pin
Toni7812-May-03 7:21
Toni7812-May-03 7:21 
GeneralRe: HELP! Anyone know MFC here? Pin
Bigsteiny12-May-03 16:18
Bigsteiny12-May-03 16:18 
AnswerRe: HELP! Anyone know MFC here? Pin
Roger Allen13-May-03 1:04
Roger Allen13-May-03 1:04 
Generalsigh. still not working. Pin
Bigsteiny13-May-03 16:48
Bigsteiny13-May-03 16:48 
GeneralRe: sigh. still not working. Pin
MAAK13-May-03 22:02
MAAK13-May-03 22:02 
GeneralRe: sigh. still not working. Pin
MAAK13-May-03 22:07
MAAK13-May-03 22:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.