projects
/
reactos.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
guard the private header
[reactos.git]
/
reactos
/
lib
/
crtdll
/
old cruft
/
direct
/
getdcwd.c
1
#include <precomp.h>
2
#include <msvcrt/direct.h>
3
4
/*
5
* @implemented
6
*/
7
char
*
_getdcwd
(
int
nDrive
,
char
*
caBuffer
,
int
nBufLen
)
8
{
9
int
i
=
0
;
10
int
dr
=
_getdrive
();
11
12
if
(
nDrive
<
1
||
nDrive
>
26
)
13
return
NULL
;
14
if
(
dr
!=
nDrive
)
15
_chdrive
(
nDrive
);
16
i
=
GetCurrentDirectoryA
(
nBufLen
,
caBuffer
);
17
if
(
i
==
nBufLen
)
18
return
NULL
;
19
if
(
dr
!=
nDrive
)
20
_chdrive
(
dr
);
21
return
caBuffer
;
22
}