网站首页  词典首页

请输入您要查询的函数:

 

术语 getlogicaldrivestrings
释义 GetLogicalDriveStrings
语法:
C++
DWORD WINAPI GetLogicalDriveStrings(
__in DWORD nBufferLength,
__out LPTSTR lpBuffer
);
GetLogicalDriveStrings函数
填充一个字符串缓冲区指定在系统驱动器有效。
参数
nBufferLength [in]
缓冲区的最大尺寸指向lpBuffer,在TCHARs。此大小不包括终止空字符。如果此参数为0,lpBuffer不使用。
lpBuffer [out]
阿一个缓冲区,它接收一系列的空结尾的字符串,每个系统中的有效的驱动器之一,加上一个额外的空字符指针。每个字符串是一个设备名。
返回值
如果函数成功,返回值是长度,字符复制到缓冲区的字符串,不包括终止空字符。请注意,一个ANSI - ASCII的空字符使用一个字节,但是一个Unicode空字符使用两个字节。
是如果缓冲区不够大,则返回值大于nBufferLength。它是须持有该驱动器字符串缓冲区的大小。
如果函数失败,返回值是零。为了获得更多错误信息,使用GetLastError函数。
备注
缓冲区中的每个字符串可以用于任何需要一个根目录,如需要对GetDriveType和GetDiskFreeSpace功能。
这个函数返回一个在全球和本地驱动器的串联质谱- DOS设备的命名空间。如果一个驱动器命名空间都存在,这个函数将返回在本地MS入门DOS设备命名空间。有关更多信息,请参见定义一个MS DOS设备名。
实例
有关示例,请参见获取来自文件处理文件名。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinBase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode和ANSI namesGetLogicalDriveStringsW(Unicode)和GetLogicalDriveStringsA(ANSI)的
参见
GetDiskFreeSpace
GetDriveType
GetLogicalDrives
卷管理功能
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年9月3日
==英文原文==GetLogicalDriveStrings Function
Fills a buffer with strings that specify valid drives in the system.
Syntax
C++
DWORD WINAPI GetLogicalDriveStrings(
__in DWORD nBufferLength,
__out LPTSTR lpBuffer
);
Parameters
nBufferLength [in]
The maximum size of the buffer pointed to by lpBuffer, in TCHARs. This size does not include the terminating null character. If this parameter is zero, lpBuffer is not used.
lpBuffer [out]
A pointer to a buffer that receives a series of null-terminated strings, one for each valid drive in the system, plus with an additional null character. Each string is a device name.
Return Value
If the function succeeds, the return value is the length, in characters, of the strings copied to the buffer, not including the terminating null character. Note that an ANSI-ASCII null character uses one byte, but a Unicode null character uses two bytes.
If the buffer is not large enough, the return value is greater than nBufferLength. It is the size of the buffer required to hold the drive strings.
If the function fails, the return value is zero. To get extended error information, use the GetLastError function.
Remarks
Each string in the buffer may be used wherever a root directory is required, such as for the GetDriveType and GetDiskFreeSpace functions.
This function returns a concatenation of the drives in the Global and Local MS-DOS Device namespaces. If a drive exists in both namespaces, this function will return the entry in the Local MS-DOS Device namespace. For more information, see Defining an MS DOS Device Name .
Examples
For an example, see Obtaining a File Name From a File Handle .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinBase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode and ANSI namesGetLogicalDriveStringsW (Unicode) and GetLogicalDriveStringsA (ANSI)
See Also
GetDiskFreeSpace
GetDriveType
GetLogicalDrives
Volume Management Functions
Send comments about this topic to Microsoft
Build date: 9/3/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa364975(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 13:17:50