summaryrefslogtreecommitdiff
path: root/sal/systools/win32/uwinapi/GetModuleFileNameExW.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sal/systools/win32/uwinapi/GetModuleFileNameExW.cpp')
-rw-r--r--sal/systools/win32/uwinapi/GetModuleFileNameExW.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/sal/systools/win32/uwinapi/GetModuleFileNameExW.cpp b/sal/systools/win32/uwinapi/GetModuleFileNameExW.cpp
new file mode 100644
index 000000000000..7b95364ec975
--- /dev/null
+++ b/sal/systools/win32/uwinapi/GetModuleFileNameExW.cpp
@@ -0,0 +1,12 @@
+#include "macros.h"
+#include <psapi.h>
+
+IMPLEMENT_THUNK( psapi, WINDOWS, DWORD, WINAPI, GetModuleFileNameExW, (HANDLE hProcess, HMODULE hModule, LPWSTR lpFileNameW, DWORD nSize ) )
+{
+ AUTO_STR( lpFileName, 2 * nSize );
+
+ if ( GetModuleFileNameExA( hProcess, hModule, lpFileNameA, 2 * nSize ) )
+ return STR2WSTR( lpFileName, nSize );
+ else
+ return 0;
+}