WINDOWS API函数

mmtxm 2003-08-30 01:25:34
在哪可以找到实现设置和取消文件夹共享的API函数
...全文
33 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
guothreelove2003 2003-09-27
  • 打赏
  • 举报
回复
up
FrameSniper 2003-09-27
  • 打赏
  • 举报
回复
学习
xiangwangz 2003-09-27
  • 打赏
  • 举报
回复
http://hacker1972.nease.net/delphi/d6/22.htm
对你的问题很有帮助的 ,好好看看!
Northwindrocker 2003-09-27
  • 打赏
  • 举报
回复
等!
mmtxm 2003-09-01
  • 打赏
  • 举报
回复
谢谢!请教高手,能否取两个范例学习学习.......?????
goomoo 2003-09-01
  • 打赏
  • 举报
回复
The share functions control shared resources. A shared resource is a local resource on a server (for example, a disk directory, print device, or named pipe) that can be accessed by users and applications on the network. The share functions are:

NetShareAdd Shares a resource on a server.
NetShareCheck Queries whether a server is sharing a device.
NetShareDel Deletes a share name from a server's list of shared resources.
NetShareEnum Retrieves share information about each shared resource on a server.
NetShareGetInfo Retrieves information about a specified shared resource on a server.
NetShareSetInfo Sets a shared resource's parameters.


The WNetEnumResource function should be used instead of the NetShareEnum function, which is obsolete.
The NetShareAdd function allows a user or application to share a resource of a specific type using the specified share name. The NetShareAdd function requires the share name and local device name to share the resource. A user or application must have an account on the server to access the resource.
You may also specify a Security Descriptor to be associated with a share, which specifies which users will be allowed to access files through this share, and with what type of access.

LAN Manager defines three types of special share names for interprocess communication (IPC) and remote administration of the server:

?IPC$, reserved for interprocess communication.
?ADMIN$, reserved for remote administration.
?A$, B$, C$ (and other local disk names followed by a dollar sign), assigned to local disk devices.



Share functions are available at four information levels:
SHARE_INFO_0
SHARE_INFO_1
SHARE_INFO_2
SHARE_INFO_502
The following information levels are valid only for NetShareSetInfo:
SHARE_INFO_1004
SHARE_INFO_1006
The following is supported only on Windows NT:
SHARE_INFO_1501
For NetShareSetInfo, parmnum values refer to the members of the SHARE_INFO structure, as follows. These values are used when indicating an error in a specific parameter through parm_err.

parmnum value Member of SHARE_INFO structure
SHARE_NETNAME_PARMNUM shi_netname
SHARE_TYPE_PARMNUM shi_type
SHARE_REMARK_PARMNUM shi_remark
SHARE_PERMISSIONS_PARMNUM shi_permissions
SHARE_MAX_USES_PARMNUM shi_max_uses
SHARE_CURRENT_USES_PARMNUM shi_current_uses
SHARE_PATH_PARMNUM shi_path
SHARE_PASSWD_PARMNUM shi_passwd
SHARE_FILE_SD_PARMNUM shi_security_descriptor
goomoo 2003-09-01
  • 打赏
  • 举报
回复
明天。

1,183

社区成员

发帖
与我相关
我的任务
社区描述
Delphi Windows SDK/API
社区管理员
  • Windows SDK/API社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧