>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
ELSE
ENDIF
You cannot map a shared folder on your own local machine to a different drive letter using this API call.