kernel32: Forward the Wow64 redirection functions to ntdll.

This commit is contained in:
Alexandre Julliard 2009-07-06 15:09:29 +02:00
parent 747d58d211
commit 26caf2fdda
3 changed files with 23 additions and 6 deletions

View File

@ -1144,6 +1144,7 @@
@ stdcall WaitNamedPipeW (wstr long) @ stdcall WaitNamedPipeW (wstr long)
@ stdcall WideCharToMultiByte(long long wstr long ptr long ptr ptr) @ stdcall WideCharToMultiByte(long long wstr long ptr long ptr ptr)
@ stdcall WinExec(str long) @ stdcall WinExec(str long)
@ stdcall Wow64EnableWow64FsRedirection(long)
@ stdcall Wow64DisableWow64FsRedirection(ptr) @ stdcall Wow64DisableWow64FsRedirection(ptr)
@ stdcall Wow64RevertWow64FsRedirection(ptr) @ stdcall Wow64RevertWow64FsRedirection(ptr)
@ stdcall WriteConsoleA(long ptr long ptr ptr) @ stdcall WriteConsoleA(long ptr long ptr ptr)

View File

@ -1539,24 +1539,37 @@ UINT WINAPI GetSystemWow64DirectoryA( LPSTR lpBuffer, UINT uSize )
return 0; return 0;
} }
/***********************************************************************
* Wow64EnableWow64FsRedirection (KERNEL32.@)
*/
BOOLEAN WINAPI Wow64EnableWow64FsRedirection( BOOLEAN enable )
{
NTSTATUS status = RtlWow64EnableFsRedirection( enable );
if (status) SetLastError( RtlNtStatusToDosError(status) );
return !status;
}
/*********************************************************************** /***********************************************************************
* Wow64DisableWow64FsRedirection (KERNEL32.@) * Wow64DisableWow64FsRedirection (KERNEL32.@)
*/ */
BOOL WINAPI Wow64DisableWow64FsRedirection( PVOID *old_value ) BOOL WINAPI Wow64DisableWow64FsRedirection( PVOID *old_value )
{ {
FIXME("%p\n", old_value); NTSTATUS status = RtlWow64EnableFsRedirectionEx( TRUE, (ULONG *)old_value );
if (status) SetLastError( RtlNtStatusToDosError(status) );
if (old_value) *old_value = (void *)0xdeadbeef; return !status;
return TRUE;
} }
/*********************************************************************** /***********************************************************************
* Wow64RevertWow64FsRedirection (KERNEL32.@) * Wow64RevertWow64FsRedirection (KERNEL32.@)
*/ */
BOOL WINAPI Wow64RevertWow64FsRedirection( PVOID old_value ) BOOL WINAPI Wow64RevertWow64FsRedirection( PVOID old_value )
{ {
FIXME("%p\n", old_value); NTSTATUS status = RtlWow64EnableFsRedirection( (UINT_PTR)old_value );
return TRUE; if (status) SetLastError( RtlNtStatusToDosError(status) );
return !status;
} }

View File

@ -2143,6 +2143,9 @@ WINBASEAPI BOOL WINAPI WaitNamedPipeA(LPCSTR,DWORD);
WINBASEAPI BOOL WINAPI WaitNamedPipeW(LPCWSTR,DWORD); WINBASEAPI BOOL WINAPI WaitNamedPipeW(LPCWSTR,DWORD);
#define WaitNamedPipe WINELIB_NAME_AW(WaitNamedPipe) #define WaitNamedPipe WINELIB_NAME_AW(WaitNamedPipe)
WINBASEAPI UINT WINAPI WinExec(LPCSTR,UINT); WINBASEAPI UINT WINAPI WinExec(LPCSTR,UINT);
WINBASEAPI BOOL WINAPI Wow64DisableWow64FsRedirection(PVOID*);
WINBASEAPI BOOLEAN WINAPI Wow64EnableWow64FsRedirection(BOOLEAN);
WINBASEAPI BOOL WINAPI Wow64RevertWow64FsRedirection(PVOID);
WINBASEAPI BOOL WINAPI WriteFile(HANDLE,LPCVOID,DWORD,LPDWORD,LPOVERLAPPED); WINBASEAPI BOOL WINAPI WriteFile(HANDLE,LPCVOID,DWORD,LPDWORD,LPOVERLAPPED);
WINBASEAPI BOOL WINAPI WriteFileEx(HANDLE,LPCVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE); WINBASEAPI BOOL WINAPI WriteFileEx(HANDLE,LPCVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE);
WINBASEAPI BOOL WINAPI WriteFileGather(HANDLE,FILE_SEGMENT_ELEMENT*,DWORD,LPDWORD,LPOVERLAPPED); WINBASEAPI BOOL WINAPI WriteFileGather(HANDLE,FILE_SEGMENT_ELEMENT*,DWORD,LPDWORD,LPOVERLAPPED);