ReactOS
0.4.16-dev-1049-g378a335
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
SetEnvironmentVariableA.cpp
Go to the documentation of this file.
1
//
2
// SetEnvironmentVariableA.cpp
3
//
4
// Copyright (c) Microsoft Corporation. All rights reserved.
5
//
6
// Definition of __acrt_SetEnvironmentVariableA.
7
//
8
9
#include <
corecrt_internal_win32_buffer.h
>
10
11
BOOL
__cdecl
__acrt_SetEnvironmentVariableA
(
12
LPCSTR
const
lpName
,
13
LPCSTR
const
lpValue
14
)
15
{
16
__crt_internal_win32_buffer<wchar_t>
wide_name;
17
__crt_internal_win32_buffer<wchar_t>
wide_value;
18
19
errno_t
const
cvt1
=
__acrt_mbs_to_wcs_cp
(
20
lpName
,
21
wide_name,
22
__acrt_get_utf8_acp_compatibility_codepage
()
23
);
24
25
if
(
cvt1
!= 0) {
26
return
FALSE
;
27
}
28
29
errno_t
const
cvt2
=
__acrt_mbs_to_wcs_cp
(
30
lpValue,
31
wide_value,
32
__acrt_get_utf8_acp_compatibility_codepage
()
33
);
34
35
if
(
cvt2
!= 0) {
36
return
FALSE
;
37
}
38
39
return ::SetEnvironmentVariableW(wide_name.
data
(), wide_value.
data
());
40
}
__acrt_SetEnvironmentVariableA
BOOL __cdecl __acrt_SetEnvironmentVariableA(LPCSTR const lpName, LPCSTR const lpValue)
Definition:
SetEnvironmentVariableA.cpp:11
__cdecl
#define __cdecl
Definition:
accygwin.h:79
__crt_win32_buffer
Definition:
corecrt_internal_win32_buffer.h:152
__crt_win32_buffer::data
char_type * data()
Definition:
corecrt_internal_win32_buffer.h:246
corecrt_internal_win32_buffer.h
__acrt_mbs_to_wcs_cp
errno_t __acrt_mbs_to_wcs_cp(char const *const null_terminated_input_string, __crt_win32_buffer< wchar_t, ResizePolicy > &win32_buffer, unsigned int const code_page)
Definition:
corecrt_internal_win32_buffer.h:619
__acrt_get_utf8_acp_compatibility_codepage
unsigned int __acrt_get_utf8_acp_compatibility_codepage()
Definition:
corecrt_internal_win32_buffer.h:422
FALSE
#define FALSE
Definition:
types.h:117
BOOL
unsigned int BOOL
Definition:
ntddk_ex.h:94
cvt2
errno_t const cvt2
Definition:
strftime.cpp:161
cvt1
errno_t const cvt1
Definition:
strftime.cpp:139
errno_t
int errno_t
Definition:
corecrt.h:615
lpName
_In_ LPCSTR lpName
Definition:
winbase.h:2820
LPCSTR
const char * LPCSTR
Definition:
xmlstorage.h:183
sdk
lib
ucrt
internal
SetEnvironmentVariableA.cpp
Generated on Mon Apr 28 2025 06:16:33 for ReactOS by
1.9.6