"Maarten Lankhorst" m.b.lankhorst@gmail.com writes:
@@ -3121,9 +3133,21 @@ UINT WINAPI GetWindowModuleFileNameA( HWND hwnd, LPSTR lpszFileName, UINT cchFil */ UINT WINAPI GetWindowModuleFileNameW( HWND hwnd, LPWSTR lpszFileName, UINT cchFileNameMax) {
- FIXME("GetWindowModuleFileNameW(hwnd %p, lpszFileName %p, cchFileNameMax %u) stub!\n",
hwnd, lpszFileName, cchFileNameMax);
- return 0;
- HINSTANCE hInst;
- UINT ret;
- TRACE("hwnd %p, lpszFileName %p, cchFileNameMax %u\n", hwnd, lpszFileName, cchFileNameMax);
- hInst = (HINSTANCE)GetWindowLongPtrW(hwnd, GWLP_HINSTANCE);
- if (!hInst)
- {
if (hwnd == GetDesktopWindow() || !IsWindow(hwnd))
return 0;
hInst = GetModuleHandleW(0);
- }
- ret = GetModuleFileNameW(hInst, lpszFileName, cchFileNameMax);
- TRACE("--> %d %s\n", ret, debugstr_wn(lpszFileName, ret));
- return ret;
This won't work across processes.