git://git.jankratochvil.net
/
reactos.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
branch update for HEAD-2003021201
[reactos.git]
/
lib
/
msvcrt
/
direct
/
getdcwd.c
1
#include <windows.h>
2
#include <msvcrt/direct.h>
3
4
char* _getdcwd(int nDrive, char* caBuffer, int nBufLen)
5
{
6
int i =0;
7
int dr = _getdrive();
8
9
if (nDrive < 1 || nDrive > 26)
10
return NULL;
11
if (dr != nDrive)
12
_chdrive(nDrive);
13
i = GetCurrentDirectoryA(nBufLen, caBuffer);
14
if (i == nBufLen)
15
return NULL;
16
if (dr != nDrive)
17
_chdrive(dr);
18
return caBuffer;
19
}