Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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.
New to QB64pe? Visit the QB64 tutorial to get started.
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)