|
发表于 2020-4-4 19:45:01
|
显示全部楼层
楼主理解错了,
level 是指用的类型
当level是2时 buf用 SHARE_INFO_2 structures.
当level是502时 buf用 SHARE_INFO_502 structures.
而且可以设置权限,SHARE_INFO_502.shi502_permissions就是设置权限的,包括以下权限:
ACCESS_READ Permission to read data from a resource and, by default, to execute the resource.
ACCESS_WRITE Permission to write data to the resource.
ACCESS_CREATE Permission to create an instance of the resource (such as a file); data can be written to the resource as the resource is created.
ACCESS_EXEC Permission to execute the resource.
ACCESS_DELETE Permission to delete the resource.
ACCESS_ATRIB Permission to modify the resource's attributes (such as the date and time when a file was last modified).
ACCESS_PERM Permission to modify the permissions (read, write, create, execute, and delete) assigned to a resource for a user or application.
ACCESS_ALL Permission to read, write, create, execute, and delete resources, and to modify their attributes and permissions.
|
|