winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
December 2009
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
1233 discussions
Start a n
N
ew thread
Alexandre Julliard : user32: Don' t pass the 16-bit instance through to 32-bit MessageBoxIndirectA.
by Alexandre Julliard
28 Dec '09
28 Dec '09
Module: wine Branch: master Commit: d51a6b673c22ad31321822bcb1c9a9ed0675eca0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d51a6b673c22ad31321822bcb…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Dec 23 17:11:53 2009 +0100 user32: Don't pass the 16-bit instance through to 32-bit MessageBoxIndirectA. --- dlls/user.exe16/window.c | 31 +++++++++++++++++++++++++++---- 1 files changed, 27 insertions(+), 4 deletions(-) diff --git a/dlls/user.exe16/window.c b/dlls/user.exe16/window.c index c746a1f..244924f 100644 --- a/dlls/user.exe16/window.c +++ b/dlls/user.exe16/window.c @@ -23,6 +23,9 @@ #include "user_private.h" #include "wine/list.h" #include "wine/server.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(win); /* size of buffer needed to store an atom string */ #define ATOM_BUFFER_SIZE 256 @@ -2099,17 +2102,37 @@ INT16 WINAPI SetWindowRgn16( HWND16 hwnd, HRGN16 hrgn, BOOL16 redraw ) */ INT16 WINAPI MessageBoxIndirect16( LPMSGBOXPARAMS16 msgbox ) { + char caption[256], text[256]; MSGBOXPARAMSA msgbox32; msgbox32.cbSize = msgbox->cbSize; msgbox32.hwndOwner = WIN_Handle32( msgbox->hwndOwner ); - msgbox32.hInstance = HINSTANCE_32(msgbox->hInstance); - msgbox32.lpszText = MapSL(msgbox->lpszText); - msgbox32.lpszCaption = MapSL(msgbox->lpszCaption); + msgbox32.hInstance = 0; msgbox32.dwStyle = msgbox->dwStyle; - msgbox32.lpszIcon = MapSL(msgbox->lpszIcon); + msgbox32.lpszIcon = NULL; msgbox32.dwContextHelpId = msgbox->dwContextHelpId; msgbox32.lpfnMsgBoxCallback = msgbox->lpfnMsgBoxCallback; msgbox32.dwLanguageId = msgbox->dwLanguageId; + + if (!HIWORD(msgbox->lpszCaption)) + { + LoadString16( msgbox->hInstance, LOWORD(msgbox->lpszCaption), caption, sizeof(caption) ); + msgbox32.lpszCaption = caption; + } + else msgbox32.lpszCaption = MapSL(msgbox->lpszCaption); + + if (!HIWORD(msgbox->lpszText)) + { + LoadString16( msgbox->hInstance, LOWORD(msgbox->lpszText), text, sizeof(text) ); + msgbox32.lpszText = text; + } + else msgbox32.lpszText = MapSL(msgbox->lpszText); + + if ((msgbox->dwStyle & MB_ICONMASK) == MB_USERICON) + { + FIXME( "user icon %s not supported\n", debugstr_a( MapSL(msgbox->lpszIcon) )); + msgbox32.dwStyle &= ~MB_USERICON; + } + return MessageBoxIndirectA( &msgbox32 ); }
1
0
0
0
Alexandre Julliard : user32: Move handling of listbox sizes for Win 3. 1 apps to the 16-bit code.
by Alexandre Julliard
28 Dec '09
28 Dec '09
Module: wine Branch: master Commit: 537877adaee0199e2f28d89c1f69c5a4fc1aeb70 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=537877adaee0199e2f28d89c1…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Dec 24 21:09:17 2009 +0100 user32: Move handling of listbox sizes for Win 3.1 apps to the 16-bit code. --- dlls/user.exe16/message.c | 39 +++++++++++++++++++++++++++++++++++++++ dlls/user32/listbox.c | 26 -------------------------- 2 files changed, 39 insertions(+), 26 deletions(-) diff --git a/dlls/user.exe16/message.c b/dlls/user.exe16/message.c index ee7fa46..b8a5190 100644 --- a/dlls/user.exe16/message.c +++ b/dlls/user.exe16/message.c @@ -584,6 +584,12 @@ static HANDLE16 convert_handle_32_to_16(UINT_PTR src, unsigned int flags) return dst; } +static BOOL is_old_app( HWND hwnd ) +{ + HINSTANCE inst = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE ); + return inst && !((ULONG_PTR)inst >> 16) && (GetExpWinVer16(LOWORD(inst)) & 0xFF00) == 0x0300; +} + static int find_sub_menu( HMENU *hmenu, HMENU16 target ) { int i, pos, count = GetMenuItemCount( *hmenu ); @@ -2382,6 +2388,39 @@ static LRESULT listbox_proc16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam switch (msg) { + case WM_SIZE: + if (is_old_app( hwnd )) + { + DWORD style = GetWindowLongW( hwnd, GWL_STYLE ); + int width, height, remaining, item_height; + RECT rect; + + /* give a margin for error to old 16 bits programs - if we need + less than the height of the nonclient area, round to the + *next* number of items */ + + if (!(style & LBS_NOINTEGRALHEIGHT) && !(style & LBS_OWNERDRAWVARIABLE)) + { + GetClientRect( hwnd, &rect ); + width = rect.right - rect.left; + height = rect.bottom - rect.top; + item_height = wow_handlers32.listbox_proc( hwnd, LB_GETITEMHEIGHT, 0, 0, FALSE ); + remaining = item_height ? (height % item_height) : 0; + if ((height > item_height) && remaining) + { + GetWindowRect( hwnd, &rect ); + if ((item_height - remaining) <= rect.bottom - rect.top - height) + remaining = remaining - item_height; + TRACE( "[%p]: changing height %d -> %d\n", hwnd, height, height - remaining ); + SetWindowPos( hwnd, 0, 0, 0, rect.right - rect.left, + rect.bottom - rect.top - remaining, + SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOMOVE ); + return 0; + } + } + } + return wow_handlers32.listbox_proc( hwnd, msg, wParam, lParam, unicode ); + case LB_RESETCONTENT16: case LB_DELETESTRING16: case LB_GETITEMDATA16: diff --git a/dlls/user32/listbox.c b/dlls/user32/listbox.c index 983eee6..059be04 100644 --- a/dlls/user32/listbox.c +++ b/dlls/user32/listbox.c @@ -39,7 +39,6 @@ #include "windef.h" #include "winbase.h" #include "wingdi.h" -#include "wine/winbase16.h" #include "wine/unicode.h" #include "user_private.h" #include "controls.h" @@ -161,13 +160,6 @@ const struct builtin_class_descr COMBOLBOX_builtin_class = }; -/* check whether app is a Win 3.1 app */ -static inline BOOL is_old_app( LB_DESCR *descr ) -{ - return (GetExpWinVer16( GetWindowLongPtrW(descr->self, GWLP_HINSTANCE) ) & 0xFF00 ) == 0x0300; -} - - /*********************************************************************** * LISTBOX_GetCurrentPageSize * @@ -394,14 +386,6 @@ static void LISTBOX_UpdateSize( LB_DESCR *descr ) remaining = 0; if ((descr->height > descr->item_height) && remaining) { - if (is_old_app(descr)) - { /* give a margin for error to 16 bits programs - if we need - less than the height of the nonclient area, round to the - *next* number of items */ - int ncheight = rect.bottom - rect.top - descr->height; - if ((descr->item_height - remaining) <= ncheight) - remaining = remaining - descr->item_height; - } TRACE("[%p]: changing height %d -> %d\n", descr->self, descr->height, descr->height - remaining ); SetWindowPos( descr->self, 0, 0, 0, rect.right - rect.left, @@ -2517,16 +2501,6 @@ static BOOL LISTBOX_Create( HWND hwnd, LPHEADCOMBO lphc ) descr->locale = GetUserDefaultLCID(); descr->lphc = lphc; - if (is_old_app(descr) && ( descr->style & ( WS_VSCROLL | WS_HSCROLL ) ) ) - { - /* Win95 document "List Box Differences" from MSDN: - If a list box in a version 3.x application has either the - WS_HSCROLL or WS_VSCROLL style, the list box receives both - horizontal and vertical scroll bars. - */ - descr->style |= WS_VSCROLL | WS_HSCROLL; - } - if( lphc ) { TRACE("[%p]: resetting owner %p -> %p\n", descr->self, descr->owner, lphc->self );
1
0
0
0
Alexandre Julliard : include: Move undocumented Win9x function definitions to winbase16.h.
by Alexandre Julliard
28 Dec '09
28 Dec '09
Module: wine Branch: master Commit: 21ddb9f48e219ddb073c9874bc64222635a11902 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=21ddb9f48e219ddb073c9874b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Dec 24 20:28:12 2009 +0100 include: Move undocumented Win9x function definitions to winbase16.h. --- dlls/ddeml.dll16/ddeml.c | 1 + dlls/msvideo.dll16/msvideo16.c | 1 + dlls/ole2disp.dll16/ole2disp.c | 3 +- dlls/olecli.dll16/olecli.c | 1 + dlls/setupx.dll16/devinst16.c | 1 + dlls/winaspi.dll16/winaspi.c | 1 + include/winbase.h | 42 ---------------------------------------- include/wine/winbase16.h | 39 +++++++++++++++++++++++++++++++++++++ 8 files changed, 46 insertions(+), 43 deletions(-) diff --git a/dlls/ddeml.dll16/ddeml.c b/dlls/ddeml.dll16/ddeml.c index 874c456..e0a9dda 100644 --- a/dlls/ddeml.dll16/ddeml.c +++ b/dlls/ddeml.dll16/ddeml.c @@ -30,6 +30,7 @@ #include "windef.h" #include "winbase.h" #include "wine/windef16.h" +#include "wine/winbase16.h" #include "wownt32.h" #include "dde.h" #include "ddeml.h" diff --git a/dlls/msvideo.dll16/msvideo16.c b/dlls/msvideo.dll16/msvideo16.c index 6970278..e157808 100644 --- a/dlls/msvideo.dll16/msvideo16.c +++ b/dlls/msvideo.dll16/msvideo16.c @@ -29,6 +29,7 @@ #include "winnls.h" #include "winreg.h" #include "winuser.h" +#include "wine/winbase16.h" #include "vfw16.h" #include "wine/debug.h" diff --git a/dlls/ole2disp.dll16/ole2disp.c b/dlls/ole2disp.dll16/ole2disp.c index a09ef7c..081683e 100644 --- a/dlls/ole2disp.dll16/ole2disp.c +++ b/dlls/ole2disp.dll16/ole2disp.c @@ -23,7 +23,6 @@ #include <stdarg.h> #include <string.h> -#include "wine/windef16.h" #include "windef.h" #include "winbase.h" #include "wingdi.h" @@ -31,6 +30,8 @@ #include "ole2.h" #include "oleauto.h" #include "winerror.h" +#include "wine/windef16.h" +#include "wine/winbase16.h" #include "ole2disp.h" diff --git a/dlls/olecli.dll16/olecli.c b/dlls/olecli.dll16/olecli.c index a37254b..ad59fa3 100644 --- a/dlls/olecli.dll16/olecli.c +++ b/dlls/olecli.dll16/olecli.c @@ -27,6 +27,7 @@ #include "windef.h" #include "wine/windef16.h" +#include "wine/winbase16.h" #include "winbase.h" #include "wingdi.h" #include "wownt32.h" diff --git a/dlls/setupx.dll16/devinst16.c b/dlls/setupx.dll16/devinst16.c index 6c78aec..fb98f42 100644 --- a/dlls/setupx.dll16/devinst16.c +++ b/dlls/setupx.dll16/devinst16.c @@ -22,6 +22,7 @@ #include "windef.h" #include "winbase.h" +#include "wine/winbase16.h" #include "setupx16.h" #include "wine/debug.h" diff --git a/dlls/winaspi.dll16/winaspi.c b/dlls/winaspi.dll16/winaspi.c index 9ef9974..aceef36 100644 --- a/dlls/winaspi.dll16/winaspi.c +++ b/dlls/winaspi.dll16/winaspi.c @@ -34,6 +34,7 @@ #include "windef.h" #include "winbase.h" #include "wine/windef16.h" +#include "wine/winbase16.h" #include "winreg.h" #include "wownt32.h" #include "aspi.h" diff --git a/include/winbase.h b/include/winbase.h index 8298cbd..1cd26f5 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -2304,48 +2304,6 @@ WINBASEAPI UINT WINAPI _lwrite(HFILE,LPCSTR,UINT); #define ZeroMemory RtlZeroMemory #define CopyMemory RtlCopyMemory -/* undocumented functions */ - -typedef struct tagSYSLEVEL -{ - CRITICAL_SECTION crst; - INT level; -} SYSLEVEL; - -/* [GS]etProcessDword offsets */ -#define GPD_APP_COMPAT_FLAGS (-56) -#define GPD_LOAD_DONE_EVENT (-52) -#define GPD_HINSTANCE16 (-48) -#define GPD_WINDOWS_VERSION (-44) -#define GPD_THDB (-40) -#define GPD_PDB (-36) -#define GPD_STARTF_SHELLDATA (-32) -#define GPD_STARTF_HOTKEY (-28) -#define GPD_STARTF_SHOWWINDOW (-24) -#define GPD_STARTF_SIZE (-20) -#define GPD_STARTF_POSITION (-16) -#define GPD_STARTF_FLAGS (-12) -#define GPD_PARENT (- 8) -#define GPD_FLAGS (- 4) -#define GPD_USERDATA ( 0) - -WINBASEAPI void WINAPI DisposeLZ32Handle(HANDLE); -WINBASEAPI HANDLE WINAPI DosFileHandleToWin32Handle(HFILE); -WINBASEAPI DWORD WINAPI GetProcessDword(DWORD,INT); -WINBASEAPI VOID WINAPI GetpWin16Lock(SYSLEVEL**); -WINBASEAPI DWORD WINAPI MapLS(LPCVOID); -WINBASEAPI LPVOID WINAPI MapSL(DWORD); -WINBASEAPI VOID WINAPI ReleaseThunkLock(DWORD*); -WINBASEAPI VOID WINAPI RestoreThunkLock(DWORD); -WINBASEAPI VOID WINAPI UnMapLS(DWORD); -WINBASEAPI HFILE WINAPI Win32HandleToDosFileHandle(HANDLE); -WINBASEAPI VOID WINAPI _CheckNotSysLevel(SYSLEVEL *lock); -WINBASEAPI DWORD WINAPI _ConfirmWin16Lock(void); -WINBASEAPI DWORD WINAPI _ConfirmSysLevel(SYSLEVEL*); -WINBASEAPI VOID WINAPI _EnterSysLevel(SYSLEVEL*); -WINBASEAPI VOID WINAPI _LeaveSysLevel(SYSLEVEL*); - - /* Wine internal functions */ extern char * CDECL wine_get_unix_file_name( LPCWSTR dos ); diff --git a/include/wine/winbase16.h b/include/wine/winbase16.h index 0e41cba..aaa3336 100644 --- a/include/wine/winbase16.h +++ b/include/wine/winbase16.h @@ -320,6 +320,30 @@ typedef struct #define __AHINCR (1 << __AHSHIFT) /* undocumented functions */ + +typedef struct tagSYSLEVEL +{ + CRITICAL_SECTION crst; + INT level; +} SYSLEVEL; + +/* [GS]etProcessDword offsets */ +#define GPD_APP_COMPAT_FLAGS (-56) +#define GPD_LOAD_DONE_EVENT (-52) +#define GPD_HINSTANCE16 (-48) +#define GPD_WINDOWS_VERSION (-44) +#define GPD_THDB (-40) +#define GPD_PDB (-36) +#define GPD_STARTF_SHELLDATA (-32) +#define GPD_STARTF_HOTKEY (-28) +#define GPD_STARTF_SHOWWINDOW (-24) +#define GPD_STARTF_SIZE (-20) +#define GPD_STARTF_POSITION (-16) +#define GPD_STARTF_FLAGS (-12) +#define GPD_PARENT (- 8) +#define GPD_FLAGS (- 4) +#define GPD_USERDATA ( 0) + WORD WINAPI AllocCStoDSAlias16(WORD); WORD WINAPI AllocDStoCSAlias16(WORD); HGLOBAL16 WINAPI AllocResource16(HINSTANCE16,HRSRC16,DWORD); @@ -327,6 +351,8 @@ WORD WINAPI AllocSelector16(WORD); WORD WINAPI AllocSelectorArray16(WORD); VOID WINAPI DirectedYield16(HTASK16); HGLOBAL16 WINAPI DirectResAlloc16(HINSTANCE16,WORD,UINT16); +void WINAPI DisposeLZ32Handle(HANDLE); +HANDLE WINAPI DosFileHandleToWin32Handle(HFILE); HANDLE16 WINAPI FarGetOwner16(HGLOBAL16); VOID WINAPI FarSetOwner16(HGLOBAL16,HANDLE16); FARPROC16 WINAPI FileCDR16(FARPROC16); @@ -346,7 +372,9 @@ INT16 WINAPI GetInstanceData16(HINSTANCE16,WORD,INT16); BOOL16 WINAPI GetModuleName16(HINSTANCE16,LPSTR,INT16); INT16 WINAPI GetModuleUsage16(HINSTANCE16); UINT16 WINAPI GetNumTasks16(void); +VOID WINAPI GetpWin16Lock(SYSLEVEL**); SEGPTR WINAPI GetpWin16Lock16(void); +DWORD WINAPI GetProcessDword(DWORD,INT); DWORD WINAPI GetSelectorLimit16(WORD); FARPROC16 WINAPI GetSetKernelDOSProc16(FARPROC16 DosProc); HINSTANCE16 WINAPI GetTaskDS16(void); @@ -375,10 +403,14 @@ WORD WINAPI LocalHeapSize16(void); BOOL16 WINAPI LocalInit16(HANDLE16,WORD,WORD); FARPROC16 WINAPI LocalNotify16(FARPROC16); HTASK16 WINAPI LockCurrentTask16(BOOL16); +DWORD WINAPI MapLS(LPCVOID); +LPVOID WINAPI MapSL(DWORD); VOID WINAPI OldYield16(void); VOID WINAPI WIN32_OldYield16(void); VOID WINAPI PostEvent16(HTASK16); WORD WINAPI PrestoChangoSelector16(WORD,WORD); +VOID WINAPI ReleaseThunkLock(DWORD*); +VOID WINAPI RestoreThunkLock(DWORD); WORD WINAPI SelectorAccessRights16(WORD,WORD,WORD); void WINAPI SetFastQueue16(DWORD,HQUEUE16); VOID WINAPI SetPriority16(HTASK16,INT16); @@ -387,11 +419,18 @@ WORD WINAPI SetSelectorLimit16(WORD,DWORD); HQUEUE16 WINAPI SetTaskQueue16(HTASK16,HQUEUE16); HQUEUE16 WINAPI SetThreadQueue16(DWORD,HQUEUE16); VOID WINAPI SwitchStackTo16(WORD,WORD,WORD); +VOID WINAPI UnMapLS(DWORD); BOOL16 WINAPI WaitEvent16(HTASK16); +HFILE WINAPI Win32HandleToDosFileHandle(HANDLE); VOID WINAPI WriteOutProfiles16(void); VOID WINAPI hmemcpy16(LPVOID,LPCVOID,LONG); +VOID WINAPI _CheckNotSysLevel(SYSLEVEL *lock); +DWORD WINAPI _ConfirmSysLevel(SYSLEVEL*); +DWORD WINAPI _ConfirmWin16Lock(void); VOID WINAPI _CreateSysLevel(SYSLEVEL*,INT); +VOID WINAPI _EnterSysLevel(SYSLEVEL*); VOID WINAPI _EnterWin16Lock(void); +VOID WINAPI _LeaveSysLevel(SYSLEVEL*); VOID WINAPI _LeaveWin16Lock(void);
1
0
0
0
Alexandre Julliard : user32: Use a standard critical section instead of a syslevel for the USER lock.
by Alexandre Julliard
28 Dec '09
28 Dec '09
Module: wine Branch: master Commit: 5d92931933e16fbe42ad37a32214b73146abbf10 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5d92931933e16fbe42ad37a32…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Dec 24 17:42:19 2009 +0100 user32: Use a standard critical section instead of a syslevel for the USER lock. --- dlls/user32/user_main.c | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/dlls/user32/user_main.c b/dlls/user32/user_main.c index 7868e19..a61a67d 100644 --- a/dlls/user32/user_main.c +++ b/dlls/user32/user_main.c @@ -39,14 +39,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(graphics); HMODULE user32_module = 0; -static SYSLEVEL USER_SysLevel; +static CRITICAL_SECTION user_section; static CRITICAL_SECTION_DEBUG critsect_debug = { - 0, 0, &USER_SysLevel.crst, + 0, 0, &user_section, { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, - 0, 0, { (DWORD_PTR)(__FILE__ ": USER_SysLevel") } + 0, 0, { (DWORD_PTR)(__FILE__ ": user_section") } }; -static SYSLEVEL USER_SysLevel = { { &critsect_debug, -1, 0, 0, 0, 0 }, 2 }; +static CRITICAL_SECTION user_section = { &critsect_debug, -1, 0, 0, 0, 0 }; static HPALETTE (WINAPI *pfnGDISelectPalette)( HDC hdc, HPALETTE hpal, WORD bkgnd ); static UINT (WINAPI *pfnGDIRealizePalette)( HDC hdc ); @@ -62,7 +62,7 @@ extern void WDML_NotifyThreadDetach(void); */ void USER_Lock(void) { - _EnterSysLevel( &USER_SysLevel ); + EnterCriticalSection( &user_section ); } @@ -71,7 +71,7 @@ void USER_Lock(void) */ void USER_Unlock(void) { - _LeaveSysLevel( &USER_SysLevel ); + LeaveCriticalSection( &user_section ); } @@ -82,7 +82,11 @@ void USER_Unlock(void) */ void USER_CheckNotLock(void) { - _CheckNotSysLevel( &USER_SysLevel ); + if (user_section.OwningThread == ULongToHandle(GetCurrentThreadId()) && user_section.RecursionCount) + { + ERR( "BUG: holding USER lock\n" ); + DebugBreak(); + } }
1
0
0
0
Alexandre Julliard : gdi32: Use a standard critical section instead of a syslevel for the GDI lock.
by Alexandre Julliard
28 Dec '09
28 Dec '09
Module: wine Branch: master Commit: 0d07420ecf920142ba0f6aea80d7140c3ddc6df6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0d07420ecf920142ba0f6aea8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Dec 24 17:42:13 2009 +0100 gdi32: Use a standard critical section instead of a syslevel for the GDI lock. --- dlls/gdi32/gdiobj.c | 34 +++++++++++++++++++--------------- 1 files changed, 19 insertions(+), 15 deletions(-) diff --git a/dlls/gdi32/gdiobj.c b/dlls/gdi32/gdiobj.c index 245b1cc..d32450a 100644 --- a/dlls/gdi32/gdiobj.c +++ b/dlls/gdi32/gdiobj.c @@ -67,14 +67,14 @@ static const LOGPEN DCPen = { PS_SOLID, { 0, 0 }, RGB(0,0,0) }; static HGDIOBJ stock_objects[NB_STOCK_OBJECTS]; -static SYSLEVEL GDI_level; +static CRITICAL_SECTION gdi_section; static CRITICAL_SECTION_DEBUG critsect_debug = { - 0, 0, &GDI_level.crst, + 0, 0, &gdi_section, { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, - 0, 0, { (DWORD_PTR)(__FILE__ ": GDI_level") } + 0, 0, { (DWORD_PTR)(__FILE__ ": gdi_section") } }; -static SYSLEVEL GDI_level = { { &critsect_debug, -1, 0, 0, 0, 0 }, 3 }; +static CRITICAL_SECTION gdi_section = { &critsect_debug, -1, 0, 0, 0, 0 }; /**************************************************************************** @@ -649,18 +649,18 @@ HGDIOBJ alloc_gdi_handle( GDIOBJHDR *obj, WORD type, const struct gdi_obj_funcs obj->funcs = funcs; obj->hdcs = NULL; - _EnterSysLevel( &GDI_level ); + EnterCriticalSection( &gdi_section ); for (i = next_large_handle + 1; i < MAX_LARGE_HANDLES; i++) if (!large_handles[i]) goto found; for (i = 0; i <= next_large_handle; i++) if (!large_handles[i]) goto found; - _LeaveSysLevel( &GDI_level ); + LeaveCriticalSection( &gdi_section ); return 0; found: large_handles[i] = obj; next_large_handle = i; - _LeaveSysLevel( &GDI_level ); + LeaveCriticalSection( &gdi_section ); return (HGDIOBJ)(ULONG_PTR)((i + FIRST_LARGE_HANDLE) << 2); } @@ -678,10 +678,10 @@ void *free_gdi_handle( HGDIOBJ handle ) i = ((ULONG_PTR)handle >> 2) - FIRST_LARGE_HANDLE; if (i >= 0 && i < MAX_LARGE_HANDLES) { - _EnterSysLevel( &GDI_level ); + EnterCriticalSection( &gdi_section ); object = large_handles[i]; large_handles[i] = NULL; - _LeaveSysLevel( &GDI_level ); + LeaveCriticalSection( &gdi_section ); } if (object) { @@ -704,7 +704,7 @@ void *GDI_GetObjPtr( HGDIOBJ handle, WORD type ) GDIOBJHDR *ptr = NULL; int i; - _EnterSysLevel( &GDI_level ); + EnterCriticalSection( &gdi_section ); i = ((UINT_PTR)handle >> 2) - FIRST_LARGE_HANDLE; if (i >= 0 && i < MAX_LARGE_HANDLES) @@ -715,10 +715,10 @@ void *GDI_GetObjPtr( HGDIOBJ handle, WORD type ) if (!ptr) { - _LeaveSysLevel( &GDI_level ); + LeaveCriticalSection( &gdi_section ); WARN( "Invalid handle %p\n", handle ); } - else TRACE("(%p): enter %d\n", handle, GDI_level.crst.RecursionCount); + else TRACE("(%p): enter %d\n", handle, gdi_section.RecursionCount); return ptr; } @@ -730,8 +730,8 @@ void *GDI_GetObjPtr( HGDIOBJ handle, WORD type ) */ void GDI_ReleaseObj( HGDIOBJ handle ) { - TRACE("(%p): leave %d\n", handle, GDI_level.crst.RecursionCount); - _LeaveSysLevel( &GDI_level ); + TRACE("(%p): leave %d\n", handle, gdi_section.RecursionCount); + LeaveCriticalSection( &gdi_section ); } @@ -740,7 +740,11 @@ void GDI_ReleaseObj( HGDIOBJ handle ) */ void GDI_CheckNotLock(void) { - _CheckNotSysLevel( &GDI_level ); + if (gdi_section.OwningThread == ULongToHandle(GetCurrentThreadId()) && gdi_section.RecursionCount) + { + ERR( "BUG: holding GDI lock\n" ); + DebugBreak(); + } }
1
0
0
0
Paul Vriens : mmdevapi/tests: Fix a test failure on Vista+ with no soundcard present.
by Alexandre Julliard
24 Dec '09
24 Dec '09
Module: wine Branch: master Commit: 20a50f30c4ab57330436438ee42bbc5b491623fd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=20a50f30c4ab57330436438ee…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Thu Dec 24 13:12:36 2009 +0100 mmdevapi/tests: Fix a test failure on Vista+ with no soundcard present. --- dlls/mmdevapi/tests/dependency.c | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-) diff --git a/dlls/mmdevapi/tests/dependency.c b/dlls/mmdevapi/tests/dependency.c index 1568bed..0d60cb2 100644 --- a/dlls/mmdevapi/tests/dependency.c +++ b/dlls/mmdevapi/tests/dependency.c @@ -55,15 +55,18 @@ START_TEST(dependency) if (FAILED(hr)) { skip("mmdevapi not available: 0x%08x\n", hr); - return; + goto cleanup; } hr = IMMDeviceEnumerator_GetDefaultAudioEndpoint(mme, eRender, eMultimedia, &dev); - ok(hr == S_OK, "GetDefaultAudioEndpoint failed: 0x%08x\n", hr); + ok(hr == S_OK || hr == E_NOTFOUND, "GetDefaultAudioEndpoint failed: 0x%08x\n", hr); if (hr != S_OK) { - skip("GetDefaultAudioEndpoint returns 0x%08x, skipping tests\n", hr); - return; + if (hr == E_NOTFOUND) + skip("No sound card available\n"); + else + skip("GetDefaultAudioEndpoint returns 0x%08x\n", hr); + goto cleanup; } ok(!GetModuleHandle("dsound.dll"), "dsound.dll was already loaded!\n"); @@ -94,8 +97,14 @@ START_TEST(dependency) ok(IsEqualCLSID(&clsid, &CLSID_DSoundRender), "Wrong class id %s", dump_guid(&clsid)); } } + +cleanup: if (bf) IUnknown_Release(bf); + if (dev) + IUnknown_Release(dev); + if (mme) + IUnknown_Release(mme); - IUnknown_Release(mme); + CoUninitialize(); }
1
0
0
0
Paul Vriens : hlink/tests: Fix a test failure on Win9x/WinMe.
by Alexandre Julliard
24 Dec '09
24 Dec '09
Module: wine Branch: master Commit: 62bb1eb2a4154f4045e8388c9798d490c8301c65 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=62bb1eb2a4154f4045e8388c9…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Thu Dec 24 12:31:59 2009 +0100 hlink/tests: Fix a test failure on Win9x/WinMe. --- dlls/hlink/tests/browse_ctx.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/dlls/hlink/tests/browse_ctx.c b/dlls/hlink/tests/browse_ctx.c index 637f3c8..e9806b8 100644 --- a/dlls/hlink/tests/browse_ctx.c +++ b/dlls/hlink/tests/browse_ctx.c @@ -24,6 +24,16 @@ #include "wine/test.h" +/* Win9x and WinMe don't have lstrcmpW */ +static int strcmp_ww(const WCHAR *str1, const WCHAR *str2) +{ + DWORD len1 = lstrlenW(str1); + DWORD len2 = lstrlenW(str2); + + if (len1 != len2) return 1; + return memcmp(str1, str2, len1 * sizeof(WCHAR)); +} + static void test_SetInitialHlink(void) { IHlinkBrowseContext *bc; @@ -55,7 +65,7 @@ static void test_SetInitialHlink(void) hres = IMoniker_GetDisplayName(found_moniker, bindctx, NULL, &found_name); ok(hres == S_OK, "GetDisplayName failed: 0x%08x\n", hres); - ok(lstrcmpW(found_name, friend), "Found display name should have been %s, was: %s\n", wine_dbgstr_w(friend), wine_dbgstr_w(found_name)); + ok(strcmp_ww(found_name, friend), "Found display name should not have been %s\n", wine_dbgstr_w(friend)); IBindCtx_Release(bindctx); IMoniker_Release(found_moniker);
1
0
0
0
Andrew Nguyen : kernel32: Ignore empty environment values from registry.
by Alexandre Julliard
24 Dec '09
24 Dec '09
Module: wine Branch: master Commit: 9294882b947a509021db47410a752c73e57dee31 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9294882b947a509021db47410…
Author: Andrew Nguyen <arethusa26(a)gmail.com> Date: Wed Dec 23 11:31:52 2009 -0600 kernel32: Ignore empty environment values from registry. --- dlls/kernel32/process.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 45488aa..eb39f5c 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -378,6 +378,7 @@ static void set_registry_variables( HANDLE hkey, ULONG type ) env_value.Length = env_value.MaximumLength = info->DataLength; if (env_value.Length && !env_value.Buffer[env_value.Length/sizeof(WCHAR)-1]) env_value.Length -= sizeof(WCHAR); /* don't count terminating null if any */ + if (!env_value.Length) continue; if (info->Type == REG_EXPAND_SZ) { WCHAR buf_expanded[1024];
1
0
0
0
Andrew Nguyen : ntdll: Use the HKCU\Volatile Environment key when generating the initial process environment .
by Alexandre Julliard
24 Dec '09
24 Dec '09
Module: wine Branch: master Commit: 542feda6b883cd289996862a868c0c610a5cf808 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=542feda6b883cd289996862a8…
Author: Andrew Nguyen <arethusa26(a)gmail.com> Date: Wed Dec 23 11:31:46 2009 -0600 ntdll: Use the HKCU\Volatile Environment key when generating the initial process environment. --- dlls/kernel32/process.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 08ac255..45488aa 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -417,6 +417,7 @@ static BOOL set_registry_environment(void) 'S','e','s','s','i','o','n',' ','M','a','n','a','g','e','r','\\', 'E','n','v','i','r','o','n','m','e','n','t',0}; static const WCHAR envW[] = {'E','n','v','i','r','o','n','m','e','n','t',0}; + static const WCHAR volatile_envW[] = {'V','o','l','a','t','i','l','e',' ','E','n','v','i','r','o','n','m','e','n','t',0}; OBJECT_ATTRIBUTES attr; UNICODE_STRING nameW; @@ -449,6 +450,15 @@ static BOOL set_registry_environment(void) set_registry_variables( hkey, REG_EXPAND_SZ ); NtClose( hkey ); } + + RtlInitUnicodeString( &nameW, volatile_envW ); + if (NtOpenKey( &hkey, KEY_READ, &attr ) == STATUS_SUCCESS) + { + set_registry_variables( hkey, REG_SZ ); + set_registry_variables( hkey, REG_EXPAND_SZ ); + NtClose( hkey ); + } + NtClose( attr.RootDirectory ); return ret; }
1
0
0
0
Alexandre Julliard : winex11: Only check for fs register corruption on i386 .
by Alexandre Julliard
24 Dec '09
24 Dec '09
Module: wine Branch: master Commit: 10e12c81831891ac3f1de7b31b46641aa30c0973 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=10e12c81831891ac3f1de7b31…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Dec 24 12:58:51 2009 +0100 winex11: Only check for fs register corruption on i386. --- dlls/winex11.drv/opengl.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 38f1dad..5bd0255 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -310,6 +310,7 @@ static BOOL X11DRV_WineGL_InitOpenglInfo(void) vis = pglXChooseVisual(gdi_display, screen, attribList); if (vis) { +#ifdef __i386__ WORD old_fs = wine_get_fs(); /* Create a GLX Context. Without one we can't query GL information */ ctx = pglXCreateContext(gdi_display, vis, None, GL_TRUE); @@ -321,6 +322,9 @@ static BOOL X11DRV_WineGL_InitOpenglInfo(void) ERR( "You need to set the \"UseFastTls\" option to \"2\" in your X config file.\n" ); return FALSE; } +#else + ctx = pglXCreateContext(gdi_display, vis, None, GL_TRUE); +#endif } if (ctx) {
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
124
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
Results per page:
10
25
50
100
200