ReactOS
0.4.16-dev-927-g467dec4
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
getdfree.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
unsigned
int
_getdiskfree
(
unsigned
int
_drive,
struct
_diskfree_t
* _diskspace)
10
{
11
char
RootPathName[10];
12
13
RootPathName[0] =
toupper
(_drive +
'@'
);
14
RootPathName[1] =
':'
;
15
RootPathName[2] =
'\\'
;
16
RootPathName[3] = 0;
17
if
(_diskspace ==
NULL
)
18
return
0;
19
if
(!
GetDiskFreeSpaceA
(RootPathName,(
LPDWORD
)&_diskspace->
sectors_per_cluster
,(
LPDWORD
)&_diskspace->
bytes_per_sector
,
20
(
LPDWORD
)&_diskspace->
avail_clusters
,(
LPDWORD
)&_diskspace->
total_clusters
))
21
return
0;
22
return
_diskspace->
avail_clusters
;
23
}
toupper
int toupper(int c)
Definition:
utclib.c:881
NULL
#define NULL
Definition:
types.h:112
GetDiskFreeSpaceA
BOOL WINAPI GetDiskFreeSpaceA(IN LPCSTR lpRootPathName, OUT LPDWORD lpSectorsPerCluster, OUT LPDWORD lpBytesPerSector, OUT LPDWORD lpNumberOfFreeClusters, OUT LPDWORD lpTotalNumberOfClusters)
Definition:
disk.c:142
_getdiskfree
unsigned int _getdiskfree(unsigned int _drive, struct _diskfree_t *_diskspace)
Definition:
getdfree.c:9
_diskfree_t
Definition:
direct.h:20
_diskfree_t::bytes_per_sector
unsigned bytes_per_sector
Definition:
direct.h:24
_diskfree_t::sectors_per_cluster
unsigned sectors_per_cluster
Definition:
direct.h:23
_diskfree_t::total_clusters
unsigned total_clusters
Definition:
direct.h:21
_diskfree_t::avail_clusters
unsigned avail_clusters
Definition:
direct.h:22
LPDWORD
uint32_t * LPDWORD
Definition:
typedefs.h:59
sdk
lib
crt
direct
getdfree.c
Generated on Sun Mar 30 2025 06:14:02 for ReactOS by
1.9.6