Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Borland C++ 4.5 - can't use fopen() in XP?

11 views
Skip to first unread message

Nick Alexander

unread,
Jun 30, 2010, 8:46:33 PM6/30/10
to
I have the task of recompiling an old Delphi4/BorlandC++ 4.5
application to work under XP. The C++ part is a DLL called from
Delphi. The problem is it uses writing to files heavily and any call
to fopen in the DLL causes an Access Violation. The code seems
pretty standard:

static FILE *fpp_InpData ;

if( (fpp_InpData = fopen("\\TestDir\\Test_Dat.Ini", "w" ) ) == NULL)
{
PrgmErr( "Cannot open output file Test_Dat.Ini.");
}

If I comment these lines out, everything else works.

The folder exists, the file exists, and it's not caused by a problem
in the PrgmErr method; if I comment this out I still get the error.

Does anyone have any ideas?

0 new messages