Here is a stripped down excerpt of a routine I use frequently in my programs to find the available drives. This works fine for all drives except mapped network drives.
For example, I have my daughters computer mapped as drive "Z" in Windows XP. If I run the code below, drive Z is not detected. But if I open the mapped drive in Windows first, THEN this code finds the mapped drive without problems.
So how do I get my program to detect the mapped drive on it's own?
For example, I have my daughters computer mapped as drive "Z" in Windows XP. If I run the code below, drive Z is not detected. But if I open the mapped drive in Windows first, THEN this code finds the mapped drive without problems.
So how do I get my program to detect the mapped drive on it's own?
Code:
drives=GetLogicalDrives() FOR a=0 TO 25 '** Get Drives IF BIT(drives,a)=1 THEN pp$=CHR$(65+a)+":\" b=GetDriveType(BYCOPY pp$) IF b=>2 AND b<=6 THEN a$="Drive "+CHR$(65+a)+": " IF a=0 OR a=1 THEN a$=a$+"(Floppy Disk)" ELSEIF b=%DRIVE_FIXED THEN a$=a$+"("+volname$+")" ELSEIF b=%DRIVE_REMOVABLE THEN a$=a$+"(Removable Disk)" ELSEIF b=%DRIVE_REMOTE THEN a$=a$+"(Network Drive)" ELSEIF b=5 THEN a$=a$+"(CD-ROM)" END IF END IF END IF NEXT a
Comment