ReactOS 0.4.15-dev-7942-gd23573b
getdrive.c
Go to the documentation of this file.
1#include <precomp.h>
2#include <ctype.h>
3#include <direct.h>
4
5
6/*
7 * @implemented
8 *
9 * _getdrive (MSVCRT.@)
10 *
11 * Get the current drive number.
12 *
13 * PARAMS
14 * None.
15 *
16 * RETURNS
17 * Success: The drive letter number from 1 to 26 ("A:" to "Z:").
18 * Failure: 0.
19 */
20int _getdrive(void)
21{
24 {
25 buffer[0]=towupper(buffer[0]);
26 if (buffer[0] >= L'A' && buffer[0] <= L'Z' && buffer[1] == L':')
27 return buffer[0] - L'A' + 1;
28 }
29 return 0;
30}
31
32/*
33 * @implemented
34 */
35unsigned long _getdrives(void)
36{
37 return GetLogicalDrives();
38}
#define GetCurrentDirectoryW(x, y)
Definition: compat.h:756
#define MAX_PATH
Definition: compat.h:34
int _getdrive(void)
Definition: getdrive.c:20
unsigned long _getdrives(void)
Definition: getdrive.c:35
GLuint buffer
Definition: glext.h:5915
#define L(x)
Definition: ntvdm.h:50
#define towupper(c)
Definition: wctype.h:99
DWORD WINAPI GetLogicalDrives(void)
Definition: disk.c:110
__wchar_t WCHAR
Definition: xmlstorage.h:180