Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fopen in DLL

Status
Not open for further replies.

baashha

Programmer
Joined
Nov 11, 2001
Messages
4
Location
MY
Hi, I have a VC++ 6.0 application that calls a DLL created using the same version of VC++. Inside the dll, there is a fopen command to read from a file which is located in a particular drive specified within the dll.

If the directory exists, then my system works fine. However, when I remove the directory from windows, I get a memory crash that says Assertion Failure, referring to the memory block 0x000005. When I debug, I get a sharing violation in NTDLL.DLL, which I don't use within my program. I do catch the error if the file is missing by checking if fopen.... == NULL. However, the directory missing error is not checked, in-fact, when I try putting some debug messages in the dll, I don't seem to get anything out.

I try the same fopen command within the calling program, without invoking the dll, and I can detect the directory missing, where I get the same message as when my file is missing. So, I suppose this is something to do with the dll. Anyone with some clues??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top