CreateShare method of the MSFT_SmbShare class
Creates a new share and allows the creator to specify initial access rights that determine who can and can’t access the newly created share.
Syntax
uint32 CreateShare( [in] string Name, [in] string ScopeName, [in] string Path, [in] string Description, [in] uint32 ConcurrentUserLimit, [in] uint32 FolderEnumerationMode, [in] uint32 CachingMode, [in] boolean Temporary, [in] boolean ContinuouslyAvailable, [in] uint32 CATimeout, boolean EncryptData, [in] string FullAccess[], [in] string ChangeAccess[], [in] string ReadAccess[], [in] string NoAccess[], [out] MSFT_SmbShare CreatedShare );
Parameters
- Name [in]
-
Name of the share.
- ScopeName [in]
-
Name of the endpoint to which the share is scoped.
- Path [in]
-
Absolute path to the file system directory that is shared. Null if the share is not a file share.
- Description [in]
-
Optional description of the share.
- ConcurrentUserLimit [in]
-
Maximum number of users that may concurrently access the share. If this property is zero, there is no limit.
- FolderEnumerationMode [in]
-
The enumeration mode that is enabled for the share.
Value Meaning - AccessBased
- 0
Access-based
- Unrestricted
- 1
Unrestricted
- CachingMode [in]
-
The caching policy for the share.
- None (0)
- Manual (1)
- Documents (2)
- Programs (3)
- BranchCache (4)
- Unknown (5)
- Temporary [in]
-
Indicates whether this is a temporary share.
- ContinuouslyAvailable [in]
-
Indicates whether the share supports continuous availability.
- CATimeout [in]
-
In case of a failover, the number of seconds the client will wait before failing the operation.
- EncryptData
-
Indicates whether the data on the share should be encrypted.
- FullAccess [in]
-
An array of strings containing the account names of users to be granted full access to the share.
- ChangeAccess [in]
-
An array of strings containing the account names of users to be granted change access to the share.
- ReadAccess [in]
-
An array of strings containing the account names of users to be granted read-only access to the share.
- NoAccess [in]
-
An array of strings containing the account names of users to be granted no access to the share.
- CreatedShare [out]
-
An instance of the MSFT_SmbShare class that represents the share.
Requirements
|
Minimum supported client | Windows 8 [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2012 [desktop apps only] |
|
Namespace |
\ROOT\Microsoft\Windows\Smb |
|
MOF |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 11/5/2012
