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 */