update dev300-m58
[ooovba.git] / sal / systools / win32 / uwinapi / GetModuleFileNameExW.cpp
blob1f952792241f033fa4b660b88c99a0d44068c1fd
1 #include "macros.h"
2 #ifdef _MSC_VER
3 #pragma warning(push,1) // disable warnings within system headers
4 #endif
5 #include <psapi.h>
6 #ifdef _MSC_VER
7 #pragma warning(pop)
8 #endif
10 IMPLEMENT_THUNK( psapi, WINDOWS, DWORD, WINAPI, GetModuleFileNameExW, (HANDLE hProcess, HMODULE hModule, LPWSTR lpFileNameW, DWORD nSize ) )
12 AUTO_STR( lpFileName, 2 * nSize );
14 if ( GetModuleFileNameExA( hProcess, hModule, lpFileNameA, 2 * nSize ) )
15 return (DWORD) STR2WSTR( lpFileName, nSize );
16 else
17 return 0;