Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sharing Folder on the Network
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00504542
Message ID:
00504597
Views:
20
>Helo to everyone,
>
>Is anyone of you know how to share folder/directory on a Local Area Network using API Function or any function in Visual Foxpro...

Hi,

You may use ADSI to do that, it is quite easy:
oADsContainer = GetObject( "WinNT://<B><I>DomainName</I></B>/<B><I>ComputerName</I></B>/LanmanServer")
oNewShare = oADsContainer.Create( "fileshare", "<B><I>ShareName</I></B>")
oNewShare.Path = "<B><I>FullPathToNewShare</I></B>"
oNewShare.Description = "<B><I>ShareDescription</I></B>"
oNewShare.MaxUserCount = -1    <I STYLE="COLOR:#808080">&& No limitation</I>
oNewShare.SetInfo
Release oNewShare, oADsContainer
Just replace marked values with real names in your network and values you need.

HTH
Alex
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform