Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Function GetNameFromLetter(cDriveLetterToCheck)
LOCAL cBuffer, nResult
IF VARTYPE(cDriveLetterToCheck) # 'C' OR ;
LEN(cDriveLetterToCheck) < 2 OR ;
SUBSTR(cDriveLetterToCheck,2,1) # ':' OR ;
NOT BETWEEN(UPPER(LEFT(cDriveLetterToCheck,1)),'A','Z')
RETURN ''
ENDIF
DECLARE INTEGER WNetGetConnection IN Win32API ;
STRING @cLocalDrive, ;
STRING @cRemoteUNCBuffer, ;
INTEGER @nSizeOfBuffer
cBuffer = SPACE(511)
nResult = WNetGetConnection(LEFT(cDriveLetterToCheck,2), ;
@cBuffer, ;
511)
IF nResult # 0
* Failed - it's probably not a mapped drive,
* or nothing is mapped to it
RETURN ''
ELSE
RETURN LEFT(cBuffer,AT(CHR(0),cBuffer)-1)
ENDIF