X client wrapper for Win apps?

Jehan nahor@bravobrava.com
Thu Sep 19 14:01:00 GMT 2002


Alexander Gottwald wrote:
> On Thu, 19 Sep 2002, Jehan wrote:
> 
> 
>>4. Give me valid point (like the hardware thing) and I'll just up. API
>>compatibility isn't a valid one since it can be easily fix (more easily
>>that writing a new GDI driver).
> 
> 
> Just explain the design you have in mind. Is it
> 
> Application      User32.dll          User32-orig.dll     XWin
> 
>     ------------>LineTo(x,y)----+---->LineTo(x,y)
>                                 |
>                                 +-------------------->shadowDrawLine
> 
> If so, then you must call the xserver drawing function directly
> Application      User32.dll          User32-orig.dll     XLib
> 
>     ------------>LineTo(x,y)----+---->LineTo(x,y)
>                                 |
>                                 +-------------------->XDrawLine
> 
> In this case you have the X11 Protocol overhead again.
> 
> And of course the problem with the replaced User32.dll
> 
> My proposal was
> 
> Application    User32.dll          GDI            DisplayGDI       XLib
> 
>     ---------->LineTo(x,y)---->gdiLineTo(x,y)--->gdiLineTo(x,y)
>                                      |
>                                      +-------------------------->XDrawLine
> 
> This requires the same work as replacing user32 since all exported functions
> from the library must be replace with stubs calling the original functions
> and the code for converting the calls to X11 or the Xserver functions
> must be written.


Ok, if I read correctly between the lines, I think I know where my 
problem is. Is user32.dll and the "GDI driver" the same thing? Or is the 
"GDI driver" like my video card driver or my audio card driver?

Because, actually, my biggest problem is to have the User32.dll being 
replaced. From the way I see it, it's one of the core dll from Windows. 
My fear then is that, if we replace that DLL, Windows will start to fall 
apart because (1) the dll isn't 100% compatible or (2) the next Windows 
update will refuse to work because the checksum won't match anymore or 
(3) the update will "patch" the DLL but makes it completely unusable 
because function entries are not at the address or something like. In 
short, that since the DLL won't be the same, something will break sooner 
or later and make my system unusable. A dll, in theory, is supposed to 
be replacable by another one having the same API, in pratice, it's not. 
If XFree replaces my User32.dll, I don't think I'll to use it anymore. 
Too risky.

A driver, in the other hand, seems to be more easily replacable. I 
haven't heard yet of Windows keeping several versions of a driver and 
using the one that matches a given application.

	Jehan





More information about the Cygwin-xfree mailing list