27 December 2015, 23:21 | #1 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,209
|
drive label to device name
Hi,
I'm a bit lazy but I'd like to get the device name (ex: CD0 for a given path: (ex: Games:mygame) (i.e. convert Games: to CD0 thanks |
28 December 2015, 09:08 | #2 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,519
|
One possible solution (Not necessarily the best but quite simple):
lock = Lock("<your path>",SHARED_LOCK), get lock->fl_Task (struct FileLock), then scan DosList for entry with dol_type==DLT_DEVICE with matching dol_task. dol_Name points to device name. |
28 December 2015, 12:37 | #3 |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
just out of interest, why do you actually want to do this?
|
28 December 2015, 14:26 | #4 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,209
|
just to check if the path is located in CD0: drive, because only CD0: drive is readable with the RN CD32 load routine.
|
28 December 2015, 15:16 | #5 | |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,002
|
Quote:
file_lock = Lock("Games:mygame",SHARED_LOCK); cd_lock = Lock("CD0:",SHARED_LOCK); result = SameLock(file_lock,cd_lock); if result is LOCK_SAME_VOLUME, then the game directory is on the CD. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dopus 4 disk label | videofx | request.Other | 2 | 08 June 2014 02:00 |
How to find Exec device name and unit number for boot drive | mark_k | Coders. System | 3 | 16 February 2013 19:52 |
How do I change Hard Drive device ID # | barney | support.Hardware | 18 | 25 August 2009 00:23 |
Slim CD drive with idefix97.....atapi device appears not to be working | Smiley | support.Hardware | 9 | 28 April 2007 19:03 |
MFM.DEVICE problem with escom floppy drive??? | CFou! | support.Hardware | 7 | 22 May 2006 00:22 |
|
|