ReactOS
0.4.16-dev-979-g79f281e
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
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
{
22
WCHAR
buffer
[
MAX_PATH
];
23
if
(
GetCurrentDirectoryW
(
MAX_PATH
,
buffer
)>=2)
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
}
GetCurrentDirectoryW
#define GetCurrentDirectoryW(x, y)
Definition:
compat.h:756
MAX_PATH
#define MAX_PATH
Definition:
compat.h:34
_getdrive
int _getdrive(void)
Definition:
getdrive.c:20
_getdrives
unsigned long _getdrives(void)
Definition:
getdrive.c:35
buffer
GLuint buffer
Definition:
glext.h:5915
L
#define L(x)
Definition:
ntvdm.h:50
towupper
#define towupper(c)
Definition:
wctype.h:99
GetLogicalDrives
DWORD WINAPI GetLogicalDrives(void)
Definition:
disk.c:110
WCHAR
__wchar_t WCHAR
Definition:
xmlstorage.h:180
sdk
lib
crt
direct
getdrive.c
Generated on Sun Apr 13 2025 06:14:07 for ReactOS by
1.9.6