SetShellWindow()

Martin Fuchs martin-fuchs at gmx.net
Wed Aug 27 07:11:36 CDT 2003


> > +/* globally stored shell window handles */
> > +
> > +static HWND hwndShellWindow = 0;
> > +static HWND hwndShellListView = 0;
> > +
> > +/* id of the process, which currently owns the shell window */
> > +static DWORD pidShellWindow = 0;
>
> You must not store handles or pids in the server, you should store
> pointers to the server objects, and properly handle the case where the
> corresponding window or process gets destroyed.

OK, I moved the server implementation to window.c and replaced the handles and 
IDs by object pointers.

If you want, you can remove those two calls to grab_object() and 
release_object() from the patch. They are not really necessary, since the 
process pointer is allways automatically reset to 0 the time its windows are 
destroyed. And the windows are always destroyed before a process is killed. 
But maybe you want to play safe, and leave the calls in.


Changelog:
* Implement SetShellWindow(), SetShellWindowEx() and GetShellWindow()


-- 
Martin Fuchs
martin-fuchs at gmx.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: setshellwindow2.diff
Type: text/x-diff
Size: 11527 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20030827/02b18eea/setshellwindow2.bin


More information about the wine-patches mailing list