Platform SDK: Files and I/O |
The FindFirstVolumeMountPoint function returns the name of a volume mount point on the specified volume. FindFirstVolumeMountPoint is used to begin scanning the volume mount points on a volume.
HANDLE FindFirstVolumeMountPoint( LPTSTR lpszRootPathName, // volume name LPTSTR lpszVolumeMountPoint, // output buffer DWORD cchBufferLength // size of output buffer );
If the function succeeds, the return value is a search handle used in a subsequent call to the FindNextVolumeMountPoint and FindVolumeMountPointClose functions.
If the function fails to find a volume mount point on the volume, the return value is the INVALID_HANDLE_VALUE error code. To get extended error information, call GetLastError.
The FindFirstVolumeMountPoint function opens a mount-point search handle and returns information about the first volume mount point found on the specified volume. After the search handle is established, you can use the FindNextVolumeMountPoint function to search for other volume mount points. When the search handle is no longer needed, close it with the FindVolumeMountPointClose function.
You should not assume any correlation between the order of volume mount points returned by these functions and the order of volume mount points returned by other tools.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Unsupported.
Header: Declared in Winbase.h; include Windows.h.
Library: Use Kernel32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows 2000.
File Systems Overview, File System Functions, FindNextVolumeMountPoint, FindVolumeMountPointClose