Looking for a reliable way to determine if a drive letter is in use
#6
(05-08-2023, 03:55 PM)Ultraman Wrote: Looks like you'd use GetLogicalDrives()

So,

Code: (Select All)
Declare CustomType Library
Function GetLogicalDrives~&()
End Declare

Dim As Unsigned Long currentLetters: currentLetters = GetLogicalDrives
'do something to figure out the bitmask using AND

It looks like GetDriveTypeA may be more appropriate:

https://learn.microsoft.com/en-us/window...drivetypea

It can report that a drive exists but no volume has been mounted.
Software and cathedrals are much the same — first we build them, then we pray.
QB64 Tutorial
Reply


Messages In This Thread
RE: Looking for a reliable way to determine if a drive letter is in use - by TerryRitchie - 05-08-2023, 04:02 PM



Users browsing this thread: 3 Guest(s)