Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Volume display utility
#1
I have been using FindFirst for awhile and found FindFirstVolume in MSDN which is here:

Code: (Select All)
Const MAX_PATH = 260
Const INVALID_HANDLE_VALUE = -1
Declare Dynamic Library "kernel32"
    Function FindFirstVolumeW~%& (ByVal lpFileName~%&, MAX_PATH)
    Function FindNextVolumeW& (ByVal hFindFile~%&, Byval hFindPoint~%&, MAX_PATH)
    Function FindVolumeClose& (ByVal hFindFile~%&)
End Declare

Dim ASCIIZ As String * 260
Dim Wfile.Handle As _Unsigned _Offset

' find first long filename
Wfile.Handle = FindFirstVolumeW(_Offset(ASCIIZ), MAX_PATH)

' check findirst error
If Wfile.Handle <> INVALID_HANDLE_VALUE Then
    ' filename/directory loop
    Do
        X$ = ASCIIZ
        Do
            X = InStr(X$, Chr$(0))
            If X Then
                X$ = Left$(X$, X - 1) + Mid$(X$, X + 1)
            Else
                Exit Do
            End If
        Loop
        Print X$
    Loop While FindNextVolumeW(Wfile.Handle, _Offset(ASCIIZ), MAX_PATH)
    X = FindVolumeClose(Wfile.Handle)
End If
End
but I don't understand the output.

Erik.


Attached Files
.bas   findvol.bas (Size: 913 bytes / Downloads: 119)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Inkey Literal Key Display Pete 5 586 01-07-2026, 03:57 AM
Last Post: Pete
Wink display unicode text(by windows api) qbfans 10 940 12-21-2025, 12:17 AM
Last Post: TDarcos
  Video conversion utility COMMANDER X16 MOVIE MAKER ahenry3068 1 651 11-20-2025, 09:38 PM
Last Post: ahenry3068
  Vacuum Flourescent Display Clock With Alarm SierraKen 5 1,193 06-07-2025, 11:02 PM
Last Post: SierraKen
  Nasty volume delete program eoredson 3 1,068 10-06-2023, 03:33 PM
Last Post: SpriggsySpriggs

Forum Jump:


Users browsing this thread: 1 Guest(s)