Xixi, yy的问题我喜欢!
您可以使用NetUserAdd来添加用户,
可以用NetGroupAdd来添加用户组
用法:
NET_API_STATUS NetUserAdd(
LPWSTR servername,
DWORD level,
LPBYTE buf,
LPDWORD parm_err
);
其中servername如果为null则是指本机
level可以为1,2,3, 指示Buf中的结构类型分别为
USER_INFO_1, USER_INFO_2, USER_INFO_3
Ohh, dear, I can't believe my eyes!
USER_INFO_3 contains a field named
usri3_max_storage
which can set the total disk amount of the user.
But I bet it is not available in NT4.0 NTFS!
For the help information even does not say
its quantum, whether in Byte, or KByte, etc.
It seems you can only use USER_MAXSTORAGE_UNLIMITED
constant at this field, up to now.
Anyway, I'll try to test this API.
Thanks to yy!