How does Wine communicate?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
roderakker
Level 2
Level 2
Posts: 41
Joined: Thu Mar 04, 2010 3:17 am

How does Wine communicate?

Post by roderakker »

Hello,

Is there a scheme/diagram of how Wine communicates with the Linux Kernel, and how it theoraticly runs the Windows software?

An example would be what I found for ALSA.
http://www.alsa-project.org/~tiwai/lk2k/archtect.gif

Thank you!
Thunderbird
Level 5
Level 5
Posts: 336
Joined: Mon Nov 24, 2008 8:10 am

Post by Thunderbird »

There is no diagram or so like that. Wine is just layered on top of libraries like libc, X11, alsa, opengl and so on. There is no special kernel communication code or so.
hellork
Level 3
Level 3
Posts: 82
Joined: Thu Mar 27, 2008 7:13 pm

Re: How does Wine communicate?

Post by hellork »

I was reading 'man wineserver' the other day and noticed that it says something about programs running under the same $WINEPREFIX have access to the same shared memory, Windows registry, and kernel objects. The wineserver ( http://wiki.jswindle.com/index.php/Wineserver ) starts up when a Windows program starts, providing basic Windows services like, oh I don't know, process and memory management, junk like that.

The executable Windows app runs natively, on the host CPU, so there is no emulation layer, but when it makes a call to basically say something like system("some command"); the command is processed by the linked in msvcrt.dll which then translates that system call to the Linux libc, running the command on the virtual wine "environment" which isn't so much an environment as a lightweight server / client relationship.

I guess if you were to diagram it, as Thunderbird's comment made me think, you would wind up with something that looks like the Windows directory, with a bunch of penguins holding smiling burgundy colored sock puppets representing each Windows DLL... :)
roderakker
Level 2
Level 2
Posts: 41
Joined: Thu Mar 04, 2010 3:17 am

Post by roderakker »

Haha! Well thanks anyway, the information clears quite a bit up. I'm not planning on making a diagram about it myself, though.
Locked