summaryrefslogtreecommitdiff
path: root/sal/systools/win32/uwinapi/GetModuleFileNameExW.cpp
blob: 7b95364ec97559d4fd236e5719a41ca40225bd37 (plain)
1
2
3
4
5
6
7
8
9
10
11
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;
}