Wine Traffic #103 For 11�Sep�2001

By Brian Vincent

Table Of Contents


This is the 103rd release of the Wine's kernel cousin publication. It's main goal is to distribute widely what's going on around Wine (the Un*x windows emulator).

I just got back from traveling and put this together. I was in New York City all of last week and returned late Sunday. Little did I realize I would be one of the last people to see the World Trade Center standing. I still cannot comprehend the tragedy that took place and I feel fortunate all of my friends in the city were scattered in other parts of Manhattan that day. My heart goes out to anyone affected by this disaster.

Anyway... there's been some interesting Wine press. First off, we have Codeweavers announcing their CrossOver Plugin. This is a Linux Netscape browser plugin that allows you to run plugins meant for Windows. For example, you can install Microsoft's Word Viewer program to read those pesky office files. Likewise for Excel. This also mean Quicktime and Shockwave files can be viewed out of the browser. This is excellent work and the Codeweavers team should be commended for the code that has been contributed back into Wine. Check out the press release here: (
and more details here: (

We also saw the release of another vintage of Wine. The full changelog ( can be found in the CVS repository. Noted changes include:

The folks over at ZDNet decided to do a head-to-head shootout among Windows-on-Linux solutions. Included were VMWare products, Win4Lin, WinToNet, and Wine. The article (,14179,2806411,00.html) has a page (,14179,2806411-6,00.html) dedicated to Wine.

Mailing List Stats For This Week

We looked at 176 posts in 698K.

There were 40 different contributors. 27 posted more than once. 19 posted last week too.

The top posters of the week were:

1. Crypto API

16�Aug�2001�-�5�Sep�2001 (10 posts) Archive Link: "CryptoAPI"

People: Patrik Stridvall,�Travis Michielsen,�,�Patrik Stridval

Travis Michielsen posted a message requesting some ideas on implementing the advapi32.dll - the cryptography API that is being used in more and more applications. Currently Microsoft splits this into several small DLL's and Travis was wondering if he should use the same architecture or simply create one monolithic DLL. One large DLL would prevent using the smaller native versions, but it would also be easier to implement using the capabilities of something like the OpenSSL library. Vladimir Vukicevic had also thought about doing the same thing but using libgcrypt from GnuPG. This quickly turned into a licensing issue concerning GPL'ed code. Wine uses the X11 license so it's not possible to ship external GPL'ed libraries with Wine. Patrik Stridvall also noted, " However, OpenSSL's license is incompatible with the GPL, hence any GPL'd applications that wish to use an OpenSSL-backed CryptoAPI implementation would be unable to do so." Travis Michielsen went on to explain:

Hmm, I never thought about libgcrypt, but if we can somehow use it legally then it could be a possible back-end as opposed to or inconjunction with OpenSSL. Naturally, I would prefer not to re-invent the wheel by having to re-write every needed algorithm used in the M$ API, if we can find a library that is legal in all circumstances :-!

But has anyone considered the following:

One thing we should probably do no matter what is contact the developers for both OpenSSL and libgcrpyt and make them aware of out situation. (and possibly see which one or both is willing to bend on their license(s)).

For now Travis is concentrating on stubbing out the DLL. It will be interesting to see how this unfolds.

2. Problem with Specmaker

5�Sep�2001�-�12�Sep�2001 (4 posts) Archive Link: "Problem with specmaker"

People: Guy Albertelli,�Patrik Stridvall,�,�Patrik Stridval,�Guy Alberte

Guy Albertelli was having a problem with specmaker, " Recently had a problem with specmaker not generating prototypes. Traced it down to a problem in I suspect that the preprocessor elimination did not expect multiline condition. I don't know perl so I can't fix it." It seems that if you have a header file that defined something like this:

it would break specmaker.

Patrik Stridvall posted a small patch and noted, " Indeed. Here is a working fix I think (not tested). I found a bug in winapi_check a while ago but the fix didn't find its way the it seems. The problem might also be that there is whitespace after on of the \:es. This is forbidden by ANSI C but most compilers accept it anyway. "

Guy wrote back with a patch of his own and noted, " No the above patch merely resulted in an infinite loop. After much consultation with "Perl in a Nutshell", I came up with the following patch. The header file in question is "shlobj.h". The patch has two sections. First gets rid of the \n imbeded with the lookahead for preprocessor statements. The second gets rid of the ICOM_DEFINE statement (poorly I know) because it has no ";". This seems to make things work and generate correct headers."

3. Keyboard Problem

27�Aug�2001�-�28�Aug�2001 (6 posts) Archive Link: "keyboard problem"

People: Francois Gouget,�,�codeweavers,�Daniel Sabo,�Eric Pouech

Daniel Sabo inquired about work that needed to be done. Francois Gouget posted an updated version of his hefty Call for Volunteers:

Note that I did not get much time to update it so please send me your ideas. Also I'm thinking about starting an additional section for 'hard(er)' projects that would significantly improve Wine. Maybe it could also list projects that are already underway and for which help would be appreciated (DCOM?, STRICT handles?).

But first, many thanks go to all those who fixed bugs from the previous call for volunteers and especially to Maciek Kaliszewski for his wrc fixes.

What is the "Call for Volunteers"? I have built a list of projects that should be easy to tackle by new Wine developpers. The main goal is to provide the needed inspiration to potential Wine developpers that just are not motivated by the standard 'grep FIXME' answer (and I can understand them).

So here goes.


Medium (I expect these would take longer or be a bit harder)

4. PowerDVD on an Unsupported Video Chipset

28�Aug�2001 (3 posts) Archive Link: "Powerdvd running under linux"

People: Robert Lowery,�Francois Gouget,�

Robert Lowery wondered:

Under Windows 98 (using PowerDVD), I get fantastic performance on my Pention 233MMX as it supports YUV->RGB, Motion Compensation and iDCT in hardware. This chipset is not currently supported under Linux.

What do you think the chances are of PowerDVD working with hardware acceleration under WINE/WINEX?

What sort of performance should I expect?

A couple people replied that as long as the chipset is unsupported by Linux that there's no chance of getting it to work. But Francois Gouget went on to explain, " Once XFree86 provides XVideo support for your chipset (or even better, the newer brand of XVideo, the one that also include motion compensation, I don't remember the name), then you may get hardware acceleration in Wine. But I think that currently DDraw does not support hardware acceleration for these things. So it will probably require some work on Wine too."

5. Keyboard Problem

25�Aug�2001�-�26�Aug�2001 (5 posts) Archive Link: "keyboard problem"

People: Stefan Leichter,�Ove Kaaven,�Daniel Sabo,�Gerard Patel,�,�Ove K�ven

Stefan Leichter was trying to get a game to work and ran into some problems with the handling of keyboard input:

after a long time of debugging (because of my little experience with windows programing and debugging), i found the problem that breaks the keyboard input of my favorite game "You Don't Know Jack" (demos of newer versions downloadable at

The problem is that the game is waiting for keyboard input by checking for the messages WM_KEYDOWN, WM_CHAR and WM_KEYUP at least for the keys 1-0 and a-z. But wine generates the messages WM_SYSKEYDOWN, WM_SYSCHAR? and WM_SYSKEYUP.

The problem is in the file "windows/message.c" in the methode "process_raw_keyboard_message" in the line 383:

For some reason i do not understand the message becomes changed. If i remove this line the game recognize the keyboard input and is playable (somehow).

An other option(untested) for the game is to change the line to something like this:

Does anyone know why the message becomes changed? Or does anyone know a better fix for the problem? Is there a program the need the line as it is?

Stefan also explained that he was running this in fullscreen mode using the --desktop option. Ove K�ven replied:

If I remember right, a keyboard message must be changed to a syskey message when one of these conditions are true:

May be others, but I don't think so. Which do you think applies?

Daniel Sabo thought this particular bit was ok, but that the problem might actually lie with the GetFocus since that's relied on for sending messages to the active window. He posted a description of what the function relied on, " The WM_SYSKEYDOWN message is posted to the window with the keyboard focus when the user presses the F10 key or holds down the alt key and then presses another key. It also occurs when now windows has the keyboard focus; in this case, the WM_SYSKEYDOWN message is send to the active window"

Gerard Patel didn't think the problem was actually with GetFocus() , but rather that the active window handling was not behaving like Windows. He also added, " Another possibility (less probable in this case) could be that the Ms doc about WM_SYS* messages is inaccurate or incomplete. "

6. More Window Handling Additions

27�Aug�2001 (6 posts) Archive Link: "Crash in latest version"

People: Gerard Patel,�Alexandre Julliard,�,�Uwe Bonnes

Uwe Bonnes had a problem getting an application to run and noticed it was crashing somewhere it hadn't been. He posted some debugging information and noted some strange changes. Gerard Patel explained:

Windows handles are now generated on the server.

This is a historical moment, btw :-) Now Wine has all the architectural features of Win 95

Not everything is implemented, FindWindow does not yet work across processes for example. But it's an important step nonetheless.

Alexandre Julliard has implemented the 'generation' feature of handles. The higher part of a 32 bit handle is used for a counter that is incremented from a window creation to another, avoiding the age-old problem of windows being deleted, then braindead application trying to use their handles, using newly created windows instead.

He also posted more backtraces for crashes he was having. Alexandre replied that patches had been posted that should fix them.

7. Handling Commandline Arguments

1�Sep�2001 (1 post) Archive Link: "handling in the commandline"

People: Francois Gouget,�

Francois Gouget landed some changes that affected commandline handling. He'd been working on this for a while. Here's what he did:

Some time ago I realized that the command line handling in Wine did not work properly when arguments with spaces or double-quotes are involved. For instance I would start a Wine application like this:

and it would tell me something like this:

Or I would call CreateProcess(... "main \"a b\" c" ...) and main would get:

So I investigated this and found that

So CreateProcess(... "main \"a b\" c" ...) should give me:

I searched for places where we convert command lines to argv lists and reciprocally and modified them to work as on windows. With this patch things should be correct, whether you call a Wine application from Unix, from another Wine application via CreateProcess, or if you call a Unix application from Wine. There's just one little bit in the msvcrt code which I treated in a separate patch (p20010902-cmdline2.diff).

In the process I wrote a few test applications:

I know that there has been discussions about the command line handling before and that some applications do very weird things. Please test this patch and let me know how it goes.

Sharon And Joy

Kernel Traffic is grateful to be developed on a computer donated by Professor Greg Benson and Professor Allan Cruse in the Department of Computer Science at the University of San Francisco. This is the same department that invented FlashMob Computing. Kernel Traffic is hosted by the generous folks at All pages on this site are copyright their original authors, and distributed under the terms of the GNU General Public License version 2.0.