[Compiler PBDLL60]
In Win95/98, if you want to check if a file exists, Power Basic uses DIR$(filemask). When an empty string is returned by this function, files matching the mask cannot be found and your code may generate a MessageBox at this point to inform the user.
However, this trick does not work under Windows NT when the search directory is empty. Instead of displaying the application's own MessageBox, dr. Watson for Windows NT is launched, reporting "access violation".
Does someone know how to avoid this, in other words: how to test for an empty dir under NT without launching that weird 'doctor'?
Thanks and regards,
In Win95/98, if you want to check if a file exists, Power Basic uses DIR$(filemask). When an empty string is returned by this function, files matching the mask cannot be found and your code may generate a MessageBox at this point to inform the user.
However, this trick does not work under Windows NT when the search directory is empty. Instead of displaying the application's own MessageBox, dr. Watson for Windows NT is launched, reporting "access violation".
Does someone know how to avoid this, in other words: how to test for an empty dir under NT without launching that weird 'doctor'?
Thanks and regards,
Comment