网站首页  词典首页

请输入您要查询的函数:

 

术语 netdfssetclientinfo
释义 NetDfsSetClientInfo
语法:
C++
NET_API_STATUS NET_API_FUNCTION NetDfsSetClientInfo(
__in LPWSTR DfsEntryPath,
__in_opt LPWSTR ServerName,
__in_opt LPWSTR ShareName,
__in DWORD Level,
__in LPBYTE Buffer
);
NetDfsSetClientInfo功能
修改有关分布式文件系统(DFS)根或由DFS客户端缓存保持联系。
参数
DfsEntryPath [in]
一个字符串指针,指定通用命名约定(UNC)的DFS根或链接的路径。
对于一个链接,该字符串可以两种形式之一。第一种形式如下:
\\ \\服务器\\ DfsName \\ link_path
其中ServerName是根目标服务器承载独立的DFS命名空间的名称; DfsName是DFS名称空间的名称和link_path是DFS链接。
第二种形式是如下:
\\ \\域名\\ DomDfsname \\ link_path
其中DomainName是域的承载基于域的DFS命名空间的名称; DomDfsname是DFS名称空间的名称和link_path是DFS链接。
对于一个根,该字符串可以两种形式之一:
\\ \\服务器\\ DfsName

\\ \\域名\\ DomDfsname
那里的名称的值为前面所述相同。
此参数是必需的。
服务器名[中,可选]
一个字符串指针,指定DFS链接目标服务器的名称。此参数是可选的。有关详细信息,请参见备注部分。
共享名[中,可选]
一个字符串指针,指定DFS链接的目标共享名称。此参数是可选的。有关其他信息,请参阅下面的备注部分。
Level [in]
指定请求的信息化Level。此参数可以是下列值之一。
ValueMeaning
101Set当地的DFS链接的存储状态。缓冲区参数指向DFS_INFO_101结构。
102Set本地DFS链接超时。缓冲区参数指向DFS_INFO_102结构。有关详细信息,请参阅下面的备注部分。
缓冲区 [in]
缓冲区指针,其中包含要设置的信息。 The format of this information depends on the value of the Level parameter.有关更多信息,请参阅网络管理功能的缓冲器。
返回值
如果函数成功,返回值是NERR_Success。
如果函数失败,返回值是一个系统错误代码。对于一个错误代码的列表,请参见系统错误代码。
备注
调用者必须具有在DFS服务器的管理员特权。如需有关通话功能,需要管理员权限的信息,请运行特权。
设置超时为零可能不会立即删除的DFS链接的本地缓存的副本,因为线程可能引用项。
因为只有有一次在一个DFS链接的服务器名和共享名参数被忽略的Level102。
在DFS_STORAGE_STATE_ONLINE和DFS_STORAGE_STATE_OFFLINE位将被忽略。该DFS_STORAGE_STATE_ACTIVE位才有效,如果没有文件开放活跃的计算机。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderLmDfs.h(包括LmDfs.h或Lm.h)
LibraryNetapi32.lib
DLLNetapi32.dll
参见
网络管理概述
网络管理功能
分布式文件系统(DFS)功能
DFS_INFO_101
DFS_INFO_102
NetDfsGetClientInfo
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==NetDfsSetClientInfo Function
Modifies information about a Distributed File System (DFS) root or link in the cache maintained by the DFS client.
Syntax
C++
NET_API_STATUS NET_API_FUNCTION NetDfsSetClientInfo(
__in LPWSTR DfsEntryPath,
__in_opt LPWSTR ServerName,
__in_opt LPWSTR ShareName,
__in DWORD Level,
__in LPBYTE Buffer
);
Parameters
DfsEntryPath [in]
Pointer to a string that specifies the Universal Naming Convention (UNC) path of a DFS root or link.
For a link, the string can be in one of two forms. The first form is as follows:
\\\\ServerName\\DfsName\\link_path
where ServerName is the name of the root target server that hosts the stand-alone DFS namespace; DfsName is the name of the DFS namespace; and link_path is a DFS link.
The second form is as follows:
\\\\DomainName\\DomDfsname\\link_path
where DomainName is the name of the domain that hosts the domain-based DFS namespace; DomDfsname is the name of the DFS namespace; and link_path is a DFS link.
For a root, the string can be in one of two forms:
\\\\ServerName\\DfsName
or
\\\\DomainName\\DomDfsname
where the values of the names are the same as those described previously.
This parameter is required.
ServerName [in, optional]
Pointer to a string that specifies the DFS link target server name. This parameter is optional. For more information, see the Remarks section.
ShareName [in, optional]
Pointer to a string that specifies the DFS link target share name. This parameter is optional. For additional information, see the following Remarks section.
Level [in]
Specifies the information level of the request. This parameter can be one of the following values.
ValueMeaning
101Set the local DFS link's storage status. The Buffer parameter points to a DFS_INFO_101 structure.
102Set the local DFS link time-out. The Buffer parameter points to a DFS_INFO_102 structure. For more information, see the following Remarks section.

Buffer [in]
Pointer to a buffer that contains the information to be set. The format of this information depends on the value of the Level parameter. For more information, see Network Management Function Buffers .
Return Value
If the function succeeds, the return value is NERR_Success.
If the function fails, the return value is a system error code. For a list of error codes, see System Error Codes .
Remarks
The caller must have Administrator privilege on the DFS server. For more information about calling functions that require administrator privileges, see Running with Special Privileges .
Setting the time-out to zero may not immediately delete the local cached copy of the DFS link, because threads may be referencing the entry.
Because there is only one time-out on a DFS link, the ServerName and ShareName parameters are ignored for level 102.
The DFS_STORAGE_STATE_ONLINE and DFS_STORAGE_STATE_OFFLINE bits will be ignored. The DFS_STORAGE_STATE_ACTIVE bit is valid only if no files are open to the active computer.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderLmDfs.h (include LmDfs.h or Lm.h)
LibraryNetapi32.lib
DLLNetapi32.dll
See Also
Network Management Overview
Network Management Functions
Distributed File System (DFS) Functions
DFS_INFO_101
DFS_INFO_102
NetDfsGetClientInfo
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/bb524821(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:24:31