
GetDiskFreeSpaceExA called with pointer causes invalid page fault in MFC dll
Hello Chuck;
No, I'm not on Win98, I'm running Visual C++ Version 5.0 on Win95 OSR2;
Hello David;
No error in the typedef of GET,
here it is:
typedef BOOL (GET)
(LPCTSTR,PULARGE_INTEGER,PULARGE_INTEGER,PULARGE_INTEGER);
then I have
GET* pGet;
Anyway, the data returned by *pGet is correct when it doesn't crash. It
"only" crashes in MFC release mode.
When it does, I opt to invoke debug without the source code capability in
release mode. Visual Studio informs me of Unhandled Exception in the module
that has this code. After that, I decided to try and catch the b...in the
most basic way :
try
{
retValueGET=(*pGet)(NULL,&FreeBytes,&TotalBytes,&TotalFreeBytes);
}
catch(...)
{
AfxMessageBox("GET didn't work!");
}
Incredibly now there is nothing to catch! The code "works", but as you might
imagine, we're not amused!
I can't imagine this to be reliable for release, nor do I think I'm doing
anything wrong. Others must have bumped into this, so probably there'll be
more responses. Microsoft is as yet mum on the subject. At least, I cannot
find any reference to it.
Thanks fellows for your responses!
-Peter