kernel32: Move GetSystemWow64Directory() functions to kernelbase.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
bf03953942
commit
4405195b3c
|
@ -837,8 +837,8 @@
|
|||
@ stdcall GetSystemTimes(ptr ptr ptr)
|
||||
@ stdcall -import GetSystemWindowsDirectoryA(ptr long)
|
||||
@ stdcall -import GetSystemWindowsDirectoryW(ptr long)
|
||||
@ stdcall GetSystemWow64DirectoryA(ptr long)
|
||||
@ stdcall GetSystemWow64DirectoryW(ptr long)
|
||||
@ stdcall -import GetSystemWow64DirectoryA(ptr long)
|
||||
@ stdcall -import GetSystemWow64DirectoryW(ptr long)
|
||||
@ stdcall GetTapeParameters(ptr long ptr ptr)
|
||||
@ stdcall GetTapePosition(ptr long ptr ptr ptr)
|
||||
@ stdcall GetTapeStatus(ptr)
|
||||
|
|
|
@ -849,48 +849,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.@)
|
||||
*/
|
||||
|
|
|
@ -1261,6 +1261,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.@)
|
||||
*/
|
||||
|
|
|
@ -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 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;
|
||||
|
||||
static inline BOOL is_console_handle(HANDLE h)
|
||||
|
|
|
@ -703,8 +703,8 @@
|
|||
@ stdcall GetSystemWindowsDirectoryW(ptr long)
|
||||
@ stdcall GetSystemWow64Directory2A(ptr long long)
|
||||
@ stdcall GetSystemWow64Directory2W(ptr long long)
|
||||
@ stdcall GetSystemWow64DirectoryA(ptr long) kernel32.GetSystemWow64DirectoryA
|
||||
@ stdcall GetSystemWow64DirectoryW(ptr long) kernel32.GetSystemWow64DirectoryW
|
||||
@ stdcall GetSystemWow64DirectoryA(ptr long)
|
||||
@ stdcall GetSystemWow64DirectoryW(ptr long)
|
||||
# @ stub GetTargetPlatformContext
|
||||
@ stdcall GetTempFileNameA(str str long ptr)
|
||||
@ stdcall GetTempFileNameW(wstr wstr long ptr)
|
||||
|
|
|
@ -35,6 +35,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(kernelbase);
|
|||
|
||||
|
||||
HANDLE kernel32_handle = 0;
|
||||
BOOL is_wow64 = FALSE;
|
||||
|
||||
/***********************************************************************
|
||||
* DllMain
|
||||
|
@ -44,6 +45,7 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
|||
if (reason == DLL_PROCESS_ATTACH)
|
||||
{
|
||||
DisableThreadLibraryCalls( hinst );
|
||||
IsWow64Process( GetCurrentProcess(), &is_wow64 );
|
||||
kernel32_handle = GetModuleHandleA( "kernel32.dll" );
|
||||
init_startup_info( NtCurrentTeb()->Peb->ProcessParameters );
|
||||
}
|
||||
|
|
|
@ -108,8 +108,6 @@ static struct list reg_mui_cache = LIST_INIT(reg_mui_cache); /* MRU */
|
|||
static unsigned int reg_mui_cache_count;
|
||||
#define REG_MUI_CACHE_SIZE 8
|
||||
|
||||
static const BOOL is_win64 = (sizeof(void *) > sizeof(int));
|
||||
|
||||
/* check if value type needs string conversion (Ansi<->Unicode) */
|
||||
static inline BOOL is_string( DWORD type )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue