Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
c02e2eec
Kaydet (Commit)
c02e2eec
authored
Ock 13, 2012
tarafından
Herbert Dürr
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#i118021# sync Window's process and crt environment variables
üst
6b1d1065
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
process.cxx
sal/osl/w32/process.cxx
+16
-8
No files found.
sal/osl/w32/process.cxx
Dosyayı görüntüle @
c02e2eec
...
...
@@ -404,21 +404,29 @@ oslProcessError SAL_CALL osl_getEnvironment(rtl_uString *ustrVar, rtl_uString **
oslProcessError
SAL_CALL
osl_setEnvironment
(
rtl_uString
*
ustrVar
,
rtl_uString
*
ustrValue
)
{
// set Windows environment variable
LPCWSTR
lpName
=
reinterpret_cast
<
LPCWSTR
>
(
ustrVar
->
buffer
);
LPCWSTR
lpValue
=
reinterpret_cast
<
LPCWSTR
>
(
ustrValue
->
buffer
);
if
(
SetEnvironmentVariableW
(
lpName
,
lpValue
))
return
osl_Process_E_None
;
return
osl_Process_E_Unknown
;
if
(
!
SetEnvironmentVariableW
(
lpName
,
lpValue
))
return
osl_Process_E_Unknown
;
// also set the variable in the crt environment
_wputenv_s
(
lpName
,
lpValue
);
return
osl_Process_E_None
;
}
oslProcessError
SAL_CALL
osl_clearEnvironment
(
rtl_uString
*
ustrVar
)
{
//
If the second parameter is NULL, the variable is deleted from the curr
ent
//
process's environment.
//
delete the variable from the current process environm
ent
//
by setting SetEnvironmentVariable's second parameter to NULL
LPCWSTR
lpName
=
reinterpret_cast
<
LPCWSTR
>
(
ustrVar
->
buffer
);
if
(
SetEnvironmentVariableW
(
lpName
,
NULL
))
return
osl_Process_E_None
;
return
osl_Process_E_Unknown
;
if
(
!
SetEnvironmentVariableW
(
lpName
,
NULL
))
return
osl_Process_E_Unknown
;
// also remove the variable from the crt environment
wchar_t
aEmptyName
=
0
;
_wputenv_s
(
lpName
,
&
aEmptyName
);
return
osl_Process_E_None
;
}
/***************************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment