user32: Implement GetWindowModuleFileName.

This commit is contained in:
Dmitry Timoshkov 2008-05-13 15:49:35 +09:00 committed by Alexandre Julliard
parent 8253824669
commit 90f0795971
2 changed files with 33 additions and 9 deletions

View File

@ -378,7 +378,7 @@
@ stdcall GetWindowLongPtrA(long long) @ stdcall GetWindowLongPtrA(long long)
@ stdcall GetWindowLongPtrW(long long) @ stdcall GetWindowLongPtrW(long long)
@ stdcall GetWindowLongW(long long) @ stdcall GetWindowLongW(long long)
# @ stub GetWindowModuleFileName @ stdcall GetWindowModuleFileName(long ptr long) GetWindowModuleFileNameA
@ stdcall GetWindowModuleFileNameA(long ptr long) @ stdcall GetWindowModuleFileNameA(long ptr long)
@ stdcall GetWindowModuleFileNameW(long ptr long) @ stdcall GetWindowModuleFileNameW(long ptr long)
@ stdcall GetWindowPlacement(long ptr) @ stdcall GetWindowPlacement(long ptr)

View File

@ -3162,21 +3162,45 @@ BOOL WINAPI DragDetect( HWND hWnd, POINT pt )
/****************************************************************************** /******************************************************************************
* GetWindowModuleFileNameA (USER32.@) * GetWindowModuleFileNameA (USER32.@)
*/ */
UINT WINAPI GetWindowModuleFileNameA( HWND hwnd, LPSTR lpszFileName, UINT cchFileNameMax) UINT WINAPI GetWindowModuleFileNameA( HWND hwnd, LPSTR module, UINT size )
{ {
FIXME("GetWindowModuleFileNameA(hwnd %p, lpszFileName %p, cchFileNameMax %u) stub!\n", WND *win;
hwnd, lpszFileName, cchFileNameMax); HINSTANCE hinst;
return 0;
TRACE( "%p, %p, %u\n", hwnd, module, size );
win = WIN_GetPtr( hwnd );
if (!win || win == WND_OTHER_PROCESS || win == WND_DESKTOP)
{
SetLastError( ERROR_INVALID_WINDOW_HANDLE );
return 0;
}
hinst = win->hInstance;
WIN_ReleasePtr( win );
return GetModuleFileNameA( hinst, module, size );
} }
/****************************************************************************** /******************************************************************************
* GetWindowModuleFileNameW (USER32.@) * GetWindowModuleFileNameW (USER32.@)
*/ */
UINT WINAPI GetWindowModuleFileNameW( HWND hwnd, LPWSTR lpszFileName, UINT cchFileNameMax) UINT WINAPI GetWindowModuleFileNameW( HWND hwnd, LPWSTR module, UINT size )
{ {
FIXME("GetWindowModuleFileNameW(hwnd %p, lpszFileName %p, cchFileNameMax %u) stub!\n", WND *win;
hwnd, lpszFileName, cchFileNameMax); HINSTANCE hinst;
return 0;
TRACE( "%p, %p, %u\n", hwnd, module, size );
win = WIN_GetPtr( hwnd );
if (!win || win == WND_OTHER_PROCESS || win == WND_DESKTOP)
{
SetLastError( ERROR_INVALID_WINDOW_HANDLE );
return 0;
}
hinst = win->hInstance;
WIN_ReleasePtr( win );
return GetModuleFileNameW( hinst, module, size );
} }
/****************************************************************************** /******************************************************************************