user32: Implement GetWindowModuleFileName with tests

Maarten Lankhorst m.b.lankhorst at gmail.com
Fri Feb 8 16:35:35 CST 2008


Hi folks,

2008/2/8, Dmitry Timoshkov <dmitry at codeweavers.com>:
> "Dmitry Timoshkov" <dmitry at codeweavers.com> wrote:
>
> >> +    hproc = OpenProcess(PROCESS_QUERY_INFORMATION, 0, pid);
> >
> > After reading MSDN and guessing from the API name shouldn't it
> > simply fetch GWL_HINSTANCE and call GetModuleFileName on it?
>
> And after looking at GetModuleFileNameW implementation, shouldn't it
> treat hModule == 0 as GetModuleHandle(0) and not be 16-bit specific?
> Guess this all needs a test case.

I've tried to do the GetWindowLongPtr GWLP_HINSTANCE thing but it
seems to always return 0 in wine, which according to msdn means error,
but it could just be not set in wine. Perhaps GWLP_HINSTANCE needs to
be set when the window is being created?

Cheers,
Maarten.



More information about the wine-devel mailing list