Code: Select all | Expand
FILE( CHR( i ) + ":\NUL" )
with
Code: Select all | Expand
ISDISK( CHR( i ) )
Hope ISDISK() is available in Harbour too.
EMG
Code: Select all | Expand
FILE( CHR( i ) + ":\NUL" )
Code: Select all | Expand
ISDISK( CHR( i ) )
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
XBrowser( ADrives() )
return nil
Antonio Linares wrote:Enrico,
I just tested:Code: Select all | Expand
#include "FiveWin.ch"
function Main()
XBrowser( ADrives() )
return nil
And it is working fine with Windows 10 Pro, version 1703, OSBuild 15063.138
Antonio Linares wrote:What Windows 10 version are you using ?
Code: Select all | Expand
function ADrives( nType ) // Thanks to EMG
local aDisk := {}
local i
DEFAULT nType := 0
if nType = 0 .OR. nType = 1
for i = ASC( "A" ) TO ASC( "B" )
if ISDISKETTE( CHR( i ) + ":" )
AADD( aDisk, CHR( i ) + ":" )
endif
next
endif
if nType = 0 .OR. nType = 2
for i = ASC( "C" ) TO ASC( "Z" )
if ISCDROM( CHR( i ) + ":" ) .OR. ISDISK( CHR( i ) )
AADD( aDisk, CHR( i ) + ":" )
endif
next
endif
return aDisk