网站首页  词典首页

请输入您要查询的函数:

 

术语 netfilegetinfo
释义 NetFileGetInfo
语法:
C++
NET_API_STATUS NetFileGetInfo(
__in LMSTR servername,
__in DWORD fileid,
__in DWORD level,
__out LPBYTE *bufptr
);
NetFileGetInfo功能
检索信息的一个服务器资源,特别是开幕式。
参数
服务器名 [in]
指针指向一个字符串,它指定的DNS或NetBIOS的远程服务器上的功能是执行的名称。如果该参数为NULL,则使用本地计算机。
这个字符串是Unicode或FORCE_UNICODE如果_WIN32_WINNT定义。
fileid [in]
指定资源的开放要返回信息文件标识符。这个参数的值必须在已归还以前的枚举电话。有关详细信息,请参阅下面的备注部分。
Level [in]
指定的数据信息的Level。此参数可以是下列值之一。
ValueMeaning
2Return文件标识号。该bufptr参数是一个一FILE_INFO_2结构的指针。
3Return标识号文件和有关文件的其他信息。该bufptr参数是一个一FILE_INFO_3结构的指针。
bufptr [out]
指向的缓冲区,接收信息的地址。这一数据格式取决于Level的参数值。此缓冲区分配制度,必须使用NetApiBufferFree释放功能。有关更多信息,请参阅网络管理功能,缓冲器和网络管理功能缓冲区长度。
返回值
如果函数成功,返回值是NERR_Success。
如果函数失败,返回值可以是下面的错误代码之一。
返回codeDescription
ERROR_ACCESS_DENIEDThe用户没有获得所需的信息。
ERROR_FILE_NOT_FOUNDThe文件未找到。
ERROR_INVALID_LEVELThe价值Level参数指定无效。
ERROR_NOT_ENOUGH_MEMORYInsufficient内存可用。
NERR_BufTooSmallThe提供的缓冲区太小。
备注
管理员或服务器操作员本地组的成员才可以成功地执行NetFileGetInfo功能。
您可以调用NetFileEnum函数来检索多个文件服务器上开放的信息。
如果您是Active Directory的程序,您可以调用某些Active Directory服务接口(ADSI)的方法来达到同样的功能,您可以通过调用NetFileGetInfo。有关更多信息,请参阅IADsResource和IADsFileServiceOperations。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderLmshare.h(包括Lm.h)
LibraryNetapi32.lib
DLLNetapi32.dll
参见
网络管理概述
网络管理功能
NetFile功能
FILE_INFO_2
FILE_INFO_3
NetFileEnum
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==NetFileGetInfo Function
Retrieves information about a particular opening of a server resource.
Syntax
C++
NET_API_STATUS NetFileGetInfo(
__in LMSTR servername,
__in DWORD fileid,
__in DWORD level,
__out LPBYTE *bufptr
);
Parameters
servername [in]
Pointer to a string that specifies the DNS or NetBIOS name of the remote server on which the function is to execute. If this parameter is NULL, the local computer is used.
This string is Unicode if _WIN32_WINNT or FORCE_UNICODE is defined.
fileid [in]
Specifies the file identifier of the open resource for which to return information. The value of this parameter must have been returned in a previous enumeration call. For more information, see the following Remarks section.
level [in]
Specifies the information level of the data. This parameter can be one of the following values.
ValueMeaning
2Return the file identification number. The bufptr parameter is a pointer to a FILE_INFO_2 structure.
3Return the file identification number and other information about the file. The bufptr parameter is a pointer to a FILE_INFO_3 structure.

bufptr [out]
Pointer to the address of the buffer that receives the information. The format of this data depends on the value of the level parameter. This buffer is allocated by the system and must be freed using the NetApiBufferFree function. For more information, see Network Management Function Buffers and Network Management Function Buffer Lengths .
Return Value
If the function succeeds, the return value is NERR_Success.
If the function fails, the return value can be one of the following error codes.
Return codeDescription
ERROR_ACCESS_DENIEDThe user does not have access to the requested information.
ERROR_FILE_NOT_FOUNDThe file was not found.
ERROR_INVALID_LEVELThe value specified for the level parameter is not valid.
ERROR_NOT_ENOUGH_MEMORYInsufficient memory is available.
NERR_BufTooSmallThe supplied buffer is too small.

Remarks
Only members of the Administrators or Server Operators local group can successfully execute the NetFileGetInfo function.
You can call the NetFileEnum function to retrieve information about multiple files open on a server.
If you are programming for Active Directory, you may be able to call certain Active Directory Service Interface (ADSI) methods to achieve the same functionality you can achieve by calling NetFileGetInfo. For more information, see IADsResource and IADsFileServiceOperations .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderLmshare.h (include Lm.h)
LibraryNetapi32.lib
DLLNetapi32.dll
See Also
Network Management Overview
Network Management Functions
NetFile Functions
FILE_INFO_2
FILE_INFO_3
NetFileEnum
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/bb525379(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:27:39