Well, as I said, it should compile perfectly fine with no errors at all (as mine does). That is not the problem. The problem is that while the program is running, any time I use a function imported from a DLL that has anything to do with disk IO, I get a runtime error. The error says that the actual .exe caused the error. That is a really big bullshit error that I'm getting, and I can't really do much about that. However, upon commenting out any lines that call Debugger::Error() or Debugger:Add(), at all runs just peachy. Are DLL's not allowed to access files?
I compile the =EXACT= same code that I posted here, and I get NO warnings at all. I get similar runtime errors on Win98, WinME, and WinXP.
As for multithreaded/single-threaded DLL, my app is entirely single-threaded. Maybe it has something to do with how it is compiled. When first creating the project (the DLL and the Console 32-bit App) I choose the options to have NO code added whatsoever (just a Win32 Dynamic-Link Library and a Win32 Console Application -- both with "An Empty Project" selected).
The Error I Get: ================= TEST caused an invalid page fault in module KERNEL32.DLL at 017f:bff87ede. Registers: EAX=c00301a8 CS=017f EIP=bff87ede EFLGS=00010216 EBX=0065fdec SS=0187 ESP=0055fffc EBP=00560068 ECX=00560220 DS=0187 ESI=8177d16c FS=45ef EDX=bff76855 ES=0187 EDI=00560248 GS=0000 Bytes at CS:EIP: 53 56 57 8b 30 83 7d 10 01 8b 4e 38 89 4d f8 75 Stack dump:
What MSVC++ Debug Tells Me: =========================== Preloaded symbols may not match 'test\debug\test.exe'. Loaded 'C:\WINDOWS\SYSTEM\KERNEL32.DLL', no matching symbolic information found. Loaded 'test\debug\thedll.dll', no matching symbolic information found. First-chance exception in test.exe (KERNEL32.DLL): 0xC0000005: Access Violation. First-chance exception in test.exe: 0xC0000005: Access Violation. First-chance exception in test.exe (KERNEL32.DLL): 0xC00000FD: Stack Overflow. First-chance exception in test.exe: 0xC0000005: Access Violation. The thread 0xFFF5C747 has exited with code -1 (0xFFFFFFFF). The program 'test.exe' has exited with code -1 (0xFFFFFFFF).
Note: The Access Violation error at 0xC0000005 was repeated several hundred times [\b]. I cut it out down to once before and after the Stack Overflow error.
[edited by - zackriggle on May 8, 2003 2:31:53 PM]
zackriggle what''s with the obstinacy? The solution to your problem was given. I explained the problem and solution roughly, and Xai gave the specific way of fixing it in MSVC. What more do you want? You are right that it isn''t a compile time error per se, but it does require you to make changes before compiling to fix it.