NetShareAdd()函数在XP里创建共享啊,shi2_permissions 就是它的参数的一部分上面那东西看不清的我想也不太可能能解决我的问题了 :P
解决方案 »
- 可以固定listview控件的各列宽度不?
- 还是搞不清头文件包含关系?大虾们帮我看看!
- (2000,XP函数)PrintWindow可以取得窗口内容(截屏),但会有BUG,如何解决?
- 新手问题:VC++在DOM下如何写xml声明?
- 写文件的问题
- 把图片写入数据库时报row-00060的错误?如何处理?
- 实习到位,终于可以来了
- -----------两个问题,大侠请看------------
- 帮帮我啊!!!!!!!帮帮我啊!!!!!!!帮帮我啊!!!!!!!帮帮我啊!!!!!!!
- 求问richedit一个问题??
- 如何为对话框设计一个菜单?(在线等候,马上送分)
- ***关于VB下写COM+的类初始化的问题*****
与之相对应的是user-level security,用户在域模型中的情况(winnt,win2000),如果共享的话,只可以被授权用户访问,这是一种比较严格的安全机制。
winXP我不是很熟悉,但我想他应该是User-level security.他的一些API可能相对于Win98,win2000,winnt有很大的不同,这一点你也要考虑到。建议你去查www.microsoft.com上最新的MSDN文档资料,应该会有所收获
The NetShareSetInfo function sets the parameters of a shared resource.就是你说的Shared Level Security
NetShareAdd的level参数,要启动必须用NetShareSetInfo来启用它。
level
[in] Specifies the information level of the data. This parameter can be one of the following values.
Windows NT/2000 or later: The following levels are valid. Value Meaning
2 Specifies information about the shared resource, including name of the resource, type and permissions, and number of connections. The buf parameter points to a SHARE_INFO_2 structure.
502 Specifies information about the shared resource, including name of the resource, type and permissions, number of connections, and other pertinent information. The buf parameter points to a SHARE_INFO_502 structure. 你可以用NetShareSetInfo第三个参数设置2或者502
不知道你是不是已经这么做的,我不太懂这个。