Message: 3 To: Mike Hearn mike@theoretic.com Cc: wine-devel@winehq.com Subject: Re: resend - system tray support From: Alexandre Julliard julliard@winehq.org Date: Mon, 15 Sep 2003 11:20:42 -0700
Mike Hearn mike@theoretic.com writes:
I'm going to keep sending this flipping patch until it gets in, or I find out what the next problem is you know. There's no escape! :)
Well, at least the critical section handling is broken, but the real problem is that all this stuff doesn't belong in shell32. We should really redesign it to get rid of the internal WS_EX_TRAYWINDOW flag and have a separate process to manage the tray window (plus other background tasks like the progman DDE interface, and maybe the desktop window too).
Under W2K this is mostly implemented in shell32.dll. Most of what Explorer actually is, including the progman DDE interface, is implemented in shell32.dll and intialized by the shell explorer instance. This does not mean that Wine has to do it this way, but if Wine ever gets to the point where DLLs are drop in replacements for the native ones, this functionality would eventuelly have to be implemented in shell32 or at least have to be exported by it somehow.
Rolf Kalbermatter
"Rolf Kalbermatter" rolf.kalbermatter@citeng.com wrote:
Under W2K this is mostly implemented in shell32.dll. Most of what Explorer actually is, including the progman DDE interface, is implemented in shell32.dll and intialized by the shell explorer instance.
No, at least progman DDE interface is not a part of shell32.
Dmitry Timoshkov [mailto:dmitry@baikal.ru] wrote:
"Rolf Kalbermatter" rolf.kalbermatter@citeng.com wrote:
Under W2K this is mostly implemented in shell32.dll. Most
of what Explorer
actually is, including the progman DDE interface, is implemented in shell32.dll and intialized by the shell explorer instance.
No, at least progman DDE interface is not a part of shell32.
I may be wrong here but have you looked at the SHRegisterShellDDE() function in shell32.dll (W2K)? This function certainly registers a PROGMAN DDE service and a lot more!
It's probably called by the first Explorer instance running as desktop shell. I haven't gone further into details but this indicates to me, that a lot of that functionality is implemented in shell32.dll although it remains to be found under which context it is executed.
Rolf Kalbermatter
"Rolf Kalbermatter" rolf.kalbermatter@citeng.com wrote:
I may be wrong here but have you looked at the SHRegisterShellDDE() function in shell32.dll (W2K)? This function certainly registers a PROGMAN DDE service and a lot more!
Where did you find this one? Neither Wine nor win2k SP4 has an export with that name.
Dmitry Timoshkov [mailto:dmitry@baikal.ru] wrote:
"Rolf Kalbermatter" rolf.kalbermatter@citeng.com wrote:
I may be wrong here but have you looked at the SHRegisterShellDDE() function in shell32.dll (W2K)? This function certainly
registers a PROGMAN DDE
service and a lot more!
Where did you find this one? Neither Wine nor win2k SP4 has an export with that name.
Probably my fault. It must be a name I have come up.
It is ordinal 188 on my win2k version 5.0, build 3315, shell32.dll.
And Wine currently doesn't export ordinal 188 from shell32.dll at all.
The declaration I have come up with would be
void SHRegisterShellDDE(BOOL start);
But I haven't committed anything as patch yet as that whole business is far from working in any way. Maybe I should sent in a patch with a stub implementation at least.
Rolf Kalbermatter
"Rolf Kalbermatter" rolf.kalbermatter@citeng.com wrote:
Where did you find this one? Neither Wine nor win2k SP4 has an export with that name.
Probably my fault. It must be a name I have come up.
It is ordinal 188 on my win2k version 5.0, build 3315, shell32.dll.
And Wine currently doesn't export ordinal 188 from shell32.dll at all.
The declaration I have come up with would be
void SHRegisterShellDDE(BOOL start);
In any case I couldn't find the corresponding strings commands in shell32 at all: CreateGroup, ShowGroup, AddItem, etc. in ASCII or unicode form. Even the word "progman" exists only in the exported names SetProgmanWindow and GetProgmanWindow, although progman DDE interface must have an atom with that name.
At 21:35 17.09.2003 +0900, Dmitry Timoshkov wrote:
"Rolf Kalbermatter" rolf.kalbermatter@citeng.com wrote:
Where did you find this one? Neither Wine nor win2k SP4 has an export with that name.
Probably my fault. It must be a name I have come up.
It is ordinal 188 on my win2k version 5.0, build 3315, shell32.dll.
And Wine currently doesn't export ordinal 188 from shell32.dll at all.
The declaration I have come up with would be
void SHRegisterShellDDE(BOOL start);
In any case I couldn't find the corresponding strings commands in shell32 at all: CreateGroup, ShowGroup, AddItem, etc. in ASCII or unicode form. Even the word "progman" exists only in the exported names SetProgmanWindow and GetProgmanWindow, although progman DDE interface must have an atom with that name.
Check a Win9x version of shell32.dll; also check shdocvw.dll (ordinal 118) and shdocvw401.dll. One of them exports the function by name on some Win9x version. The correct name is "ShellDDEInit". I'm not sure where the true implementation is located, but using ordinal 118 from shdocvw.dll works beautifully on every windows version which has that DLL. I suspect however that it is only a redirect to the true implementation which may be inside shell32.dll or somewhere else. *shrug*
I have no idea though where the connection to the system tray is (I didn't follow the thread from the beginning). Granted, a few items such as the "open network connections" menu entry in the context menu of the DUN icon depend on the presence of a DDE server, but the system tray itself works fine without it.
"ilmcuts" ilmcuts@gmx.net wrote:
Check a Win9x version of shell32.dll; also check shdocvw.dll (ordinal 118) and shdocvw401.dll. One of them exports the function by name on some Win9x version. The correct name is "ShellDDEInit". I'm not sure where the true implementation is located, but using ordinal 118 from shdocvw.dll works beautifully on every windows version which has that DLL. I suspect however that it is only a redirect to the true implementation which may be inside shell32.dll or somewhere else. *shrug*
After looking again at the shell32 from win2k SP4 I've found that it really has the strings used by the progman DDE interface. The reason why I didn't find the first time is that strings are spread over the code section. So, yes, it seems that at least the progman DDE interface handler is residing in shell32. Now the question is: how we should implement it? Just add a necessary atom "progman" and create a hidden window on dll load event, or wait for some apparently undocumented API call and initialize only then?
P.S. Rolf, my apologies for not looking carefully enough first time around.
Dmitry Timoshkov [mailto:dmitry@baikal.ru] wrote:
"ilmcuts" ilmcuts@gmx.net wrote:
Check a Win9x version of shell32.dll; also check
shdocvw.dll (ordinal 118)
and shdocvw401.dll. One of them exports the function by name on some Win9x version. The correct name is "ShellDDEInit". I'm not sure where the true implementation is located, but using ordinal 118 from shdocvw.dll works beautifully on every windows version which has that DLL. I suspect however that it is only a redirect to the true implementation which may be inside shell32.dll or somewhere else. *shrug*
After looking again at the shell32 from win2k SP4 I've found that it really has the strings used by the progman DDE interface. The reason why I didn't find the first time is that strings are spread over the code section. So, yes, it seems that at least the progman DDE interface handler is residing in shell32. Now the question is: how we should implement it? Just add a necessary atom "progman" and create a hidden window on dll load event, or wait for some apparently undocumented API call and initialize only then?
Well, I suspect that the first Explorer instance implementing the desktop is probably expected to call that API as well as several others. Ordinal 200 (its current name SHLocalAlloc() is a little bit misleading here) for instance registers a Progman window class and creates a Program Manager window which presumably serves as desktop. It also establishes a link to OLE32 by loading it for later weak linking to its functionality and initializes it by calling OleInitialize()
Ordinal 188 as explained earlier registers a GlobalAtom "PROGMAN" as well as registering DDE services for "Progman", "Shell", and "Folders".
P.S. Rolf, my apologies for not looking carefully enough first time around.
No offense taken. I just wondered if I had gotten a special W2K build somehow ;-)
Rolf Kalbermatter