Vitaly Lipatov wrote:
INT21_CreateMagicDeviceHandle in winedos/int21.c uses the same dummy file magic with open file with unix path from wine_get_server_dir(). I guess we could use NtCreateFile on unix path before. Now we need select correct place for such dummy files inside wine disk tree...
Yeah. Evan has been sitting on a patch to fix this for a week now. Evan, I'd say it's time to post your minimal test and the fix, even if things are broken. - Dan
On 6/16/07, Dan Kegel dank@kegel.com wrote:
Vitaly Lipatov wrote:
INT21_CreateMagicDeviceHandle in winedos/int21.c uses the same dummy file magic with open file with unix path from wine_get_server_dir(). I guess we could use NtCreateFile on unix path before. Now we need select correct place for such dummy files inside wine disk tree...
Yeah. Evan has been sitting on a patch to fix this for a week now. Evan, I'd say it's time to post your minimal test and the fix, even if things are broken.
- Dan
On that note, I have been unable to get Wine to run dos .com programs (including via cmd.exe). It gets stuck in an infinite loop in DOSVM. Is there some trick to getting .com programs running?
Evan Stade wrote:
On that note, I have been unable to get Wine to run dos .com programs (including via cmd.exe). It gets stuck in an infinite loop in DOSVM. Is there some trick to getting .com programs running?
There's a regression, freecom [1] used to work, now it doesn't. Perhaps it has to do with the signaling stuff [2]. If I find some time/motivation I'll have a look at it.
Markus
[1] http://freedos.sourceforge.net/freecom/packages/082pl3/ [2] http://www.winehq.org/pipermail/wine-patches/2004-November/013645.html
В сообщении от 17 июня 2007 Dan Kegel написал(a):
Vitaly Lipatov wrote:
INT21_CreateMagicDeviceHandle in winedos/int21.c uses the same dummy file magic with open file with unix path from wine_get_server_dir(). I guess we could use NtCreateFile on unix path before. Now we need select correct place for such dummy files inside wine disk tree...
Yeah. Evan has been sitting on a patch to fix this for a week now. Evan, I'd say it's time to post your minimal test and the fix, even if things are broken.
- Dan
JFYI: I have a patch to fix this via use temp dir, not server dir:
--- dlls/kernel32/vxd.c 9 Apr 2007 12:37:34 -0000 1.5 +++ dlls/kernel32/vxd.c 16 Jun 2007 14:29:49 -0000 @@ -91,7 +91,7 @@ static CRITICAL_SECTION vxd_section = { /* create a file handle to represent a VxD, by opening a dummy file in the wineserver directory */ static HANDLE open_vxd_handle( LPCWSTR name ) { - const char *dir = wine_get_server_dir(); + WCHAR path[MAX_PATH]; int len; HANDLE ret; NTSTATUS status; @@ -99,17 +99,16 @@ static HANDLE open_vxd_handle( LPCWSTR n UNICODE_STRING nameW; IO_STATUS_BLOCK io;
- len = MultiByteToWideChar( CP_UNIXCP, 0, dir, -1, NULL, 0 ); - nameW.Length = (len + 1 + strlenW( name )) * sizeof(WCHAR); - nameW.MaximumLength = nameW.Length + sizeof(WCHAR); - if (!(nameW.Buffer = HeapAlloc( GetProcessHeap(), 0, nameW.Length ))) + len = GetTempPathW(sizeof(path), path); + path[len-1] = '\'; + /* Lav: Possible stack overflow */ + strcpyW( path + len, name ); + + if (!RtlDosPathNameToNtPathName_U( path, &nameW, NULL, NULL )) { - SetLastError( ERROR_NOT_ENOUGH_MEMORY ); - return 0; + SetLastError( ERROR_PATH_NOT_FOUND ); + return INVALID_HANDLE_VALUE; } - MultiByteToWideChar( CP_UNIXCP, 0, dir, -1, nameW.Buffer, len ); - nameW.Buffer[len-1] = '/'; - strcpyW( nameW.Buffer + len, name );
attr.Length = sizeof(attr); attr.RootDirectory = 0;