I have a USB card reader attached to my system, as drive Q:. So, the WB function:
return TRUE (1) regardless of whether or not there is an actual memory card inserted.
My goal is to be able to tell whether or not a memory card is inserted. Most other functions that I've tried (such as DirExist()) cause a low-level error box to pop up, saying that the disk is not in the drive and giving my options "Cancel", "Try Again", and "Continue" (all of which seem to be equivalent in meaning). Obviously, I don't want that box to come up. And I believe that the normal error trapping routine can't stop this box from coming up.
However, I have found that using DiskVolInfo() in combination with an error trap, does work.
That is, I do:
IF udsTry(`DiskVolInfo("Q:",1)`,0,0) == "0" THEN goto No_Disk_In_Drive
udsTry is a function that sets up an IC(73) error trap and returns 0 if the evaluation of the passed in statement fails.
So, to be clear, this works, but I'm wondering if there isn't a better way. I seem to remember doing this a long time ago, and it seemed like one of the other functions did this directly (without requiring an error trap). Can anyone help me out on this?
Again, just to summarize, I remember having dealt with this in the past, and I have a vague memory of their being some direct function (like DriveReady() or something like that) that does it. But I can't recall it now...