Re: wine/ misc/registry.c documentation/samples/config
Mike Hearn wrote: Hmm, I don't see why. You realise we can't write to the native registry yes? So using a native registry with the old code was equivalent to doing an import each time you started Wine. For the case where you install under Windows then run under Wine, you only need one import anyway. For cases where you change settings under Windows and expect them to be reflected in Wine but not vice-versa, then yes you'd have to use winecfg to reimport each time (but this is functionally equivalent and could be easily shell scripted). The read only was a shortcoming, I did have a script in place that takes user changed keys from wine registry and integrates them back to main registry, on exit. I can't remember if it was you or someone else on the list who suggested this and I followed. What you propose is an order of a magnitude more CPU intensive, and when it hurts the most, on load time. Before I had a script run in the background after the user has left. The work was on a small Wine registry. Now you suggest work on a big Windows registry on load time of an application. We could probably use an environment variable, or auto-detect it in future. Why not just map it directly into wine/wine/config: All the old config keys can be supported. Primary file is loaded in two stages. The default wine's system.reg is opened than if a LoadWindowsRegistryFiles is specified that registry is loaded in place, that is, merged into the existing registry. Other secondary files load in the same logic as before as stated by the wine/wine/config keys. Winecfg at bootstrap (Installation) has a Windows-Less system.reg and boots fine. If we want to put up a GUI to configure these settings than a notice Just pops up that states that changes will take effect only after restart of Wineserver. But the GUI is not necessary. Just open system.reg text file and edit a couple of keys, just like config file before. If no one is working on this I could. Just let's agree on the final result. I never understood the difficulty. We used to have a config file, than we opened up and loaded a registry file. And than we would map config file values into the live registry. Now we load up a Primary registry then optionally Map a second registry file into it. It is even simpler than before. thanks -mike Thanks Free Life Boaz
Re: shlapi: Fixes for UrlIsW and UrlIsA
Troy Rollo wrote: Testing under Windows shows that UrlIsW and UrlIsA should: Would you be able to write a conformance test using what you've found, to make sure it doesn't break again? Even just posting the test program to wine-patches so somebody could create a conformance test out of it would be great... Mike
Re: shlapi: Fixes for UrlIsW and UrlIsA
Hi, On Mon, Mar 14, 2005 at 09:07:57PM +1100, Troy Rollo wrote: Testing under Windows shows that UrlIsW and UrlIsA should: Since you already did testing under Windows, adding proper tests would make sense, I guess... Or in other words: I'm not sure whether your current patch would get applied. Andreas Mohr
STI, device drivers and stuff
Hi I've started working on implementing STI functionality in Wine. STI is a Windows 98/2000 Still Image capture system, and I'm doing it to get my scanner working in Linux. I have a few questions: 1. Do you support/accept/like C++ code in Wine? COM is bad enough in C++, I would rather not do it in C. 2. STI has kernel mode components to deal USB / SCSI / serial / parallel ports. Is there any attempt to bring kernel mode support into Wine (ReactOS/Wine merger?) any time soon? If not, should I implement USB support using libusb in user-space? 3. Either way, changes need to be made to CreateFile(), CloseHandle(), DeviceIoControl(), ReadFile() and WriteFile() to accomodate this. What's the best way to do this? Do I need to change the Wine server, or just Wine's KERNEL32.DLL and/or NT*.DLL equivalents? 4. Anyone wanna help out? Bye Damjan __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
[advpack] Implement RegisterOCX and stub out DelNodeRunDLL32
This patch helps the IE6 installer get past the DLL registration stage. The DelNodeRunDLL32 function is stubbed out, but RegisterOCX will correctly register a COM DLL by calling its DllRegisterServer function. ChangeLog: * dlls/advpack/advpack.c Matthew Mastracci [EMAIL PROTECTED] Implement RegisterOCX Stub for DelNodeRunDLL32 Index: dlls/advpack/advpack.c === RCS file: /home/wine/wine/dlls/advpack/advpack.c,v retrieving revision 1.7 diff -u -r1.7 advpack.c --- dlls/advpack/advpack.c 20 Jan 2005 20:03:13 - 1.7 +++ dlls/advpack/advpack.c 14 Mar 2005 07:35:54 - @@ -32,6 +32,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(advpack); +typedef HRESULT (*DLLREGISTER) (void); + /*** * DllMain (ADVPACK.@) @@ -172,3 +174,60 @@ return S_OK; } + +/*** + * RegisterOCX(ADVPACK.@) + */ +void WINAPI RegisterOCX( HWND hWnd, HINSTANCE hInst, LPCSTR cmdline, INT show ) +{ +WCHAR wszBuff[MAX_PATH]; +WCHAR* pwcComma = wszBuff[0]; +HMODULE hm; +DLLREGISTER pfnRegister; +HRESULT hr; + +TRACE((%s)\n, cmdline); + +MultiByteToWideChar(CP_ACP, 0, cmdline, strlen(cmdline), wszBuff, MAX_PATH); +while (!(*pwcComma == ',' ) *pwcComma) +{ +pwcComma++; +} +*pwcComma = '\0'; + +TRACE(Parsed DLL name (%s)\n, debugstr_w(wszBuff)); + +hm = LoadLibraryExW(wszBuff, 0, LOAD_WITH_ALTERED_SEARCH_PATH); +if (!hm) +{ +ERR(Couldn't load DLL: %s\n, debugstr_w(wszBuff)); +return; +} + +pfnRegister = (DLLREGISTER)GetProcAddress(hm, DllRegisterServer); +if (pfnRegister == NULL) +{ +ERR(DllRegisterServer entry point not found\n); +} +else +{ +hr = pfnRegister(); +if (hr != S_OK) +{ +ERR(DllRegisterServer entry point returned %08lx\n, hr); +} +} + +TRACE(Successfully registered OCX\n); + +FreeLibrary(hm); +} + +/*** + * DelNodeRunDLL32(ADVPACK.@) + */ +void WINAPI DelNodeRunDLL32( HWND hWnd, HINSTANCE hInst, LPCSTR cmdline, INT show ) +{ +FIXME((%s) FIXME: stub\n, cmdline); +} + Index: dlls/advpack/advpack.spec === RCS file: /home/wine/wine/dlls/advpack/advpack.spec,v retrieving revision 1.5 diff -u -r1.5 advpack.spec --- dlls/advpack/advpack.spec 20 Jan 2005 20:03:13 - 1.5 +++ dlls/advpack/advpack.spec 14 Mar 2005 07:35:54 - @@ -2,7 +2,7 @@ @ stub AdvInstallFile @ stub CloseINFEngine @ stub DelNode -@ stub DelNodeRunDLL32 +@ stdcall DelNodeRunDLL32(ptr ptr str long) @ stdcall DllMain(long long ptr) @ stdcall DoInfInstall(ptr) @ stub ExecuteCab @@ -23,10 +23,11 @@ @ stub RegRestoreAll @ stub RegSaveRestore @ stub RegSaveRestoreOnINF -@ stub RegisterOCX +@ stdcall RegisterOCX(ptr ptr str long) @ stub RunSetupCommand @ stub SetPerUserSecValues @ stub TranslateInfString @ stub TranslateInfStringEx @ stub UserInstStubWrapper @ stub UserUnInstStubWrapper
Re: [advpack] Implement RegisterOCX and stub out DelNodeRunDLL32
Dmitry Timoshkov wrote: Matthew Mastracci [EMAIL PROTECTED] wrote: +typedef HRESULT (*DLLREGISTER) (void); Shouldn't it have a WINAPI modifier? Good point, thanks. I'm sending an updated patch to wine-patches with the WINAPI modifier. Note that I copied the callback function definiton verbatim from Wine's regsvr32 implementation. Should the definition in regsvr32 include WINAPI as well? Matt.
Re: STI, device drivers and stuff
Hi Damjan, Damjan Jovanovic wrote: I've started working on implementing STI functionality in Wine. STI is a Windows 98/2000 Still Image capture system, and I'm doing it to get my scanner working in Linux. Fantastic! 2. STI has kernel mode components to deal USB / SCSI / serial / parallel ports. Is there any attempt to bring kernel mode support into Wine (ReactOS/Wine merger?) any time soon? If not, should I implement USB support using libusb in user-space? I think that STI support should be done using the Video4Linux API and/or the SANE library. You shouldn't need to think about whether a device is a USB device, attached to a parallel port, serial port or anything like that. Let the kernel deal with abstraction of the hardware if possible... can the Linux kernel already talk to your scanner? 3. Either way, changes need to be made to CreateFile(), CloseHandle(), DeviceIoControl(), ReadFile() and WriteFile() to accomodate this. What's the best way to do this? Do I need to change the Wine server, or just Wine's KERNEL32.DLL and/or NT*.DLL equivalents? I don't think you should try to implement scanner support at the driver level. The first step is to figure out how your device accesses the scanner, and write a test program that uses the same interface, and can read a simple image from it in Windows. AFAIK, STI devices are accessed though sti.StiCreateInstanceA/W() which returns an IStillImageA/W interface. 4. Anyone wanna help out? Sure. I'm willing to help you build a frame for you to build your code in. I've attached an IDL file for STI that I created a while back. I don't think it compiles any more, but I should be able to fix it up and get it submitted. Mike /* * Copyright (C) 2004 Mike McCormack * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ import oaidl.idl; /* encoding neutral interfaces */ /*struct STIDEVICE; typedef struct STIDEVICE* PSTIDEVICE ; struct IStillImage; struct STI; typedef struct STI *PSTI; struct STI_DEVICE_INFORMATIONW; struct STIDEVICEW; typedef struct IStillImageW IStillImageW,*PSTIW; typedef struct STIDEVICEW* PSTIDEVICEW; typedef struct STI_DEVICE_INFORMATIONW *PSTI_DEVICE_INFORMATIONW; struct STIDEVICEA; typedef struct IStillImageA IStillImageA,*PSTIA; typedef struct STIDEVICEA* PSTIDEVICEA; typedef struct STI_DEVICE_INFORMATIONA *PSTI_DEVICE_INFORMATIONA; HRESULT WINAPI StiCreateInstanceA(HINSTANCE hinst, DWORD ver, PSTIA *ppSti, void **punk); HRESULT WINAPI StiCreateInstanceW(HINSTANCE hinst, DWORD ver, PSTIW *ppSti, void **punk); */ typedef struct _STI_DEV_CAPS { DWORD dwGeneric; } STI_DEV_CAPS, *PSTI_DEV_CAPS; typedef struct _STI_DEVICE_STATUS { DWORD dwSize; DWORD StatusMask; DWORD dwOnlineState; DWORD dwHardwareStatusCode; DWORD dwEventHandlingState; DWORD dwPollingInterval; } STI_DEVICE_STATUS, *PSTI_DEVICE_STATUS; typedef struct _ERROR_INFOA { DWORD dwSize; DWORD dwGenericError; DWORD dwVendorError; CHAR szExtendedErrorText[255]; } STI_ERROR_INFOA, *PSTI_ERROR_INFOA; typedef struct _ERROR_INFOW { DWORD dwSize; DWORD dwGenericError; DWORD dwVendorError; WCHAR szExtendedErrorText[255]; } STI_ERROR_INFOW, *PSTI_ERROR_INFOW; typedef struct _STI_DIAGA { DWORD dwSize; DWORD dwBasicDiagCode; DWORD dwVendorDiagCode; DWORD dwStatusMask; STI_ERROR_INFOA sErrorInfo; } STI_DIAGA, *LPSTI_DIAGA; typedef struct _STI_DIAGW { DWORD dwSize; DWORD dwBasicDiagCode; DWORD dwVendorDiagCode; DWORD dwStatusMask; STI_ERROR_INFOW sErrorInfo; } STI_DIAGW, *LPSTI_DIAGW; [ object, uuid(6CFA5A80-2DC8-11D0-90EA-00AA0060F86C), pointer_default(unique) ] interface IStiDevice : IUnknown { HRESULT Initialize(HINSTANCE hinst, LPCWSTR pwszDeviceName, DWORD dwVersion, DWORD dwMode); HRESULT GetCapabilities(PSTI_DEV_CAPS pDevCaps); HRESULT GetStatus(PSTI_DEVICE_STATUS pDevStatus); HRESULT DeviceReset(); HRESULT Diagnostic(LPSTI_DIAG pBuffer); HRESULT Escape(STI_RAW_CONTROL EscapeFunction, LPVOID lpInData, DWORD cbInDataSize, LPVOID pOutData, DWORD dwOutDataSize, LPDWORD pdwActualData); HRESULT GetLastError(LPDWORD pdwLastDeviceError); HRESULT LockDevice(DWORD dwTimeOut); HRESULT UnLockDevice(); HRESULT RawReadData(LPVOID lpBuffer, LPDWORD
Re: [advpack] Implement RegisterOCX and stub out DelNodeRunDLL32
Matthew Mastracci [EMAIL PROTECTED] wrote: Note that I copied the callback function definiton verbatim from Wine's regsvr32 implementation. Should the definition in regsvr32 include WINAPI as well? Very likely that yes, it should. -- Dmitry.
Re: [patch] x86: fix ESP corruption CPU bug
Andi Kleen wrote: Stas Sergeev [EMAIL PROTECTED] writes: Another way of saying the same thing: I absolutely hate seeing patches that fix some theoretical issue that no Linux apps will ever care about. No, it is not theoretical, but it is mainly about a DOS games and an MS linker, as for me. The things I'd like to get working, but the ones you may not care too much about:) The particular game I want to get working, is Master of Orion 2 for DOS. How about you just run it in dosbox instead of dosemu ? Yes, that's a solution of course, but it is a bit like saying why not use Open Office instead of MS Word. A long term goal of wine is to support DOS apps to. Of course it's not a priority, but it's there. regards, Jakob
Re: DOS interrupts in Wine
Sam == Sam Lauber [EMAIL PROTECTED] writes: Sam Does Wine correctly implement all the DOS Services and interrupts? ^ ^^^ No... -- Uwe Bonnes[EMAIL PROTECTED] Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt - Tel. 06151 162516 Fax. 06151 164321 --
Are mailslots implemented?
Hi, Is the one-way mailslot IPC implemented in wine? I'm getting fixme:sync:CreateMailslotW(...): stub messages. Is this a simple thing to implement, or would it require additions to the server protocol? Thanks, Kuba Ober
Re: DOS interrupts in Wine
--On Monday, March 14, 2005 4:50 PM +0100 Sam Lauber [EMAIL PROTECTED] wrote: Does Wine correctly implement all the DOS Services and interrupts? What Windows program still uses DOS interrupts?
[badpenguin79@hotmail.com: [Full-disclosure] [ZH2005-02SA] Insecure tmp file creation in Wine]
Hi, From full-disclosure, a security mailing list. Fix seems trivial, just use 0600. (untested, uncompiled ;) Ciao, Marcus Changelog: Temporary registries exported only user read/writeable to avoid information leaks. Index: server/registry.c === RCS file: /home/wine/wine/server/registry.c,v retrieving revision 1.63 diff -u -r1.63 registry.c --- server/registry.c 10 Mar 2005 11:18:31 - 1.63 +++ server/registry.c 14 Mar 2005 16:38:54 - @@ -1610,7 +1610,7 @@ for (;;) { sprintf( p, reg%lx%04x.tmp, (long) getpid(), count++ ); -if ((fd = open( tmp, O_CREAT | O_EXCL | O_WRONLY, 0666 )) != -1) break; +if ((fd = open( tmp, O_CREAT | O_EXCL | O_WRONLY, 0600 )) != -1) break; if (errno != EEXIST) goto done; close( fd ); } Index: misc/registry.c === RCS file: /home/wine/wine/misc/registry.c,v retrieving revision 1.149 diff -u -r1.149 registry.c --- misc/registry.c 25 Aug 2004 00:48:47 - 1.149 +++ misc/registry.c 14 Mar 2005 16:38:55 - @@ -1227,7 +1227,7 @@ ret = _xmalloc(50); for (count = 0;;) { sprintf(ret,/tmp/reg%lx%04x.tmp,(long)getpid(),count++); -if ((tmp_fd = open(ret,O_CREAT | O_EXCL | O_WRONLY,0666)) != -1) break; +if ((tmp_fd = open(ret,O_CREAT | O_EXCL | O_WRONLY,0600)) != -1) break; if (errno != EEXIST) { ERR(Unexpected error while open() call: %s\n,strerror(errno)); free(ret); ---BeginMessage--- Title: Insecure tmp file creation in Wine Author: Giovanni Delvecchio e-mail: [EMAIL PROTECTED] Version affected : Wine 20050211 and previous releases About Wine === from http://www.winehq.org/site/docs/wine-faq/index : Wine is a program which allows the operation of DOS and MS Windows programs (Windows 3.x and Win32 executables) on UNIX operating systems such as Linux. It consists of a program loader, which loads and executes a Windows binary, and a set of libraries that implements Windows API calls using their UNIX or X11 equivalents. The libraries may also be used for porting Win32 code into native UNIX executables, often without many changes in the source. Wine is free software, and its license (contained in the file LICENSE in each distribution) is the LGPL. Problem = When a win32 application is launched by wine, wine makes a dump of the windows registry in /tmp with name reg.tmp , where xx is the pid in hexadecimal value of the current wine process and is an integer value usually equal to zero. reg.tmp is created with 0644 ( -rw-r--r-- )permissions. This could represent a security problem in a multi-user environment. Indeed, any local user could access to windows regstry's dump and get sensitive information, like passwords and other private data. Details The functions affected are _get_tmp_fn(FILE **) in $winerelease/misc/registry.c and save_branch( struct key *key, const char *path ) in $winerelease/server/registry.c _get_tmp_fn(FILE **) @ $winerelease/misc/registry.c : - static LPSTR _get_tmp_fn(FILE **f) { LPSTR ret; int tmp_fd,count; ret = _xmalloc(50); for (count = 0;;) { sprintf(ret,/tmp/reg%lx%04x.tmp,(long)getpid(),count++); //here file regxxx.tmp is not created with secure permssions if ((tmp_fd = open(ret,O_CREAT | O_EXCL | O_WRONLY,0666)) != -1) break; if (errno != EEXIST) { ERR(Unexpected error while open() call: %s\n,strerror(errno)); free(ret); *f = NULL; return NULL; } } - save_branch( struct key *,const char * ) @ $winerelease/server/registry.c: --- static int save_branch( struct key *key, const char *path ) { struct stat st; char *p, *real, *tmp = NULL; int fd, count = 0, ret = 0, by_symlink; FILE *f; . . . for (;;) { sprintf( p, reg%lx%04x.tmp, (long) getpid(), count++ ); //here file regxxx.tmp is not created with secure permssions if ((fd = open( tmp, O_CREAT | O_EXCL | O_WRONLY, 0666 )) != -1) break; if (errno != EEXIST) goto done; close( fd ); } . . . } When regxxx.tmp is created by open(), 0666 mode is used as argument. Since default umask is 022 == (0666) ~ (022) = 0644 = -rw-r--r-- the file will be created with 0644 permissions. Proof of Concepts === To expoloit this bug, a local attacker could use a bash script to check the presence of regxxx.tmp in /tmp and copy it in his home directory for a successive analysis. Example of bash script: -- #!/bin/sh count=1 while [ true ]; do if [ -f
Re: Are mailslots implemented?
Kuba Ober wrote: Is the one-way mailslot IPC implemented in wine? No. I'm getting fixme:sync:CreateMailslotW(...): stub messages. Is this a simple thing to implement, or would it require additions to the server protocol? Yes, it needs to be implemented in the server. I started writing it some time ago, but never got round to completing it. I submitted a test case... Which application uses mailslots? I only ever found one real application that used them, and that was Declan's Korean Dictionary from [1]. If you're interested, I can send you what I wrote. It's probably very out of date by now though. Mike [1] http://www.declan-software.com/korean.htm#Software
Re: Are mailslots implemented?
On Tue, Mar 15, 2005 at 01:44:19AM +0900, Mike McCormack wrote about 'Re: Are mailslots implemented?': Kuba Ober wrote: I'm getting fixme:sync:CreateMailslotW(...): stub messages. Is this a simple thing to implement, or would it require additions to the server protocol? Yes, it needs to be implemented in the server. I started writing it some time ago, but never got round to completing it. I submitted a test case... Which application uses mailslots? I only ever found one real application that used them, and that was Declan's Korean Dictionary from [1]. The browse (Network Neighborhood) service uses them. Other then that, I have not seen any uses of it. Cheers, Jelmer -- Jelmer Vernooij [EMAIL PROTECTED] - http://jelmer.vernstok.nl/ signature.asc Description: Digital signature
Re: [badpenguin79@hotmail.com: [Full-disclosure] [ZH2005-02SA] Insecure tmp file creation in Wine]
Marcus Meissner [EMAIL PROTECTED] writes: --- server/registry.c 10 Mar 2005 11:18:31 - 1.63 +++ server/registry.c 14 Mar 2005 16:38:54 - @@ -1610,7 +1610,7 @@ for (;;) { sprintf( p, reg%lx%04x.tmp, (long) getpid(), count++ ); -if ((fd = open( tmp, O_CREAT | O_EXCL | O_WRONLY, 0666 )) != -1) break; +if ((fd = open( tmp, O_CREAT | O_EXCL | O_WRONLY, 0600 )) != -1) break; That one is not in /tmp, it's in the user's home directory. -- Alexandre Julliard [EMAIL PROTECTED]
Re: Are mailslots implemented? [inter-domain mailslots]
Answering myself, partially: After a quick read: libsmbclient.h doesn't expose any datagram stuff. That means we'd need to import samba internal headers in order to use the relevant functions which I hope are in libsmbclient.so. Or maybe just make a header with a couple definitions for just the stuff that we need. What are the policies on such stuff? readelf'ing it showed a couple nice ones like cli_send_mailslot. That's what we need, I hope :) Jelmer: what is the stability of mailslot-related function API in libsmbclient? I would do an dlopen to bind it at runtime, only if available, so that wine wouldn't get a samba dependency. Otherwise I plan on issuing a warning and reverting to the current-session-only mailslots. Is that a good plan? Cheers, Kuba
Re: [patch] x86: fix ESP corruption CPU bug
Hi! Can you tell me how the invisible high-word (invisible in VM-86, and in real mode) could possibly harm something running in VM-86 or read-mode ??? I don't even think it's a BUG. If the transition You can have protected-mode application running in dosemu with 16-bit stack segment. Pavel -- People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
Re: [patch] x86: fix ESP corruption CPU bug
On Mon, 14 Mar 2005, Jakob Eriksson wrote: Andi Kleen wrote: Stas Sergeev [EMAIL PROTECTED] writes: Another way of saying the same thing: I absolutely hate seeing patches that fix some theoretical issue that no Linux apps will ever care about. No, it is not theoretical, but it is mainly about a DOS games and an MS linker, as for me. The things I'd like to get working, but the ones you may not care too much about:) The particular game I want to get working, is Master of Orion 2 for DOS. How about you just run it in dosbox instead of dosemu ? Yes, that's a solution of course, but it is a bit like saying why not use Open Office instead of MS Word. A long term goal of wine is to support DOS apps to. Of course it's not a priority, but it's there. regards, Jakob Can you tell me how the invisible high-word (invisible in VM-86, and in real mode) could possibly harm something running in VM-86 or read-mode ??? I don't even think it's a BUG. If the transition into and out of VM-86 doesn't handle the fact that the high-word of the stack hasn't been used in VM-86, then that piece of code is bad (the SP isn't even the same stack, BTW). Cheers, Dick Johnson Penguin : Linux version 2.6.11 on an i686 machine (5537.79 BogoMips). Notice : All mail here is now cached for review by Dictator Bush. 98.36% of all statistics are fiction.
Re: Are mailslots implemented?
|Which application uses mailslots? I only ever found one real |application that used them, and that was Declan's Korean Dictionary |from [1]. | |The browse (Network Neighborhood) service uses them. Other then that, |I have not seen any uses of it. | | Protel 98 (likely higher versions too) uses them. | | MSDN says that the datagrams are limited to 424 bytes in length, so even if | they are not very useful otherwise, getting Protel running on wine seems a | worthy goal to me. I'll try hacking on it and seeing where I end up. See http://www.ubiqx.org/cifs/Browsing.html#BRO.3 for more information libsmbclient from Samba 3 does not support it at the moment What do the match_mailslot_name and cli_send_mailslot functions do, then? Anyway, if the wire protocol is simple enough, and so it seems from ubiqx.org article, then I can just synthesize all the relevant layers to send the multicast UDP. The only piece of info that I'll (hopefully) need from wine is the netbios node name. For reception, I'll bind UDP port 138 (netbios-dgm) if it's not already bound, to receive the mailslots coming in. Now, if a samba server is already running on given host, which is reasonable if the person running wine wants to share something with other windows hosts, is it possible to somehow poll the nmbd and/or smbd to get the mailslot datagrams that weren't consumed by the browsing protocols? Does that make sense? Any more hints? Cheers, Kuba
Re: STI, device drivers and stuff
Hi, --- Dimitrie O. Paun [EMAIL PROTECTED] wrote: 2. STI has kernel mode components to deal USB / SCSI / serial / parallel ports. Is there any attempt to bring kernel mode support into Wine (ReactOS/Wine merger?) any time soon? If not, should I implement USB support using libusb in user-space? Wine is purely user-space, so yes, use libusb I guess. CrossOver is using libusb for the iPod stuff. There is little chance of sharing much of the hardware support with ReactOS however the higher level stuff is being shared such as setupapi. Having a wineserver thread or something that acts like the umpnpmgr on Windows would allow us to share a bit more code as well. Thanks Steven __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/
richedit patches by Phil Krylov
ChangeLog: Initial implementation of EM_STREAMOUT and RTF writer. Nice to see this functionality implemented (I really didn't want to implement it myself). Very good code too. Thanks. IMHO the patch can be applied without changes. The new function ME_FindItemAtOffset isn't really necessary, you can achieve exactly the same thing with ME_RunOfsFromCharOfs (and I should have used it in ME_GetTextW instead of reimplementing the same functionality). I'm going to get rid of it later. Now when both EM_STREAMIN and EM_STREAMOUT work, I can start implementing the rest of the clipboard code. Added generator RTF destination handling. Added missing PFA_JUSTIFY definition to richedit.h. Thanks for the fixes, I really didn't know how to get rid of the \generator. Maybe it will help me figure out how to ignore the rest of the RTF junk that I can't use anyway (\pgdsctbl and others). Krzysztof
Re: Are mailslots implemented?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, Kuba Ober wrote: ||Which application uses mailslots? I only ever found one real ||application that used them, and that was Declan's Korean Dictionary ||from [1]. || ||The browse (Network Neighborhood) service uses them. Other then that, ||I have not seen any uses of it. || || Protel 98 (likely higher versions too) uses them. || || MSDN says that the datagrams are limited to 424 bytes in length, so | |even if | || they are not very useful otherwise, getting Protel running on wine | |seems a | || worthy goal to me. I'll try hacking on it and seeing where I end up. | |See http://www.ubiqx.org/cifs/Browsing.html#BRO.3 for more information |libsmbclient from Samba 3 does not support it at the moment | What do the match_mailslot_name and cli_send_mailslot functions do, then? Those are internal functions - the official functions are in libsmbclient.h. Of course, it is very well possible to use these functions (they haven't changed for ages). However, it might be hard to use that function (given that it's internal). Now that I've looked at the prototype, it looks ok: int cli_send_mailslot(int dgram_sock, BOOL unique, const char *mailslot, ~ char *buf, int len, ~ const char *srcname, int src_type, ~ const char *dstname, int dest_type, ~ struct in_addr dest_ip, struct in_addr src_ip, ~ int dest_port, int src_port); | Anyway, if the wire protocol is simple enough, and so it seems from ubiqx.org | article, then I can just synthesize all the relevant layers to send the | multicast UDP. The only piece of info that I'll (hopefully) need from wine is | the netbios node name. | | For reception, I'll bind UDP port 138 (netbios-dgm) if it's not already bound, | to receive the mailslots coming in. Samba (nmbd) binds to that port (for browsing among other things). | Now, if a samba server is already running on given host, which is reasonable | if the person running wine wants to share something with other windows hosts, | is it possible to somehow poll the nmbd and/or smbd to get the mailslot | datagrams that weren't consumed by the browsing protocols? In Samba 3, no (all this stuff is handled inside of nmbd, not exported). | Does that make sense? Any more hints? Yes, makes sense to me. I still think it would make more sense to work on Samba integration with Samba4 rather then 3 as it'll be troublesome with Samba3. Cheers, Jelmer -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCNdsIPa9Uoh7vUnYRAjGwAJoCFQbAE/GWfReVkfTpxIo+sX1bpACfRECB oXcEa1LlORUDplId+g+8U8I= =OLrO -END PGP SIGNATURE-
Re: [patch] x86: fix ESP corruption CPU bug
Hi, Jakob Eriksson wrote: A long term goal of wine is to support DOS apps to. Of course it's not a priority, but it's there. Yes, that's exactly what I was hoping for, thanks! Even if no Windows apps do such a thing (which wasn't confirmed yet), Wine may still need that fix for the DOS support in the future, and dosemu seems to be in need of that fix already and for long (that's where I am getting the use of it). And we haven't heard a word for a VMWare yet, and I think they may appreciate that too. Also, since the first version of the path, I've been contacted by a few people asking me to provide an updated version for 2.6.9 and 2.6.10. I don't know the reason, but I know it was used (I think they were more concerned about an aforementioned information leak, rather than about the %esp corruption). So if the last problem with that patch was that it is not really needed, I think it no longer stays:)
Re: richedit patches by Phil Krylov
Phil Krylov wrote: The RTF reader still has to be teached Unicode. Currently most of my existing .rtf documents are totally garbled. Can you fix it ? Judging from your RTF writer code and your last name, you probably have more knowledge about Unicode and RTF than I have. Krzysztof
Re: Let's fix Steam!
Am Sonntag, 13. März 2005 22:13 schrieb Scott Ritchie: On Sun, 2005-03-13 at 12:56 -0500, Tim Schmidt wrote: Hey guys, sorry to intrude, but I've been out of the Windows gaming scene for longer than I can remember. I own copies of Half-life and a few other games, but am I to understand that they can be played (for free?) through steam? I see that you can purchase a few games through steam as well ( I remember hearing about it some time ago... most of the work done on it was done by the bittorrent guy right?). --tim Yes you can. If you want to help us test it out, all you'll need is your Half Life CD Key - Steam should download and patch up the rest of everything. That is, if I can get steam to work - still no text on the buttons makes it mighty difficult to know what I'm doing. http://tuzakey.com/~scott/steam.png Does this also happen in Desktop mode? Steam has some problems with the Window Styles(I sent a mail a few hours ago). Well, the buttons are Back, Next and Cancel. But that won't help much if you can't read the text. Have you tried to set ClientSideWithRender and ClientSideWithCore in the x11drv Section to false? I have them enabled and if I disable them I can't see any text too(just noticed this). Stefan
Re: richedit patches by Phil Krylov
On Mon, 14 Mar 2005 20:25:52 +0100 Krzysztof Foltman [EMAIL PROTECTED] wrote: Phil Krylov wrote: The RTF reader still has to be teached Unicode. Currently most of my existing .rtf documents are totally garbled. Can you fix it ? Judging from your RTF writer code and your last name, you probably have more knowledge about Unicode and RTF than I have. I'll try when I have time... I looked in the reader code and it's not very clear (at least in the part which deals with character sets), it'll take some time to understand it. -- Ph.
Re: Are mailslots implemented?
Hi, On Tue, Mar 15, 2005 at 01:44:19AM +0900, Mike McCormack wrote: Which application uses mailslots? I only ever found one real application that used them, and that was Declan's Korean Dictionary from [1]. Matro's RealPopup, a very good winpopup replacement. We might want to add a note about this list of applications to these stubs... Andreas Mohr
Automatic installation rev-eng utility
Hi all, I said this in a reply in one of the threads (the one about Windows registry), and got zero reply. I'm bringing the subject up again here. Back in 1996 (and until around 2000) I was project manager for a project called GTFormat. This was a project used by the late Packard Bell, as well as NEC in Japan, to put the programs bundled with the machines on the hard disks shipped out to customers. The tools consist of a tool that understands what the original installation did, a database to do offline conflict resolution and other stuff, and a front end to perform a (silent) installation of the result. I have written most of the code in the last part of this project, and as I said before, managed the entire thing. We also had a tool the generated files for the last part directly from the first part, without going through the database. Now, the tool was written when I was an employee of the company that produced them (G.Tek Technologies, today called gteko), but I believe that given enough persuasion I can get their approval to either freely distribute or actually open source the detection and the installation tool. I believe most of the distinguishing value of the tool as far as Gteko is concerned is in the database, which is not relevant for Wine in any way. The tool is written mostly in C++ for Visual Studio 6. It may require pulling out a single proprietary library (compression), but should not pose a problem (zlib does a wonderful job, after all). The question, therefor, is this. Should I try? The tool has proven itself over a long period of time, and is fairly reliable (at least was back at the time). It CAN solve some of our installer related problems. Your opinions are welcome. So, what say you? Shachar -- Shachar Shemesh Lingnu Open Source Consulting ltd. Have you backed up today's work? http://www.lingnu.com/backup.html
Re: richedit patches by Phil Krylov
On Mon, 14 Mar 2005 19:31:25 +0100 Krzysztof Foltman [EMAIL PROTECTED] wrote: ChangeLog: Initial implementation of EM_STREAMOUT and RTF writer. Nice to see this functionality implemented (I really didn't want to implement it myself). Very good code too. Thanks. Thanks :) The new function ME_FindItemAtOffset isn't really necessary, you can achieve exactly the same thing with ME_RunOfsFromCharOfs (and I should have used it in ME_GetTextW instead of reimplementing the same functionality). I'm going to get rid of it later. Oh sorry, I haven't noticed that it already exists. Now when both EM_STREAMIN and EM_STREAMOUT work, I can start implementing the rest of the clipboard code. The RTF reader still has to be teached Unicode. Currently most of my existing .rtf documents are totally garbled. -- Ph.
Problems with VirtualAlloc/Lock
There are major differences in the handling of virtual memory in Wine vs WinXP that are causing problems for my winelib application. Can someone provide background and/or workarounds for these issues? As near as I can tell the main differences are: * VirtualLock does nothing in Wine * Wine makes no distinction between MEM_RESERVE and MEM_COMMIT * Wine has no implementation of Windows' process working sets * Wine limits MEM_RESERVE to 1GB, but WinXP goes up to 2GB The above problems seem relatively harmless on systems with 1GB RAM. But when our units go greater than 1GB we are seeing spectacular crash-and-burn failures. The code-only DLLs we are running on such systems are crashing at a stage when I suspect they are attempting to lock RAM. I suspect that they are confused by the report from GlobalMemoryStatus that more than 1GB of RAM is installed, but that they are only able to VirtualLock up to 1GB. And in this unexpected situation, they are crashing. Further, these DLLs are audio processing plugins. The apparent fact that VirtualLock doesn't _actually_ lock memory into RAM for real time processing is a disaster for our system, in that it causes audio glitches when a page fault is handled. But that is not a problem which crashes the system. Any suggestions on what to do? Is there any pending work on this area out there? I've attached a little table that describes what I found. It shows the differences in how Wine and WinXP handle memory related calls. I have also attached a simple program which can be run to see these differences. Thanks for any help... mo Memory Function Differences Between Wine and WinXP All sizes are in Kbytes CALLWINXP WINE = 1. VirtualAlloc(MEM_RESERVE)2,096,912 1,020,976 2. VirtualAlloc(MEM_COMMIT) 1,011,712 (3) 1,020,976 3. VirtualAlloc(MEM_COMMIT) 1,024 (1) 1,020,976 +VirtualLock() 4. VirtualAlloc(MEM_COMMIT) 259,072 1,020,976 (2) +SetProcessWorkingSetSize(260,000) +VirtualLock() 5. GlobalMemoryStatus RAM 392,688 386,324 Page 942,820 522,072 Virtual 2,097,024 2,097,024 6. GetProcessWorkingSetSize() hi/lo 1,380/200 32,768/32,768 (2) tests: 1. calling VirtualAlloc with MEM_RESERVE 1MB at a time until it fails. This is reserving virtual space only. Without the /3GB switch windows memory is limited to 2GB. So each app should be able to reserve its 2GB of space. call: drink-memory.exe.so -reserve-only -no-lock 2. VirtualAlloc(MEM_COMMIT) 1MB at at time until it fails. On WinXP this seems to be bounded by how big the paging file is. In Wine...? dunno. call: drink-memory.exe.so -no-lock 3. VirtualAlloc(MEM_COMMIT) + VirtualLock() 1MB at at time until it fails. On WinXP this craps out right away because the working set is very small, 1.3M (see line 6) call: drink-memory.exe.so 4. Same as 2. but with SetProcessWorkingSetSize(260,000). That was the largest value WinXP allowed me to set the working set size to. WinXP let me lock down RAM up to its limit, as expected. Wine, again, isn't doing anything special call: drink-memory.exe.so -lock-limit=26 5. 6. For reference the memory status reported WinXP and Wine notes: (1) VirtualLock fails - 1453 Insufficient quota (2) FIXME: stub (3) VirtualAlloc fails - 1455 Paging file is too small #if _MFC #include stdafx.h #else #include stdio.h // printf #include wine/windows/windows.h #endif // process command line options const char* CheckOption(const char* check, const char* match); // like perror() for Windows void PrintLastError(const char* msg); int main(int argc, char *argv[]) { bool usage = false; bool forever = false; bool noLock = false; bool reserve = false; int chunk = 1048576; int lockLimit = -1; for (int arg = 1; !usage arg argc; arg++) { const char* result; if ((result = CheckOption(argv[arg], -chunk=)) != 0) chunk = atoi(result) * 1024; else if (CheckOption(argv[arg], -forever)) forever = true; else if (CheckOption(argv[arg], -help)) usage = true; else if ((result = CheckOption(argv[arg], -lock-limit=)) != 0) lockLimit = atoi(result); else if (CheckOption(argv[arg], -no-lock)) noLock = true; else if (CheckOption(argv[arg], -reserve-only)) reserve = true; else usage = true; } if (usage) {
Re: Automatic installation rev-eng utility
On Mon, 14 Mar 2005 22:09:54 +0200, Shachar Shemesh [EMAIL PROTECTED] wrote: the hard disks shipped out to customers. The tools consist of a tool that understands what the original installation did, a database to do offline conflict resolution and other stuff, and a front end to perform a (silent) installation of the result. I have written most of the code Putting on my sys admin hat that hasn't been worn in a long time... Yeah, I think this would be useful. Here's an example of why: I tried running the current Word Viewer 2003 install program it failed with MSI errors. I simply tried copying over the installation directory from a Windows partition but it didn't work. Well, at that point I could either corrupt my clean Wine install with a native MSI, or I could try to sort out what the install program does on Windows. I used a program called InstallSpy 2.0 from 2BrightSparks to figure out what the install program did. I noticed it dumped some files in c:\Program Files\Common Files\blah\blah\blah. 'Lo and behold, as soon as I copied that folder over to my fake Windows drive, Word Viewer worked just fine. All in all, I probably spent about 15 minutes on the solution and avoided native MSI. Now, a program that monitored a Windows install, copied all of the files created, generated a .reg file with registry changes, noted INI file changes, and then built an RPM that would install on Linux.. that would be cool. -Brian
Re: [X11DRV] Fix X11 Device list leak
Hi, Thanks for submitting this patch. These are exactly the fixes I was about to submit! Nothing :) Your patch should should have a major impact on users of applications which use the wintab library: They should all start to function to some degree. i hope so, waiting for users report now :) Apologies for not commenting on patch/ submitting a fix earlier A major knee operation has put me out of action for the last few weeks. :( Have a good recovery P.S. Please don't expect timely responses to mails for at least another week. I'll try my best to respond, but can't promise anything. Regards, Raphael pgpfo2jq2zxSM.pgp Description: PGP signature
Re: Problems with VirtualAlloc/Lock
Hi, interesting seems we have a bug report about that problem (behavior differences) http://bugs.winehq.org/show_bug.cgi?id=890 Regards, Raphael pgphdqoXTIGCs.pgp Description: PGP signature
Re: Automatic installation rev-eng utility
Brian Vincent wrote: Now, a program that monitored a Windows install, copied all of the files created, generated a .reg file with registry changes, noted INI file changes, and then built an RPM that would install on Linux.. that would be cool. -Brian Thinking about it, maybe it would be easier to write one than to get my ex-boss to change copyright on the existing tool + renovate it. Also, as the current tool is C++, it is bound to be an external tool anyways. Hmm Shachar -- Shachar Shemesh Lingnu Open Source Consulting ltd. Have you backed up today's work? http://www.lingnu.com/backup.html
Re: [DMUSIC/DINPUT] includes fixes
On Friday 11 March 2005 17:47, Alexandre Julliard wrote: [EMAIL PROTECTED] writes: [EMAIL PROTECTED] wrote: At least for directx headers it's not a good idea. many old games (using old directx) need to have compatible headers else they won't build (it's why bug 2483 exists: build problem on an old dx game) What sort of code breaks because of extra fields in a structure? Could you give an example? Almost all old dinput codes (or you can say old non-portable and buggy games) :) I'll try to retrieve a little sample Regards, Raphael pgp65FTOJ3GDY.pgp Description: PGP signature
Re: [DSOUND] little patch
This is Alexandre's trick which I borrowed because it is very helpful in debugging lock problems. It would be nice to formalize this and make it available in a more general way but that is Alexandre's call. Hi Something like this plus a lot of documentation explaining what is going on. I think this should go in debug.h but there is only trace stuff in there so I put it in library.h. I approve :) i would like to have a wine_dbgstr_cs() :) Alexandre ? Regards, Raphael pgp5kQ5WkOzqe.pgp Description: PGP signature
Re: Problems with VirtualAlloc/Lock
On Mon, 2005-03-14 at 13:16, Raphael wrote: seems we have a bug report about that problem (behavior differences) http://bugs.winehq.org/show_bug.cgi?id=890 I guess I am adding VirtualLock and VirtualAlloc to the list of APIs that don't work the same in Wine vs Windows. Bug #890 is about VirtualQuery and seems to have been patched/fixed...? The diff is that the issues I raise aren't bugs, but behaviors that just haven't been implemented like actually locking virtual memory, and using the win32 working sets. That bug dates back to 2002! Oh, no. I guess this must be a low priority issue for Wine. Bad news for me. ... mo PS: thanks for the hint about the bug db, tho. I didn't think to check there! Ooops... %)
Re: richedit patches by Phil Krylov
On Mon, 14 Mar 2005 19:31:25 +0100 Krzysztof Foltman [EMAIL PROTECTED] wrote: ChangeLog: Initial implementation of EM_STREAMOUT and RTF writer. Nice to see this functionality implemented (I really didn't want to implement it myself). Very good code too. Thanks. Thanks :) The new function ME_FindItemAtOffset isn't really necessary, you can achieve exactly the same thing with ME_RunOfsFromCharOfs (and I should have used it in ME_GetTextW instead of reimplementing the same functionality). I'm going to get rid of it later. Oh sorry, I haven't noticed that it already exists. Now when both EM_STREAMIN and EM_STREAMOUT work, I can start implementing the rest of the clipboard code. The RTF reader still has to be teached Unicode. Currently most of my existing .rtf documents are totally garbled. -- Ph.
Re: shlapi: Fixes for UrlIsW and UrlIsA
On Monday 14 March 2005 21:12, Mike McCormack wrote: Would you be able to write a conformance test using what you've found, to make sure it doesn't break again? I plan to do so as soon as I have finished the URLMon and InetAPI work I've been doing. -- [EMAIL PROTECTED] - Sydney, Australia pgplPVYYHA0Cw.pgp Description: PGP signature
Re: [patch] x86: fix ESP corruption CPU bug
Hello. Brian Gerst wrote: Can you tell me how the invisible high-word (invisible in VM-86, and in real mode) could possibly harm something running in VM-86 or read-mode ??? I don't even think it's a BUG. If the transition into and out of VM-86 doesn't handle the fact that the high-word of the stack hasn't been used in VM-86, then that piece of code is bad (the SP isn't even the same stack, BTW). Because even in 16-bit mode (real, vm86 or 16-bit protected) you can use 32-bit instructions, with an operand and/or address size override prefix. And the real problem is when the pure 32bit code is starting to use the 16bit stack for some strange reasons. Looks like the common technique for the early dos4gw -based apps...
Re: Problems with VirtualAlloc/Lock
* VirtualLock does nothing in Wine VirtualLock does nothing in win95,98,ME as well :) I bet the correct behaviour for wine is to do anything in VirtualLock only if you set windows version to NT/2000/XP. Did you do it? Anyway, mlock() seems to work fine, so this should be implementable. * Wine makes no distinction between MEM_RESERVE and MEM_COMMIT Assuming that we're talking about VirtualAlloc(). It would use mmap(): MAP_PRIVATE must be set. Always. MEM_RESERVE translates to MAP_NORESERVE (sic!) MEM_COMMIT translates to nothing, but it should zero the page and methinks linux would do it by default (?) MEM_TOP_DOWN translates maybe to MAP_GROWSDOWN (?) MEM_WRITE_WATCH can be implemented by mmapping a PROT_READ region, handling SEGSIGVs and then mprotect()ing it back to PROT_READ | PROT_WRITE It would also use madvise(): MEM_RESET translates to MADV_DONTNEED I wonder to what extent Wine really does any of that. Too busy to take a look at the actual code. * Wine has no implementation of Windows' process working sets Linux doesn't either. At least I don't know of a documented API that could reliably implement semantics of Windows working sets. Maybe it could be implemented on other OSes like some BSDs if they have such APIs. Maybe there's something in /proc/sys/vm or somesuch to tweak those, but then it would probably be system-wide. I'm no expert here I'm afraid :( * Wine limits MEM_RESERVE to 1GB, but WinXP goes up to 2GB Wine? Maybe linux, but I doubt wine would do anything like that. Further, these DLLs are audio processing plugins. The apparent fact that VirtualLock doesn't _actually_ lock memory into RAM for real time I didn't look into the code, but anyway a prerequisite for it would be to set windows version to NT/2000/XP. Or at least wine should behave like that, assuming that MSDN doesn't lie here. Apart from that, I bet you didn't raise ulimits for your processes. On my FC3 system, ulimit -l gives a meager 32 pages. So that's how many mlock() could lock anyway. So, in order for VirtualLock to be able to potentially screw up your rock-stable linux system, you have to let it first :) Cheers, Kuba
Re: [patch] x86: fix ESP corruption CPU bug
linux-os wrote: On Mon, 14 Mar 2005, Jakob Eriksson wrote: Andi Kleen wrote: Stas Sergeev [EMAIL PROTECTED] writes: Another way of saying the same thing: I absolutely hate seeing patches that fix some theoretical issue that no Linux apps will ever care about. No, it is not theoretical, but it is mainly about a DOS games and an MS linker, as for me. The things I'd like to get working, but the ones you may not care too much about:) The particular game I want to get working, is Master of Orion 2 for DOS. How about you just run it in dosbox instead of dosemu ? Yes, that's a solution of course, but it is a bit like saying why not use Open Office instead of MS Word. A long term goal of wine is to support DOS apps to. Of course it's not a priority, but it's there. regards, Jakob Can you tell me how the invisible high-word (invisible in VM-86, and in real mode) could possibly harm something running in VM-86 or read-mode ??? I don't even think it's a BUG. If the transition into and out of VM-86 doesn't handle the fact that the high-word of the stack hasn't been used in VM-86, then that piece of code is bad (the SP isn't even the same stack, BTW). Because even in 16-bit mode (real, vm86 or 16-bit protected) you can use 32-bit instructions, with an operand and/or address size override prefix. Of course this only works on 386 or later. -- Brian Gerst
Re: [MSVCRT] implement _mbsbtype
Raphael wrote: + if (!*str) { /** TODO: check *str validity */ +return -1; /** _MBC_ILLEGAL */ + } + if (start == str MSVCRT_isleadbyte(*str)) { +return 1; /** _MBC_LEAD */ + } + if (start == str MSVCRT_isleadbyte(str[-1])) { +return 2; /**_MBC_TRAIL */ + } + + return 0; /** _MBC_SINGLE */ Cool. How about patching mbctype.h with these constants too? --Juan __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/
MSN Webcam patch
RIght now I'm working on a patch so I can use my webcam under wine without having to switch to unix or use non-working solutions.. Right now there are 2 patches needed to get MSN to connect to the internet: first is to disable SSL, second strcpy's a value at urlmon getuseragent or something To get this to work, a few modifications to existing files are needed: First of all, if the catagory exists, let devenum return all from videoinput catagory: diff -Nru /root/wine-20050211/dlls/devenum/createdevenum.c wine-20050211/dlls/devenum/createdevenum.c --- /root/wine-20050211/dlls/devenum/createdevenum.c2005-01-25 11:56:39.0 +0100 +++ wine-20050211/dlls/devenum/createdevenum.c 2005-03-15 00:15:47.0 +0100 @@ -117,7 +117,8 @@ if (IsEqualGUID(clsidDeviceClass, CLSID_AudioRendererCategory) || IsEqualGUID(clsidDeviceClass, CLSID_AudioInputDeviceCategory) || -IsEqualGUID(clsidDeviceClass, CLSID_MidiRendererCategory)) +IsEqualGUID(clsidDeviceClass, CLSID_MidiRendererCategory) || +IsEqualGUID(clsidDeviceClass, CLSID_VideoInputDeviceCategory)) { hbasekey = HKEY_CURRENT_USER; strcpyW(wszRegKey, wszActiveMovieKey); and a few other patches to devenum main (Not sure if those are needed) diff -Nru /root/wine-20050211/dlls/devenum/devenum_main.c wine-20050211/dlls/devenum/devenum_main.c --- /root/wine-20050211/dlls/devenum/devenum_main.c 2004-12-07 15:37:11.0 +0100 +++ wine-20050211/dlls/devenum/devenum_main.c 2005-03-15 00:15:47.0 +0100 @@ -122,7 +122,7 @@ {CLSID_AudioCompressorCategory, acmcat, TRUE}, {CLSID_VideoCompressorCategory, vidcat, TRUE}, {CLSID_LegacyAmFilterCategory, filtcat, TRUE}, - {CLSID_VideoInputDeviceCategory, vfwcat, FALSE}, + {CLSID_VideoInputDeviceCategory, vfwcat, TRUE}, {CLSID_AudioInputDeviceCategory, wavein, FALSE}, {CLSID_AudioRendererCategory, waveout, FALSE}, {CLSID_MidiRendererCategory, midiout, FALSE}, @@ -156,7 +156,7 @@ pMapper = (IFilterMapper2*)mapvptr; -IFilterMapper2_CreateCategory(pMapper, CLSID_VideoInputDeviceCategory, MERIT_DO_NOT_USE, friendlyvidcap); +IFilterMapper2_CreateCategory(pMapper, CLSID_VideoInputDeviceCategory, MERIT_NORMAL, friendlyvidcap); IFilterMapper2_CreateCategory(pMapper, CLSID_LegacyAmFilterCategory, MERIT_NORMAL, friendlydshow); IFilterMapper2_CreateCategory(pMapper, CLSID_VideoCompressorCategory, MERIT_DO_NOT_USE, friendlyvidcomp); IFilterMapper2_CreateCategory(pMapper, CLSID_AudioInputDeviceCategory, MERIT_DO_NOT_USE, friendlyaudcap); I wanted to put all custom code into qcap, but because of the pins that's not possible. I wrote a basic stub for CaptureGraphBuilder and added it and regsvr calls to qcap. There s no current implementation of qcap, so therefore I added my gzipped qcap.tgz as an attachment (To keep things simple) My current implementation of the actual interface was based on filesource.c, so i made some functions and struct defs global in quartz: diff -Nru /root/wine-20050211/dlls/quartz/filesource.c wine-20050211/dlls/quartz/filesource.c --- /root/wine-20050211/dlls/quartz/filesource.c2005-01-06 20:36:47.0 +0100 +++ wine-20050211/dlls/quartz/filesource.c 2005-03-15 00:15:47.0 +0100 @@ -663,17 +663,6 @@ FileSource_GetCurFile }; - -/* the dwUserData passed back to user */ -typedef struct DATAREQUEST -{ -IMediaSample * pSample; /* sample passed to us by user */ -DWORD_PTR dwUserData; /* user data passed to us */ -OVERLAPPED ovl; /* our overlapped structure */ - -struct DATAREQUEST * pNext; /* next data request in list */ -} DATAREQUEST; - void queue(DATAREQUEST * pHead, DATAREQUEST * pItem) { DATAREQUEST * pCurrent; diff -Nru /root/wine-20050211/dlls/quartz/quartz_private.h wine-20050211/dlls/quartz/quartz_private.h --- /root/wine-20050211/dlls/quartz/quartz_private.h2005-02-10 18:13:18.0 +0100 +++ wine-20050211/dlls/quartz/quartz_private.h 2005-03-15 00:15:47.0 +0100 @@ -52,8 +52,8 @@ HRESULT QUARTZ_CreateSystemClock(IUnknown * pUnkOuter, LPVOID * ppv); HRESULT ACMWrapper_create(IUnknown * pUnkOuter, LPVOID * ppv); HRESULT WAVEParser_create(IUnknown * pUnkOuter, LPVOID * ppv); - HRESULT EnumMonikerImpl_Create(IMoniker ** ppMoniker, ULONG nMonikerCount, IEnumMoniker ** ppEnum); +HRESULT VfwCapture_create(IUnknown * pUnkOuter, LPVOID * ppv); typedef struct tagENUMPINDETAILS { @@ -80,4 +80,14 @@ BOOL CompareMediaTypes(const AM_MEDIA_TYPE * pmt1, const AM_MEDIA_TYPE * pmt2, BOOL bWildcards); void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE * pmt); +typedef struct DATAREQUEST +{ +IMediaSample * pSample; /* sample passed to us by user */ +DWORD_PTR dwUserData; /* user data passed to us */ +OVERLAPPED ovl; /* our overlapped structure */ + +struct DATAREQUEST * pNext; /* next data request in list */ +} DATAREQUEST; + +void queue(DATAREQUEST
Re: MSN Webcam patch
I have to be off somewhere in a few minutes (hence me being up this early), so I'll make this quick ;-) I wrote a couple of patches for webcam support too a while back, and gave these to some people who were asking for them, so I thought I'd share them here now, to also provide some input on it - mind you that I haven't worked on this for a while now, so it's not really as fresh in my memory anymore, but with this rece- nt interest in it I guess I'll start looking into it again too. Of course MSN still crashes after it's signed in .. but that's beside the point here, really now ;-) Would be nice to get the webcam preview stuff working tho, and make some headway with V4L and Wine along the way. Some of the things that you've changed I've changed, but aren't in the patches below - I really should document what I change as I go along ;-) Most of the major changes are there though. I also got stuck at qcap, but ended up simply using a native DLL for that. Again, I was really just tinkering along, seeing how far I could go without having to implement some major interface, using both native and builtin DLLs. Anyway, I'll see if I can find some time tomorrow to look back into it; I did have a lot of fun hacking on Wine, and indespite of my inexperience regarding DirectX, I'll try to contribute back some more useful patches, hopefully ulti- mately getting that webcam support working. Kind regards, Jasper - Forwarded message from Jasper van Veghel [EMAIL PROTECTED] - Date: Sat, 15 Jan 2005 14:18:47 +0100 From: Jasper van Veghel [EMAIL PROTECTED] To: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: video4linux - wine Hey Luis, Robbert, It's been a few weeks ago since I've worked on this stuff; I wrote some note- worthy patches and some hacks to get MSN working; I'll let you decide what's what ;-) In dlls/wininet/ I made the following two changes; The first is to get it to connect to MSN (not camera-related), as it tries to send text over SSL for some reason.. not sure if this is necessary (anymore) though, with rsabase and all: --- netconnection.c.old 2005-01-15 13:46:46.0 +0100 +++ netconnection.c 2004-12-14 22:38:19.0 +0100 @@ -104,7 +104,7 @@ void NETCON_init(WININET_NETCONNECTION *connection, BOOL useSSL) { -connection-useSSL = useSSL; +connection-useSSL = /*useSSL*/0; connection-socketFD = -1; if (connection-useSSL) { Note the date on those files by the way; they were taken from CVS around 12/14/04, so it's not a complete diff to the recent CVS. This one takes care of an unknown / undocumented optionId in InternetSetOptionAW that MSN uses in dlls/wininet/: --- internet.c.old 2005-01-15 13:55:56.0 +0100 +++ internet.c 2004-12-14 17:29:42.0 +0100 @@ -1962,6 +1962,9 @@ case INTERNET_OPTION_CONNECTED_STATE: FIXME(Option INTERNET_OPTION_CONNECTED_STATE: STUB\n); break; +case 87: + FIXME(Undocumented option 87: STUB\n); + break; default: FIXME(Option %ld STUB\n,dwOption); INTERNET_SetLastError(ERROR_INVALID_PARAMETER); Of more interest might be this change to dlls/devenum/createdevenum.c: --- createdevenum.c.old 2005-01-15 14:02:24.0 +0100 +++ createdevenum.c 2004-12-27 22:07:27.0 +0100 @@ -117,7 +117,8 @@ if (IsEqualGUID(clsidDeviceClass, CLSID_AudioRendererCategory) || IsEqualGUID(clsidDeviceClass, CLSID_AudioInputDeviceCategory) || -IsEqualGUID(clsidDeviceClass, CLSID_MidiRendererCategory)) +IsEqualGUID(clsidDeviceClass, CLSID_MidiRendererCategory) || + IsEqualGUID(clsidDeviceClass, CLSID_VideoInputDeviceCategory)) { hbasekey = HKEY_CURRENT_USER; strcpyW(wszRegKey, wszActiveMovieKey); @@ -142,7 +143,8 @@ { if (IsEqualGUID(clsidDeviceClass, CLSID_AudioRendererCategory) || IsEqualGUID(clsidDeviceClass, CLSID_AudioInputDeviceCategory) || -IsEqualGUID(clsidDeviceClass, CLSID_MidiRendererCategory)) +IsEqualGUID(clsidDeviceClass, CLSID_MidiRendererCategory) || + IsEqualGUID(clsidDeviceClass, CLSID_VideoInputDeviceCategory)) { HRESULT hr = DEVENUM_CreateSpecialCategories(); if (FAILED(hr)) @@ -411,6 +413,55 @@ CoTaskMemFree(pTypes); } } + +res = DEVENUM_CreateAMCategoryKey(CLSID_VideoInputDeviceCategory); +if (SUCCEEDED(res)) { /* can register device(s) in this category */ + for (i = 0; i 10; i++) { // the index can range from 0 thru 9 + WCHAR szDeviceName[80], szDeviceVersion[80]; + + if (capGetDriverDescriptionW ((WORD) i, + szDeviceName, sizeof (szDeviceName), + szDeviceVersion, sizeof (szDeviceVersion))) { + IMoniker * pMoniker = NULL; + + TRACE(\nSuccess !\n); + +
Re: combo - implement GetComboBoxInfo
On Mon, Mar 14, 2005 at 08:02:00PM -0800, Steven Edwards wrote: -FIXME(\n); -return FALSE; +LPHEADCOMBO lphc = (LPHEADCOMBO)GetWindowLongA( hwndCombo, 0 ); Please use GetWindowLongW(), the combo box is fully Unicode. +pcbi-hwndCombo = hwndCombo; +pcbi-hwndList = lphc-hWndLBox; +pcbi-hwndItem = lphc-hWndEdit; +pcbi-rcItem = lphc-textRect; +pcbi-rcButton = lphc-buttonRect; +pcbi-stateButton = (DWORD) lphc-wState; Fancy formatting... Bit yucky, no? -- Dimi.
Re: combo - implement GetComboBoxInfo
--- Dimitrie O. Paun [EMAIL PROTECTED] wrote: Please use GetWindowLongW(), the combo box is fully Unicode. OK I will hack it for him. This guy is new to C programing and I should have caught that. He has a bunch of VB apps that he uses this function in. +pcbi-hwndCombo = hwndCombo; +pcbi-hwndList = lphc-hWndLBox; +pcbi-hwndItem = lphc-hWndEdit; +pcbi-rcItem = lphc-textRect; +pcbi-rcButton = lphc-buttonRect; +pcbi-stateButton = (DWORD) lphc-wState; Fancy formatting... Bit yucky, no? Argh. Welcome to the Visual Studio 2005 Beta1, It even fscks your formatting in all sorta nice new ways. Thanks Steven __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/
Re: Problems with VirtualAlloc/Lock
On Mon, 2005-03-14 at 20:13, you wrote: * VirtualLock does nothing in Wine VirtualLock does nothing in win95,98,ME as well :) I bet the correct behaviour for wine is to do anything in VirtualLock only if you set windows version to NT/2000/XP. Did you do it? Good point. But the setting is winxp. I played with the setting and it doesn't change the behavior. Anyway, mlock() seems to work fine, so this should be implementable. That would be the natural call to use. The absence of mlock in the wine source tree was one of my early clues that there was a problem! %) * Wine makes no distinction between MEM_RESERVE and MEM_COMMIT Assuming that we're talking about VirtualAlloc(). Yes, but I wasn't specific enough. VirtualAlloc(MEM_RESERVE) and MEM_COMMIT are handled differently in the code. I don't understand the code, the design, or Linux mmap() sufficiently to say if they work correctly or not. They both end up calling mmap() which looks right. What I was trying to say is that in winxp MEM_RESERVE and MEM_COMMIT will VirtualAlloc() and/or VirtualLock very different amounts of memory than wine, even on the same (dual booting) machine. Here were my results when I tried to see how much winxp and wine would allocate and lock. The machine has 368M of RAM on it and a ~1GB paging file in Windows. winxp: 1. VirtualAlloc(MEM_RESERVE) - 2,086,912k 2. SetProcessWorkingSetSize(260,000k) + VirtualAlloc(MEM_COMMIT) + VirtualLock() - 259,072k 3. VirtualAlloc(MEM_COMMIT) - 1,011,712k wine: 1. VirtualAlloc(MEM_RESERVE) - 1,020,928k 2. SetProcessWorkingSetSize(260,000k) + VirtualAlloc(MEM_COMMIT) + VirtualLock() - 1,020,928k 3. VirtualAlloc(MEM_COMMIT) - 1,020,928k What I meant by makes no distinction is that wine always lets you MEM_RESERVE or MEM_COMMIT 1,020,928k no matter what. In winxp, * VirtualAlloc(MEM_COMMIT) seems bounded by the size of the paging file * VirtualAlloc(MEM_RESERVE) seems just to be 2GB * VirtualLock() is bounded by GetProcessWorkingSet * GetProcessWorkingSet is bounded by how much RAM you have * Wine has no implementation of Windows' process working sets Linux doesn't either. At least I don't know of a documented API that could reliably implement semantics of Windows working sets. Maybe it could be implemented on other OSes like some BSDs if they have such APIs. Maybe there's something in /proc/sys/vm or somesuch to tweak those, but then it would probably be system-wide. I'm no expert here I'm afraid :( I was wondering about getrtlimit/setrlimit. The upper bound of the working set size seems to map well to RLIMIT_MEMLOCK. However I can't see what the parallel would be for the lower bound. Also RLIMIT_AS could be the limit for how much memory you can MEM_RESERVE. These are process based values. They are available in Linux. Not sure about other platforms. * Wine limits MEM_RESERVE to 1GB, but WinXP goes up to 2GB Wine? Maybe linux, but I doubt wine would do anything like that. Yep, it does. Give it a try. As far as I can tell: int total = 0; for (;;) { LPVOID* leak = ::VirtualAlloc(NULL, 1048576, MEM_RESERVE, PROT_NOACCESS); if (leak) { total += 1048576/1024; printf(Allocated %ldk\r, total); } else { printf(\n); PrintWindowsError(VirtualAlloc, ::GetLastError(); break; } } will stop at 1,022,976k (1GB) on any wine machine. In winxp it goes up to 2GB, as it ought to. Further, these DLLs are audio processing plugins. The apparent fact that VirtualLock doesn't _actually_ lock memory into RAM for real time I didn't look into the code, but anyway a prerequisite for it would be to set windows version to NT/2000/XP. Or at least wine should behave like that, assuming that MSDN doesn't lie here. Apart from that, I bet you didn't raise ulimits for your processes. On my FC3 system, ulimit -l gives a meager 32 pages. So that's how many mlock() could lock anyway. There's not a problem there. My ulimit -l is unlimited. BTW we are using an old kernel which required a hack to mlock to allow us to lock more than half the ram (regardless of the ulimit), but that doesn't change any of this behavior. Thanks for your feedback... mo
Re: combo - implement GetComboBoxInfo
Steven Edwards [EMAIL PROTECTED] wrote: BOOL WINAPI GetComboBoxInfo(HWND hwndCombo, /* [in] handle to combo box */ PCOMBOBOXINFO pcbi /* [in/out] combo box information */) { -FIXME(\n); -return FALSE; +LPHEADCOMBO lphc = (LPHEADCOMBO)GetWindowLongA( hwndCombo, 0 ); + +pcbi-hwndCombo = hwndCombo; +pcbi-hwndList = lphc-hWndLBox; +pcbi-hwndItem = lphc-hWndEdit; +pcbi-rcItem = lphc-textRect; +pcbi-rcButton = lphc-buttonRect; +pcbi-stateButton = (DWORD) lphc-wState; +return TRUE; } Is it possible to do a check for lphc being NULL and keep indentation/spacing similar to the rest of the file? Also (DWORD) cast should not be needed. -- Dmitry.
Re: combo - implement GetComboBoxInfo
Dimitrie O. Paun [EMAIL PROTECTED] wrote: +LPHEADCOMBO lphc = (LPHEADCOMBO)GetWindowLongA( hwndCombo, 0 ); Please use GetWindowLongW(), the combo box is fully Unicode. Or rather GetWindowLongPtrW(). -- Dmitry.
Re: wine/ misc/registry.c documentation/samples/co ...
On Mon, Mar 14, 2005 at 11:18:40AM -0600, Alexandre Julliard wrote: Log message: Get rid of the remaining registry configuration parameters. Any plans on getting the global registry back? -- Dimi.
Regression (SimCity 3000 is Broke )
After working prefectly for over 2 years SimCity 3000 is broken. The patch that broke it is http://www.winehq.org/hypermail/wine-cvs/2005/03/0098.html basicly the problem is simple. The source and the destination are both the same surface in DIB_DirectDrawSurface_Blt() and with the new locking in place the destination never gets updated. So althought it might fix Picasa2 it is definatly not correct. -- Tony Lambregts
IBM Acknowledges Wine! Offers bounty to port it to PPC64!
IBM has started a new contest meant to spur open source development on their POWER architecture, http://www.linuxonpower.com/ Prizes are offered for coders that port some common open source applications to the architecture. A Tier 2 prize, a Mac G5, is offered to anyone who can port one of the list of Tier 2 applications. Color me shocked to find Wine and Winelib listed there! This marks a change in IBMs policy towards Wine, or perhaps signals a management oversight. While normally it seems that they have an active policy of censoring any references to Wine and completely denying its existence, here they are offering prizes for porting it to PPC. So, now, I guess, the obvious questions: Does Winelib even need any porting? Does it build on PPC as it is? Can we run notepad and such on Linux/PPC? Does any of the work done on porting to AMD64 help us here? Thanks, Scott Ritchie
Re: IBM Acknowledges Wine! Offers bounty to port it to PPC64!
On Mon, 14 Mar 2005 23:14:39 -0800, Scott Ritchie [EMAIL PROTECTED] wrote: This marks a change in IBMs policy towards Wine, or perhaps signals a management oversight. While normally it seems that they have an active policy of censoring any references to Wine and completely denying its existence, here they are offering prizes for porting it to PPC. I don't agree with this statement and here is why: http://www-128.ibm.com/developerworks/linux/library/l-wine/index.html http://www-128.ibm.com/developerworks/linux/library/l-toppage/index.html http://www-128.ibm.com/developerworks/linux/library/l-sc10.html http://www-128.ibm.com/developerworks/linux/library/l-emulat.html -Tom Thanks, Scott Ritchie