Re: PeekNamedPipe
Ove Kaaven <[email protected]>
| Newsgroups | gmane.comp.emulators.winex.devel |
|---|---|
| Organization | TransGaming Technologies Inc |
| Message-ID | <1063632537.7908.34.camel@renegade> |
man, 15.09.2003 kl. 06.41 skrev Marcelo Bezerra: > Hello, > I've been trying to run Valve's Steam under winex and has not achieved > success. > > Aparently it depends on PeekNamedPipe, wich is only a stub and is a > kernel32 function, so no native dll would help. If it's just PeekNamedPipe that's missing, it seems there is an X11-licensed patch out there for it: http://cvs.winehq.com/patch.py?id=1027556523118134763863967 Uwe Bonnes is among the Wine guys that license their patches to ReWind and therefore lets WineX use it too. This patch is not complete, nor perfect (and even now, after further refinement, the Wine guys still seem to not have it quite right in all cases), but it should answer most of your questions. No other named pipe patches are X11-licensed as far as I can see, so if this patch is not enough, us WineX people have to do it ourselves... > I would like some help in implementing this function, google sugested > using recvfrom with MSG_PEEK flag set but I have some doubts about it. What doubts? It could work. > Where is HANDLE struct defined? It's an opaque pointer, void*, it's not a particular struct. It can point to pretty much anything depending on what kind of object the handle is for. For Win32 kernel objects (such as files and pipes), it's not a pointer, it's an index into a per-process handle table maintained by the wineserver. > How to relate it to the actual file descriptor in unix? FILE_GetUnixHandle() asks the wineserver for a unix file descriptor. Since this is a dup()-like operation, you must close this file descriptor when you're done with it. > How to find out the pipemode of such HANDLE? Not sure... if you need to know, it may be necessary to extend the wineserver protocol, if you can't figure it out with FILE_GetUnixHandleType() or from the unix descriptor itself. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf