General information
Category:
Windows API functions
Title:
Mapping network drive in Windows2000
Hi all,
I have used an API function to map a network drive and it works nicely when run on Win9x. However, it fails on Windows2000.
The function I used (see below) appears to be a 16 bit API call. Has anyone had any luck implementing this on Windows2000? Or, some other alternative?
FUNCTION ConnectToDrive
PARAMETERS tcPath, tcPassword, tcDrvLetter
PRIVATE ALL LIKE j*
jcPath = tcPath
jcPassword = tcPassword
jcDrvLetter = tcDrvLetter
DECLARE Integer WNetAddConnection IN Win32api string, string, string
jnConnected = WNetAddConnection(jcPath, jcPassword, jcDrvLetter)
RETURN IIF(jnConnected = 0, .T., .F.)
Thanks!
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only