ReactOS
0.4.16-dev-981-g80eb313
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
getcwd.c
Go to the documentation of this file.
1
#include <precomp.h>
2
#include <direct.h>
3
#include <process.h>
4
#include <tchar.h>
5
6
/*
7
* @implemented
8
*/
9
_TCHAR
*
_tgetcwd
(
_TCHAR
*
buf
,
int
size
)
10
{
11
_TCHAR
dir
[
MAX_PATH
];
12
DWORD
dir_len =
GetCurrentDirectory
(
MAX_PATH
,
dir
);
13
14
if
(dir_len == 0)
15
{
16
_dosmaperr
(
GetLastError
());
17
return
NULL
;
/* FIXME: Real return value untested */
18
}
19
20
if
(!
buf
)
21
{
22
return
_tcsdup
(
dir
);
23
}
24
25
if
(dir_len >= (
DWORD
)
size
)
26
{
27
_set_errno
(
ERANGE
);
28
return
NULL
;
/* buf too small */
29
}
30
31
_tcscpy
(
buf
,
dir
);
32
return
buf
;
33
}
ERANGE
#define ERANGE
Definition:
acclib.h:92
dir
unsigned int dir
Definition:
maze.c:112
NULL
#define NULL
Definition:
types.h:112
MAX_PATH
#define MAX_PATH
Definition:
compat.h:34
DWORD
unsigned long DWORD
Definition:
ntddk_ex.h:95
size
GLsizeiptr size
Definition:
glext.h:5919
buf
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition:
glext.h:7751
_tcscpy
#define _tcscpy
Definition:
tchar.h:623
_tgetcwd
#define _tgetcwd
Definition:
tchar.h:673
_tcsdup
#define _tcsdup
Definition:
tchar.h:625
_TCHAR
char _TCHAR
Definition:
tchar.h:1392
_dosmaperr
void _dosmaperr(unsigned long oserrcode)
Definition:
errno.c:79
_set_errno
errno_t __cdecl _set_errno(_In_ int _Value)
GetLastError
DWORD WINAPI GetLastError(void)
Definition:
except.c:1042
GetCurrentDirectory
#define GetCurrentDirectory
Definition:
winbase.h:3836
sdk
lib
crt
direct
getcwd.c
Generated on Wed Apr 16 2025 06:14:07 for ReactOS by
1.9.6