Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SetShareInfo method of the Win32_Share class

The SetShareInfoWMI class method sets the parameters of a shared resource.

This topic uses Managed Object Format (MOF) syntax. For more information about using this method, see Calling a Method.

Syntax


uint32 SetShareInfo(
  [in]            uint32 MaximumAllowed,
  [in, optional]  string Description,
  [in]            Win32_SecurityDescriptor Access
);

Parameters

MaximumAllowed [in]

Limit on the maximum number of users allowed to use this resource concurrently.

Example: 10. This parameter is optional.

Description [in, optional]

Optional comment to describe the resource being shared.

Access [in]

Security descriptor for user-level permissions. A security descriptor contains information about the permission, owner, and access capabilities of the resource. For more information, see Win32_SecurityDescriptor.

Return value

Return codeDescription
0

Success

2

Access Denied

8

Unknown Failure

9

Invalid Name

10

Invalid Level

21

Invalid Parameter

22

Duplicate Share

23

Redirected Path

24

Unknown Device or Directory

25

Net Name Not Found

 

Remarks

SetShareInfo method is a dynamic object method and is used on an occurrence of this class.

Only members of the Administrators or Account Operators local group or those with Communication, Print, or Server operator group membership can successfully execute SetShareInfo. The print operator can only set printer queues. The Communication operator can only set communication device queues.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Namespace

Root\CIMV2

MOF

CIMWin32.mof

DLL

CIMWin32.dll

See also

Operating System Classes
Win32_Share

 

 

Show:
© 2015 Microsoft