Volume existence with no popup requester?

4 posts / 0 new
Last post
alfkil
alfkil's picture
Offline
Last seen: 12 hours 3 min ago
Joined: 2011-05-10 22:02
Volume existence with no popup requester?
Is it possible to know, if a volume exists without having to live with the popup requester from DOS asking for the volume to be inserted? As far as I can see, ExamineObjectTags do not come with a feature to suppress DOS requesters.
trixie
trixie's picture
Offline
Last seen: 3 months 8 hours ago
Joined: 2011-02-03 13:58
Re: Volume existence with no popup requester?
@alfkil
  1. APTR procWindow = NULL;
  2.  
  3.  
  4. // Disable DOS requesters.
  5. procWindow = IDOS->SetProcWindow((APTR) -1);
  6.  
  7. // Do your ExamineObjectTags() here.
  8.  
  9. // Re-enable DOS requesters.
  10. IDOS->SetProcWindow(procWindow);
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition Author of [url=http://www.os4depot.net/index.php?function=showfile&file=utility/scienti... for OS4
salass00
salass00's picture
Offline
Last seen: 6 months 1 week ago
Joined: 2011-02-03 11:27
Re: Volume existence with no popup requester?
If you need a file system and not a handler then trying for a SHARED_LOCK with Lock() might be more appropriate than using ExamineObjectTags() if you don't need the ExamineData structure. Also if the name really must be a volume and not an assign or device or something else you can search the doslist manually using LockDosList()/FindDosEntry()/UnlockDosList(). This is a bit low level but you won't have to disable error requesters then.
alfkil
alfkil's picture
Offline
Last seen: 12 hours 3 min ago
Joined: 2011-05-10 22:02
Re: Volume existence with no popup requester?
Thanks!
Log in or register to post comments