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
4405195b
Commit
4405195b
authored
Nov 12, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Move GetSystemWow64Directory() functions to kernelbase.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bf039539
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
48 deletions
+37
-48
kernel32.spec
dlls/kernel32/kernel32.spec
+2
-2
path.c
dlls/kernel32/path.c
+0
-42
file.c
dlls/kernelbase/file.c
+28
-0
kernelbase.h
dlls/kernelbase/kernelbase.h
+3
-0
kernelbase.spec
dlls/kernelbase/kernelbase.spec
+2
-2
main.c
dlls/kernelbase/main.c
+2
-0
registry.c
dlls/kernelbase/registry.c
+0
-2
No files found.
dlls/kernel32/kernel32.spec
View file @
4405195b
...
@@ -837,8 +837,8 @@
...
@@ -837,8 +837,8 @@
@ stdcall GetSystemTimes(ptr ptr ptr)
@ stdcall GetSystemTimes(ptr ptr ptr)
@ stdcall -import GetSystemWindowsDirectoryA(ptr long)
@ stdcall -import GetSystemWindowsDirectoryA(ptr long)
@ stdcall -import GetSystemWindowsDirectoryW(ptr long)
@ stdcall -import GetSystemWindowsDirectoryW(ptr long)
@ stdcall GetSystemWow64DirectoryA(ptr long)
@ stdcall
-import
GetSystemWow64DirectoryA(ptr long)
@ stdcall GetSystemWow64DirectoryW(ptr long)
@ stdcall
-import
GetSystemWow64DirectoryW(ptr long)
@ stdcall GetTapeParameters(ptr long ptr ptr)
@ stdcall GetTapeParameters(ptr long ptr ptr)
@ stdcall GetTapePosition(ptr long ptr ptr ptr)
@ stdcall GetTapePosition(ptr long ptr ptr ptr)
@ stdcall GetTapeStatus(ptr)
@ stdcall GetTapeStatus(ptr)
...
...
dlls/kernel32/path.c
View file @
4405195b
...
@@ -850,48 +850,6 @@ UINT WINAPI GetSystemDirectoryA( LPSTR path, UINT count )
...
@@ -850,48 +850,6 @@ UINT WINAPI GetSystemDirectoryA( LPSTR path, UINT count )
/***********************************************************************
/***********************************************************************
* GetSystemWow64DirectoryW (KERNEL32.@)
*
* As seen on MSDN
* - On Win32 we should return ERROR_CALL_NOT_IMPLEMENTED
* - On Win64 we should return the SysWow64 (system64) directory
*/
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
;
}
/***********************************************************************
* GetSystemWow64DirectoryA (KERNEL32.@)
*
* See comment for GetWindowsWow64DirectoryW.
*/
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
);
}
/***********************************************************************
* Wow64EnableWow64FsRedirection (KERNEL32.@)
* Wow64EnableWow64FsRedirection (KERNEL32.@)
*/
*/
BOOLEAN
WINAPI
Wow64EnableWow64FsRedirection
(
BOOLEAN
enable
)
BOOLEAN
WINAPI
Wow64EnableWow64FsRedirection
(
BOOLEAN
enable
)
...
...
dlls/kernelbase/file.c
View file @
4405195b
...
@@ -1262,6 +1262,34 @@ UINT WINAPI DECLSPEC_HOTPATCH GetSystemWindowsDirectoryW( LPWSTR path, UINT coun
...
@@ -1262,6 +1262,34 @@ UINT WINAPI DECLSPEC_HOTPATCH GetSystemWindowsDirectoryW( LPWSTR path, UINT coun
/***********************************************************************
/***********************************************************************
* GetSystemWow64DirectoryA (kernelbase.@)
*/
UINT
WINAPI
/* DECLSPEC_HOTPATCH */
GetSystemWow64DirectoryA
(
LPSTR
path
,
UINT
count
)
{
if
(
!
is_win64
&&
!
is_wow64
)
{
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
0
;
}
return
copy_filename_WtoA
(
get_machine_wow64_dir
(
IMAGE_FILE_MACHINE_I386
),
path
,
count
);
}
/***********************************************************************
* GetSystemWow64DirectoryW (kernelbase.@)
*/
UINT
WINAPI
/* DECLSPEC_HOTPATCH */
GetSystemWow64DirectoryW
(
LPWSTR
path
,
UINT
count
)
{
if
(
!
is_win64
&&
!
is_wow64
)
{
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
0
;
}
return
copy_filename
(
get_machine_wow64_dir
(
IMAGE_FILE_MACHINE_I386
),
path
,
count
);
}
/***********************************************************************
* GetSystemWow64Directory2A (kernelbase.@)
* GetSystemWow64Directory2A (kernelbase.@)
*/
*/
UINT
WINAPI
DECLSPEC_HOTPATCH
GetSystemWow64Directory2A
(
LPSTR
path
,
UINT
count
,
WORD
machine
)
UINT
WINAPI
DECLSPEC_HOTPATCH
GetSystemWow64Directory2A
(
LPSTR
path
,
UINT
count
,
WORD
machine
)
...
...
dlls/kernelbase/kernelbase.h
View file @
4405195b
...
@@ -30,6 +30,9 @@ extern void init_startup_info( RTL_USER_PROCESS_PARAMETERS *params ) DECLSPEC_HI
...
@@ -30,6 +30,9 @@ extern void init_startup_info( RTL_USER_PROCESS_PARAMETERS *params ) DECLSPEC_HI
extern
const
WCHAR
windows_dir
[]
DECLSPEC_HIDDEN
;
extern
const
WCHAR
windows_dir
[]
DECLSPEC_HIDDEN
;
extern
const
WCHAR
system_dir
[]
DECLSPEC_HIDDEN
;
extern
const
WCHAR
system_dir
[]
DECLSPEC_HIDDEN
;
static
const
BOOL
is_win64
=
(
sizeof
(
void
*
)
>
sizeof
(
int
));
extern
BOOL
is_wow64
DECLSPEC_HIDDEN
;
extern
HANDLE
kernel32_handle
DECLSPEC_HIDDEN
;
extern
HANDLE
kernel32_handle
DECLSPEC_HIDDEN
;
static
inline
BOOL
is_console_handle
(
HANDLE
h
)
static
inline
BOOL
is_console_handle
(
HANDLE
h
)
...
...
dlls/kernelbase/kernelbase.spec
View file @
4405195b
...
@@ -703,8 +703,8 @@
...
@@ -703,8 +703,8 @@
@ stdcall GetSystemWindowsDirectoryW(ptr long)
@ stdcall GetSystemWindowsDirectoryW(ptr long)
@ stdcall GetSystemWow64Directory2A(ptr long long)
@ stdcall GetSystemWow64Directory2A(ptr long long)
@ stdcall GetSystemWow64Directory2W(ptr long long)
@ stdcall GetSystemWow64Directory2W(ptr long long)
@ stdcall GetSystemWow64DirectoryA(ptr long)
kernel32.GetSystemWow64DirectoryA
@ stdcall GetSystemWow64DirectoryA(ptr long)
@ stdcall GetSystemWow64DirectoryW(ptr long)
kernel32.GetSystemWow64DirectoryW
@ stdcall GetSystemWow64DirectoryW(ptr long)
# @ stub GetTargetPlatformContext
# @ stub GetTargetPlatformContext
@ stdcall GetTempFileNameA(str str long ptr)
@ stdcall GetTempFileNameA(str str long ptr)
@ stdcall GetTempFileNameW(wstr wstr long ptr)
@ stdcall GetTempFileNameW(wstr wstr long ptr)
...
...
dlls/kernelbase/main.c
View file @
4405195b
...
@@ -35,6 +35,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(kernelbase);
...
@@ -35,6 +35,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(kernelbase);
HANDLE
kernel32_handle
=
0
;
HANDLE
kernel32_handle
=
0
;
BOOL
is_wow64
=
FALSE
;
/***********************************************************************
/***********************************************************************
* DllMain
* DllMain
...
@@ -44,6 +45,7 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
...
@@ -44,6 +45,7 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
if
(
reason
==
DLL_PROCESS_ATTACH
)
if
(
reason
==
DLL_PROCESS_ATTACH
)
{
{
DisableThreadLibraryCalls
(
hinst
);
DisableThreadLibraryCalls
(
hinst
);
IsWow64Process
(
GetCurrentProcess
(),
&
is_wow64
);
kernel32_handle
=
GetModuleHandleA
(
"kernel32.dll"
);
kernel32_handle
=
GetModuleHandleA
(
"kernel32.dll"
);
init_startup_info
(
NtCurrentTeb
()
->
Peb
->
ProcessParameters
);
init_startup_info
(
NtCurrentTeb
()
->
Peb
->
ProcessParameters
);
}
}
...
...
dlls/kernelbase/registry.c
View file @
4405195b
...
@@ -108,8 +108,6 @@ static struct list reg_mui_cache = LIST_INIT(reg_mui_cache); /* MRU */
...
@@ -108,8 +108,6 @@ static struct list reg_mui_cache = LIST_INIT(reg_mui_cache); /* MRU */
static
unsigned
int
reg_mui_cache_count
;
static
unsigned
int
reg_mui_cache_count
;
#define REG_MUI_CACHE_SIZE 8
#define REG_MUI_CACHE_SIZE 8
static
const
BOOL
is_win64
=
(
sizeof
(
void
*
)
>
sizeof
(
int
));
/* check if value type needs string conversion (Ansi<->Unicode) */
/* check if value type needs string conversion (Ansi<->Unicode) */
static
inline
BOOL
is_string
(
DWORD
type
)
static
inline
BOOL
is_string
(
DWORD
type
)
{
{
...
...
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