kernel32: Move Wow64Get/SetThreadContext implementation to kernelbase.
This commit is contained in:
parent
124ea59b8d
commit
9088506029
4 changed files with 35 additions and 31 deletions
|
@ -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)
|
||||
|
|
|
@ -72,35 +72,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.@]
|
||||
*/
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -762,6 +762,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
|
||||
***********************************************************************/
|
||||
|
|
Loading…
Add table
Reference in a new issue