フォルダを共有します。
Namespace: YiaoWang.UtilityAssembly: YiaoWang.Utility (YiaoWang.Utility.dll 内) バージョン: 2.11.5.7 (2.11.5.7)
Syntax
C# |
---|
public static void NetShareAdd( string serverName, string shareName, int maxUses, string comment, string physicsFolderPath, string password ) |
Visual Basic |
---|
Public Shared Sub NetShareAdd ( _ serverName As String, _ shareName As String, _ maxUses As Integer, _ comment As String, _ physicsFolderPath As String, _ password As String _ ) |
Parameters
- serverName
- Type: System..::..String
サーバー名。(null の場合、ローカルPCに作成)
- shareName
- Type: System..::..String
共有名
- maxUses
- Type: System..::..Int32
同時共有できる最大ユーザ数。(-1 で無制限)
- comment
- Type: System..::..String
コメント。
- physicsFolderPath
- Type: System..::..String
共有フォルダの物理フォルダパス。(事前に作成が必要)
- password
- Type: System..::..String
パスワード。
Remarks
Administrators または Account Operators ローカルグループのメンバ、あるいは
Communication Operators、Print Operators、Server Operators のいずれかのグループの
メンバだけがこの関数を実行できます。
Print Operator はプリンタキューだけを追加/削除できます。
Communication Operator は、通信デバイスキューだけを追加/削除できます。
Exceptions
Exception | Condition |
---|---|
System..::..SystemException | 共有フォルダ作成失敗 |