The DBO loading code does check to see if a file exists, and it returns false to the calling code. In that case the object will not be made, and dbObjectExist would return false, so it is traceable, but you have to let it go through all the steps first, since object creation can fail in alot of different places, for alot of different reasons.
If you want to see if the file exists, call
dbFileExist You will have the same exception level that GDK has, in that case.
You could break it up a little...
if (dbFileExist(lpfilename) == 1)
{
dbLoadObject(lpfilename, objID);
if (dbObjectExist(objID) != 1)
{
MessageBox(NULL, "Object not created.", "MyApp", MB_ICONHAND);
// Error, do something.
}
}
else
{
MessageBox(NULL, "File does not exist", "MyApp", MB_ICONEXCLAMATION);
}
...or something like that.