Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
03d6da08
Commit
03d6da08
authored
Jul 07, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Add implementation of GetSystemWow64DirectoryA/W.
parent
12c90b04
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
2 deletions
+37
-2
kernel_private.h
dlls/kernel32/kernel_private.h
+1
-0
path.c
dlls/kernel32/path.c
+18
-2
process.c
dlls/kernel32/process.c
+15
-0
winbase.h
include/winbase.h
+3
-0
No files found.
dlls/kernel32/kernel_private.h
View file @
03d6da08
...
...
@@ -71,6 +71,7 @@ extern HANDLE dos_handles[DOS_TABLE_SIZE];
extern
const
WCHAR
*
DIR_Windows
;
extern
const
WCHAR
*
DIR_System
;
extern
const
WCHAR
*
DIR_SysWow64
;
extern
VOID
SYSLEVEL_CheckNotLevel
(
INT
level
);
...
...
dlls/kernel32/path.c
View file @
03d6da08
...
...
@@ -1521,10 +1521,22 @@ UINT WINAPI GetSystemDirectoryA( LPSTR path, UINT count )
* - On Win32 we should returns ERROR_CALL_NOT_IMPLEMENTED
* - On Win64 we should returns the SysWow64 (system64) directory
*/
UINT
WINAPI
GetSystemWow64DirectoryW
(
LPWSTR
lpBuffer
,
UINT
uSize
)
UINT
WINAPI
GetSystemWow64DirectoryW
(
LPWSTR
path
,
UINT
count
)
{
UINT
len
;
if
(
!
DIR_SysWow64
)
{
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
0
;
}
len
=
strlenW
(
DIR_SysWow64
)
+
1
;
if
(
path
&&
count
>=
len
)
{
strcpyW
(
path
,
DIR_SysWow64
);
len
--
;
}
return
len
;
}
...
...
@@ -1533,10 +1545,14 @@ UINT WINAPI GetSystemWow64DirectoryW( LPWSTR lpBuffer, UINT uSize )
*
* See comment for GetWindowsWow64DirectoryW.
*/
UINT
WINAPI
GetSystemWow64DirectoryA
(
LPSTR
lpBuffer
,
UINT
uSize
)
UINT
WINAPI
GetSystemWow64DirectoryA
(
LPSTR
path
,
UINT
count
)
{
if
(
!
DIR_SysWow64
)
{
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
0
;
}
return
copy_filename_WtoA
(
DIR_SysWow64
,
path
,
count
);
}
...
...
dlls/kernel32/process.c
View file @
03d6da08
...
...
@@ -76,11 +76,13 @@ static UINT process_error_mode;
static
DWORD
shutdown_flags
=
0
;
static
DWORD
shutdown_priority
=
0x280
;
static
DWORD
process_dword
;
static
BOOL
is_wow64
;
HMODULE
kernel32_handle
=
0
;
const
WCHAR
*
DIR_Windows
=
NULL
;
const
WCHAR
*
DIR_System
=
NULL
;
const
WCHAR
*
DIR_SysWow64
=
NULL
;
/* Process flags */
#define PDB32_DEBUGGED 0x0001
/* Process is being debugged */
...
...
@@ -822,6 +824,7 @@ static void init_windows_dirs(void)
static
const
WCHAR
winsysdirW
[]
=
{
'w'
,
'i'
,
'n'
,
's'
,
'y'
,
's'
,
'd'
,
'i'
,
'r'
,
0
};
static
const
WCHAR
default_windirW
[]
=
{
'C'
,
':'
,
'\\'
,
'w'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
0
};
static
const
WCHAR
default_sysdirW
[]
=
{
'\\'
,
's'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'3'
,
'2'
,
0
};
static
const
WCHAR
default_syswow64W
[]
=
{
'\\'
,
's'
,
'y'
,
's'
,
'w'
,
'o'
,
'w'
,
'6'
,
'4'
,
0
};
DWORD
len
;
WCHAR
*
buffer
;
...
...
@@ -849,6 +852,17 @@ static void init_windows_dirs(void)
DIR_System
=
buffer
;
}
#ifndef _WIN64
/* SysWow64 is always defined on 64-bit */
if
(
is_wow64
)
#endif
{
len
=
strlenW
(
DIR_Windows
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
+
sizeof
(
default_syswow64W
)
);
memcpy
(
buffer
,
DIR_Windows
,
len
*
sizeof
(
WCHAR
)
);
memcpy
(
buffer
+
len
,
default_syswow64W
,
sizeof
(
default_syswow64W
)
);
DIR_SysWow64
=
buffer
;
}
if
(
!
CreateDirectoryW
(
DIR_Windows
,
NULL
)
&&
GetLastError
()
!=
ERROR_ALREADY_EXISTS
)
ERR
(
"directory %s could not be created, error %u
\n
"
,
debugstr_w
(
DIR_Windows
),
GetLastError
()
);
...
...
@@ -1010,6 +1024,7 @@ void CDECL __wine_kernel_init(void)
setbuf
(
stdout
,
NULL
);
setbuf
(
stderr
,
NULL
);
kernel32_handle
=
GetModuleHandleW
(
kernel32W
);
IsWow64Process
(
GetCurrentProcess
(),
&
is_wow64
);
LOCALE_Init
();
...
...
include/winbase.h
View file @
03d6da08
...
...
@@ -1726,6 +1726,9 @@ WINBASEAPI VOID WINAPI GetSystemTimeAsFileTime(LPFILETIME);
WINBASEAPI
UINT
WINAPI
GetSystemWindowsDirectoryA
(
LPSTR
,
UINT
);
WINBASEAPI
UINT
WINAPI
GetSystemWindowsDirectoryW
(
LPWSTR
,
UINT
);
#define GetSystemWindowsDirectory WINELIB_NAME_AW(GetSystemWindowsDirectory)
WINBASEAPI
UINT
WINAPI
GetSystemWow64DirectoryA
(
LPSTR
,
UINT
);
WINBASEAPI
UINT
WINAPI
GetSystemWow64DirectoryW
(
LPWSTR
,
UINT
);
#define GetSystemWow64Directory WINELIB_NAME_AW(GetSystemWow64Directory)
WINBASEAPI
DWORD
WINAPI
GetTapeParameters
(
HANDLE
,
DWORD
,
LPDWORD
,
LPVOID
);
WINBASEAPI
DWORD
WINAPI
GetTapePosition
(
HANDLE
,
DWORD
,
LPDWORD
,
LPDWORD
,
LPDWORD
);
WINBASEAPI
DWORD
WINAPI
GetTapeStatus
(
HANDLE
);
...
...
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