From bffa3474f44e79a2f7dd76ffaa42b84f004dcda2 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Sat, 29 Oct 2005 15:05:37 +0000 Subject: [PATCH] implemented the 32 bit version of GetSystemWow64DirectoryA/W (just set the last error code to ERROR_CALL_NOT_IMPLEMENTED) svn path=/trunk/; revision=18852 --- reactos/lib/kernel32/file/curdir.c | 49 ++++++++++++++++++++++++++++++ reactos/lib/kernel32/misc/stubs.c | 28 ----------------- 2 files changed, 49 insertions(+), 28 deletions(-) diff --git a/reactos/lib/kernel32/file/curdir.c b/reactos/lib/kernel32/file/curdir.c index 6255ed432f2..c9dd0b332b6 100644 --- a/reactos/lib/kernel32/file/curdir.c +++ b/reactos/lib/kernel32/file/curdir.c @@ -324,4 +324,53 @@ GetSystemWindowsDirectoryW( return GetWindowsDirectoryW( lpBuffer, uSize ); } +/* + * @unimplemented + */ +UINT +STDCALL +GetSystemWow64DirectoryW( + LPWSTR lpBuffer, + UINT uSize + ) +{ +#ifdef _WIN64 + DPRINT1("GetSystemWow64DirectoryW is UNIMPLEMENTED!\n"); + return 0; +#else + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return 0; +#endif +} + +/* + * @unimplemented + */ +UINT +STDCALL +GetSystemWow64DirectoryA( + LPSTR lpBuffer, + UINT uSize + ) +{ +#ifdef _WIN64 + WCHAR BufferW[MAX_PATH]; + UINT ret; + + ret = GetSystemWow64DirectoryW(BufferW, MAX_PATH); + + if (!ret) return 0; + if (ret > MAX_PATH) + { + SetLastError(ERROR_FILENAME_EXCED_RANGE); + return 0; + } + + return FilenameW2A_FitOrFail(lpBuffer, uSize, BufferW, ret+1); +#else + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return 0; +#endif +} + /* EOF */ diff --git a/reactos/lib/kernel32/misc/stubs.c b/reactos/lib/kernel32/misc/stubs.c index 042ecfc63bc..3b5c9bdb332 100644 --- a/reactos/lib/kernel32/misc/stubs.c +++ b/reactos/lib/kernel32/misc/stubs.c @@ -1145,20 +1145,6 @@ GetModuleHandleExW( return 0; } -/* - * @unimplemented - */ -UINT -STDCALL -GetSystemWow64DirectoryW( - LPWSTR lpBuffer, - UINT uSize - ) -{ - STUB; - return 0; -} - /* * @unimplemented */ @@ -1390,20 +1376,6 @@ GetModuleHandleExA( return 0; } -/* - * @unimplemented - */ -UINT -STDCALL -GetSystemWow64DirectoryA( - LPSTR lpBuffer, - UINT uSize - ) -{ - STUB; - return 0; -} - /* * @unimplemented */