aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/compat.c5
-rw-r--r--source/tests/test_compat.c8
2 files changed, 13 insertions, 0 deletions
diff --git a/source/compat.c b/source/compat.c
index d1ceffc..f1de75c 100644
--- a/source/compat.c
+++ b/source/compat.c
@@ -750,6 +750,11 @@ UINT WINAPI _GetSystemDirectory(LPTSTR lpBuffer, UINT uSize)
return RUN_FUNC(INFO_GETSYSDIR_ENUM, GetSystemDirectoryFunc, lpBuffer, uSize);
}
+UINT WINAPI _GetSystemWow64Directory(LPTSTR lpBuffer, UINT uSize)
+{
+ return RUN_FUNC(INFO_GETSYSWOW64DIR_ENUM, GetSystemDirectoryFunc, lpBuffer, uSize);
+}
+
DWORD WINAPI _GetCurrentDirectory(DWORD nBufferLength, LPTSTR lpBuffer)
{
return RUN_FUNC(INFO_GETCURDIR_ENUM, GetCurrentDirectoryFunc, nBufferLength, lpBuffer);
diff --git a/source/tests/test_compat.c b/source/tests/test_compat.c
index f760a6e..741aa78 100644
--- a/source/tests/test_compat.c
+++ b/source/tests/test_compat.c
@@ -148,5 +148,13 @@ BOOL test_stdio(void)
ERRETCP( wStr != NULL );
COMPAT(free)(wStr);
+ char sysDir[512];
+ char sysWow64Dir[512];
+ UINT sysDirRetVal = _GetSystemDirectory(sysDir, sizeof(sysDir));
+ ERRETCP( sysDirRetVal > 0 && sysDirRetVal <= sizeof(sysDir) );
+ sysDirRetVal = _GetSystemWow64Directory(sysWow64Dir, sizeof(sysWow64Dir));
+ ERRETCP( sysDirRetVal > 0 && sysDirRetVal <= sizeof(sysDir) );
+ ERRETCP( strncmp(sysDir, sysWow64Dir, sizeof(sysDir)) != 0 );
+
return TRUE;
}