Commit 90885060 authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32: Move Wow64Get/SetThreadContext implementation to kernelbase.

parent 124ea59b
......@@ -1638,10 +1638,10 @@
@ stdcall WinExec(str long)
@ stdcall -import Wow64DisableWow64FsRedirection(ptr)
@ stdcall -import Wow64EnableWow64FsRedirection(long)
@ stdcall Wow64GetThreadContext(long ptr)
@ stdcall -import Wow64GetThreadContext(long ptr)
@ stdcall Wow64GetThreadSelectorEntry(long long ptr)
@ stdcall -import Wow64RevertWow64FsRedirection(ptr)
@ stdcall Wow64SetThreadContext(long ptr)
@ stdcall -import Wow64SetThreadContext(long ptr)
# @ stub Wow64SuspendThread
@ stdcall -import WriteConsoleA(long ptr long ptr ptr)
@ stdcall -import WriteConsoleInputA(long ptr long ptr)
......
......@@ -73,35 +73,6 @@ void WINAPI FreeLibraryAndExitThread(HINSTANCE hLibModule, DWORD dwExitCode)
/***********************************************************************
* Wow64SetThreadContext [KERNEL32.@]
*/
BOOL WINAPI Wow64SetThreadContext( HANDLE handle, const WOW64_CONTEXT *context)
{
#ifdef __i386__
return set_ntstatus( NtSetContextThread( handle, (const CONTEXT *)context ));
#elif defined(__x86_64__)
return set_ntstatus( RtlWow64SetThreadContext( handle, context ));
#else
return set_ntstatus( STATUS_NOT_IMPLEMENTED );
#endif
}
/***********************************************************************
* Wow64GetThreadContext [KERNEL32.@]
*/
BOOL WINAPI Wow64GetThreadContext( HANDLE handle, WOW64_CONTEXT *context)
{
#ifdef __i386__
return set_ntstatus( NtGetContextThread( handle, (CONTEXT *)context ));
#elif defined(__x86_64__)
return set_ntstatus( RtlWow64GetThreadContext( handle, context ));
#else
return set_ntstatus( STATUS_NOT_IMPLEMENTED );
#endif
}
/***********************************************************************
* Wow64GetThreadSelectorEntry [KERNEL32.@]
*/
BOOL WINAPI Wow64GetThreadSelectorEntry( HANDLE thread, DWORD selector, WOW64_LDT_ENTRY *selector_entry)
......
......@@ -1759,8 +1759,11 @@
@ stdcall WideCharToMultiByte(long long wstr long ptr long ptr ptr)
@ stdcall Wow64DisableWow64FsRedirection(ptr)
@ stdcall Wow64EnableWow64FsRedirection(long) kernelbase_Wow64EnableWow64FsRedirection
@ stdcall Wow64GetThreadContext(long ptr)
@ stdcall Wow64RevertWow64FsRedirection(ptr)
@ stdcall Wow64SetThreadContext(long ptr)
# @ stub Wow64SetThreadDefaultGuestMachine
# @ stub Wow64SuspendThread
# @ stub -arch=i386 Wow64Transition
@ stdcall WriteConsoleA(long ptr long ptr ptr)
@ stdcall WriteConsoleInputA(long ptr long ptr)
......
......@@ -763,6 +763,36 @@ BOOL WINAPI DECLSPEC_HOTPATCH TlsSetValue( DWORD index, LPVOID value )
/***********************************************************************
* Wow64GetThreadContext (kernelbase.@)
*/
BOOL WINAPI Wow64GetThreadContext( HANDLE handle, WOW64_CONTEXT *context)
{
#ifdef __i386__
return set_ntstatus( NtGetContextThread( handle, (CONTEXT *)context ));
#elif defined(__x86_64__)
return set_ntstatus( RtlWow64GetThreadContext( handle, context ));
#else
return set_ntstatus( STATUS_NOT_IMPLEMENTED );
#endif
}
/***********************************************************************
* Wow64SetThreadContext (kernelbase.@)
*/
BOOL WINAPI Wow64SetThreadContext( HANDLE handle, const WOW64_CONTEXT *context)
{
#ifdef __i386__
return set_ntstatus( NtSetContextThread( handle, (const CONTEXT *)context ));
#elif defined(__x86_64__)
return set_ntstatus( RtlWow64SetThreadContext( handle, context ));
#else
return set_ntstatus( STATUS_NOT_IMPLEMENTED );
#endif
}
/***********************************************************************
* Fibers
***********************************************************************/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment