lnStatus = WNetGetConnection(@lcDriveLetter, @lcRemoteName, ; >> @lnRemoteBuffer)>
FUNCTION ConnectName
* This function is part of a class
* That's why the "This.Net_Error" call
* Returns the name of the device
LPARAMETER pc_device
LOCAL lcresult, lcdevice, lcbuffer, lnsize, lnerr
lcresult = ""
lcbuffer = SPACE(200) + CHR(0)
lnsize = LEN(lcbuffer)
lcdevice = pc_device
IF RIGHT(lcdevice, 1) # CHR(0)
lcdevice = lcdevice + CHR(0)
ENDIF
lnerr = WNetGetConnection(@lcdevice, @lcbuffer, @lnsize)
IF lnerr = NO_ERROR
lcresult = LEFT(lcbuffer, AT(CHR(0), lcbuffer) - 1)
ELSE
This.Net_Error()
ENDIF
RETURN lcresult
ENDFUNCGeorge
Ubi caritas et amor, deus ibi est