The SetShareInfo method sets the parameters of a shared resource. Only members of the Administrators or Account Operators ...

The SetShareInfo method sets the parameters of a shared resource. 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 set only printer queues. The Communication operator can set only communication device queues.
The method returns an integer value that can be interpretted as follows: 
0 - Successful completion.
2 - The user does not have access to the requested information.
8 - Unknown failure.
9 - The character or file system name is invalid.
10 - The value specified for the level parameter is invalid. 
21 - The specified parameter is invalid.
22 - The share name is already in use on this server.
23 - The operation is invalid for a redirected resource. The specified device name is assigned to a shared resource.
24 - The device or directory does not exist.
25 - The share name does not exist.
Other - For integer values other than those listed above, refer to Win32 error code documentation.
English
English (United States)
日本語
Japanese