ReactOS  0.4.15-dev-509-g96a357b
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  */
20 int _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  */
35 unsigned long _getdrives(void)
36 {
37  return GetLogicalDrives();
38 }
unsigned long _getdrives(void)
Definition: getdrive.c:35
#define GetCurrentDirectoryW(x, y)
Definition: compat.h:422
GLuint buffer
Definition: glext.h:5915
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:26
static const WCHAR L[]
Definition: oid.c:1250
int _getdrive(void)
Definition: getdrive.c:20
DWORD WINAPI GetLogicalDrives(VOID)
Definition: disk.c:110
#define towupper(c)
Definition: wctype.h:99