you should try to test what perror says the error message is. Use like this:
perror("fopen");
it will output a message like this:
fopen: <error description here>
I imagine, since you are using ferror when your file object is NULL, that error 32 is just random garbage as another posted mentioned, probably lack of NULL pointer trapping. use errno/perror to get the error that prevented you from opening the file. in fact, it is illegal to pass a NULL pointer to ferror.
EDIT: I find it surprising that both perror and errno aren't supported with that compiler. I recommend that you find the correct error detection functions and use that. ferror certainly isn't it in this case.
EDIT: look into GetLastError() and FormatMessage(), they should be supported. http://msdn.microsoft.com/en-us/library/ms680582(VS.85).aspx also has an example of there usage. Though you will likely need to replace the microsoft "safe string" functions which ordinary C ones. (ex: StringCchPrintf -> _snprintf/sprintf)
A little googling shows that this might work for you. It's not my code, but looks reasonable:
// OS provides a system error string
DWORD dwError = GetLastError();
CString csDescription;
FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, dwError, MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT),
csDescription.GetBuffer(255), nSize, NULL );
csDescription.ReleaseBuffer();