Don't get system directory from the environment, use

GetSystemDirectory instead.
This commit is contained in:
Alexandre Julliard 2004-07-15 19:00:35 +00:00
parent 99a6efa1af
commit 9f1b81977b
1 changed files with 5 additions and 8 deletions

View File

@ -32,14 +32,12 @@
*/ */
LPSTR WINAPI GetWin32sDirectory(void) LPSTR WINAPI GetWin32sDirectory(void)
{ {
static char sysdir[0x80]; static const char win32s[] = "\\win32s";
LPSTR text;
GetEnvironmentVariableA("winsysdir", sysdir, 0x80); int len = GetSystemDirectoryA( NULL, 0 );
if (!sysdir) return NULL; LPSTR text = HeapAlloc( GetProcessHeap(), 0, len + sizeof(win32s) - 1 );
strcat(sysdir, "\\WIN32S"); GetSystemDirectoryA( text, len );
text = HeapAlloc(GetProcessHeap(), 0, strlen(sysdir)+1); strcat( text, win32s );
strcpy(text, sysdir);
return text; return text;
} }
@ -60,4 +58,3 @@ HTASK16 WINAPI GetCurrentTask32(void)
{ {
return NtCurrentTeb()->htask16; return NtCurrentTeb()->htask16;
} }