Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
NOVELL
Message
From
15/07/1998 06:43:55
 
 
To
15/07/1998 05:24:30
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: NOVELL
Miscellaneous
Thread ID:
00117137
Message ID:
00117499
Views:
25
>Thanks for replying
>
>Can you explain briefly.How I should do it?
>
>Regards
>MMK

For NET USE, there is help available at the command line for Win95. In an MS-DOS box, enter the command:

NET USE /? | MORE

to view the built-in help. To access the WNetGetConnection API call inside a VFP app, try the following code:

Somewhere in your program before you need to use the API call, define the API call to VFP:
DECLARE INTEGER WNetGetConnection IN Win32API ;
 STRING   @cLocalDrive, ;
 STRING   @cRemoteUNCBuffer, ;
 INTEGER  @nSizeOfBuffer
WNetGetConnection in the above DECLARE is case-sensitive.

To attach the directory "C:\MySharedDir" that was shared as "ShareName" on the client machine named "MachineName" to the current machine as drive "S:", use the following code. If there is a password on the share, you'll have to supply it, too. Substitute your own machine, share and drive letter
cUNCToMap = '\\MachineName\ShareName"
cPasswordToUse = ""
cDriveLetter="S:"

IF WNetAddConnection( cUNCToMap, cPasswordToUse + CHR(0), cFirstNullDrive) = 0
   * It worked
ELSE
   * It didn't
ENDIF
You cannot map a shared folder on your own local machine to a different drive letter using this API call.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform