Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than netapi32, prefix the name with the module name and a period.
NetShareAdd (netapi32)
.
C# Signature:
[DllImport("netapi32.dll", SetLastError=true)]
static extern TODO NetShareAdd(TODO);
VB Signature:
Declare Unicode Function NetShareAdd Lib "netapi32.dll" _
(ByVal servername As String, _
ByVal level As Integer, _
ByRef buf As SHARE_INFO_2, _
ByRef parm_err As Integer) As Integer
User-Defined Types:
None.
Notes:
[2004-06-11]
VB Def and Sample code added by RACKLEY
Tips & Tricks:
Please add some!
Sample Code:
Dim shi2 As SHARE_INFO_2
' Populate the structure with information
shi2.shi2_netname = sharename" ' share name
shi2.shi2_type = STYPE_DISKTREE ' disk drive
shi2.shi2_remark = "" ' share comment
shi2.shi2_permissions = 0
shi2.shi2_max_uses = -1 ' unlimited
shi2.shi2_current_uses = 0
shi2.shi2_path = "c:\myshare"
shi2.shi2_passwd = Nothing ' no password
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).