Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Net Use to map a drive?
Message
From
13/10/1998 11:49:51
 
 
To
13/10/1998 11:18:13
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00146250
Message ID:
00146286
Views:
26
>Is there an API to map a Windows NT network drive letter? Similar to the NET USE dos prompt command.
>
>-Tim

Hi Tim,

To connect a local device to a network resource you can use WNetAddConnection function:

declare integer WNetAddConnection in "mpr.dll" string @, string @, string @

cServerName = "\\ServerName\Share_Name"
cLocalName = "T:" && "LPT1"
cPassWord = "" && "PassWord"

nResult = WNetAddConnection( @cServerName, @cPassWord, @cLocalName)

&& nResult = 0, if no errors occured


Best regards

Alex
Alex
Previous
Reply
Map
View

Click here to load this message in the networking platform