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
August 2007
----- 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
1085 discussions
Start a n
N
ew thread
Andrew Talbot : riched20: Constify some variables.
by Alexandre Julliard
14 Aug '07
14 Aug '07
Module: wine Branch: master Commit: ed93ed9a08f6281e62439e3c826cb3875a1b336e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ed93ed9a08f6281e62439e3c8…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Mon Aug 13 22:41:55 2007 +0100 riched20: Constify some variables. --- dlls/riched20/editor.h | 16 ++++++++-------- dlls/riched20/paint.c | 6 +++--- dlls/riched20/para.c | 14 +++++++------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index 09083ce..ef8c9cd 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -226,24 +226,24 @@ void ME_MakeFirstParagraph(HDC hDC, ME_TextBuffer *editor); ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *rp, ME_Style *style); ME_DisplayItem *ME_JoinParagraphs(ME_TextEditor *editor, ME_DisplayItem *tp); void ME_DumpParaStyle(ME_Paragraph *s); -void ME_DumpParaStyleToBuf(PARAFORMAT2 *pFmt, char buf[2048]); -void ME_SetParaFormat(ME_TextEditor *editor, ME_DisplayItem *para, PARAFORMAT2 *pFmt); -void ME_SetSelectionParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt); -void ME_GetParaFormat(ME_TextEditor *editor, ME_DisplayItem *para, PARAFORMAT2 *pFmt); +void ME_DumpParaStyleToBuf(const PARAFORMAT2 *pFmt, char buf[2048]); +void ME_SetParaFormat(ME_TextEditor *editor, ME_DisplayItem *para, const PARAFORMAT2 *pFmt); +void ME_SetSelectionParaFormat(ME_TextEditor *editor, const PARAFORMAT2 *pFmt); +void ME_GetParaFormat(ME_TextEditor *editor, const ME_DisplayItem *para, PARAFORMAT2 *pFmt); void ME_GetSelectionParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt); /* marks from first up to (but not including) last */ -void ME_MarkForWrapping(ME_TextEditor *editor, ME_DisplayItem *first, ME_DisplayItem *last); -void ME_MarkForPainting(ME_TextEditor *editor, ME_DisplayItem *first, ME_DisplayItem *last); +void ME_MarkForWrapping(ME_TextEditor *editor, ME_DisplayItem *first, const ME_DisplayItem *last); +void ME_MarkForPainting(ME_TextEditor *editor, ME_DisplayItem *first, const ME_DisplayItem *last); void ME_MarkAllForWrapping(ME_TextEditor *editor); /* paint.c */ -void ME_PaintContent(ME_TextEditor *editor, HDC hDC, BOOL bOnlyNew, RECT *rcUpdate); +void ME_PaintContent(ME_TextEditor *editor, HDC hDC, BOOL bOnlyNew, const RECT *rcUpdate); void ME_Repaint(ME_TextEditor *editor); void ME_RewrapRepaint(ME_TextEditor *editor); void ME_UpdateRepaint(ME_TextEditor *editor); void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph); void ME_EnsureVisible(ME_TextEditor *editor, ME_DisplayItem *pRun); -COLORREF ME_GetBackColor(ME_TextEditor *editor); +COLORREF ME_GetBackColor(const ME_TextEditor *editor); void ME_InvalidateSelection(ME_TextEditor *editor); void ME_QueueInvalidateFromCursor(ME_TextEditor *editor, int nCursor); BOOL ME_SetZoom(ME_TextEditor *editor, int numerator, int denominator); diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c index 63a0c4c..676543e 100644 --- a/dlls/riched20/paint.c +++ b/dlls/riched20/paint.c @@ -23,7 +23,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(richedit); -void ME_PaintContent(ME_TextEditor *editor, HDC hDC, BOOL bOnlyNew, RECT *rcUpdate) { +void ME_PaintContent(ME_TextEditor *editor, HDC hDC, BOOL bOnlyNew, const RECT *rcUpdate) { ME_DisplayItem *item; ME_Context c; int yoffset; @@ -196,7 +196,7 @@ static void ME_DrawTextWithStyle(ME_Context *c, int x, int y, LPCWSTR szText, in ME_UnselectStyleFont(c->editor, hDC, s, hOldFont); } -static void ME_DebugWrite(HDC hDC, POINT *pt, WCHAR *szText) { +static void ME_DebugWrite(HDC hDC, const POINT *pt, LPCWSTR szText) { int align = SetTextAlign(hDC, TA_LEFT|TA_TOP); HGDIOBJ hFont = SelectObject(hDC, GetStockObject(DEFAULT_GUI_FONT)); COLORREF color = SetTextColor(hDC, RGB(128,128,128)); @@ -276,7 +276,7 @@ static void ME_DrawRun(ME_Context *c, int x, int y, ME_DisplayItem *rundi, ME_Pa } } -COLORREF ME_GetBackColor(ME_TextEditor *editor) +COLORREF ME_GetBackColor(const ME_TextEditor *editor) { /* Looks like I was seriously confused return GetSysColor((GetWindowLong(editor->hWnd, GWL_STYLE) & ES_READONLY) ? COLOR_3DFACE: COLOR_WINDOW); diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c index 1774957..a1f6261 100644 --- a/dlls/riched20/para.c +++ b/dlls/riched20/para.c @@ -83,7 +83,7 @@ void ME_MarkAllForWrapping(ME_TextEditor *editor) ME_MarkForWrapping(editor, editor->pBuffer->pFirst->member.para.next_para, editor->pBuffer->pLast); } -void ME_MarkForWrapping(ME_TextEditor *editor, ME_DisplayItem *first, ME_DisplayItem *last) +void ME_MarkForWrapping(ME_TextEditor *editor, ME_DisplayItem *first, const ME_DisplayItem *last) { while(first != last) { @@ -92,7 +92,7 @@ void ME_MarkForWrapping(ME_TextEditor *editor, ME_DisplayItem *first, ME_Display } } -void ME_MarkForPainting(ME_TextEditor *editor, ME_DisplayItem *first, ME_DisplayItem *last) +void ME_MarkForPainting(ME_TextEditor *editor, ME_DisplayItem *first, const ME_DisplayItem *last) { while(first != last) { @@ -277,12 +277,12 @@ ME_DisplayItem *ME_GetParagraph(ME_DisplayItem *item) { return ME_FindItemBackOrHere(item, diParagraph); } -static void ME_DumpStyleEffect(char **p, const char *name, PARAFORMAT2 *fmt, int mask) +static void ME_DumpStyleEffect(char **p, const char *name, const PARAFORMAT2 *fmt, int mask) { *p += sprintf(*p, "%-22s%s\n", name, (fmt->dwMask & mask) ? ((fmt->wEffects & mask) ? "yes" : "no") : "N/A"); } -void ME_DumpParaStyleToBuf(PARAFORMAT2 *pFmt, char buf[2048]) +void ME_DumpParaStyleToBuf(const PARAFORMAT2 *pFmt, char buf[2048]) { /* FIXME only PARAFORMAT styles implemented */ char *p; @@ -318,7 +318,7 @@ void ME_DumpParaStyleToBuf(PARAFORMAT2 *pFmt, char buf[2048]) ME_DumpStyleEffect(&p, "Page break before:", pFmt, PFM_PAGEBREAKBEFORE); } -void ME_SetParaFormat(ME_TextEditor *editor, ME_DisplayItem *para, PARAFORMAT2 *pFmt) +void ME_SetParaFormat(ME_TextEditor *editor, ME_DisplayItem *para, const PARAFORMAT2 *pFmt) { PARAFORMAT2 copy; assert(sizeof(*para->member.para.pFmt) == sizeof(PARAFORMAT2)); @@ -372,7 +372,7 @@ ME_GetSelectionParas(ME_TextEditor *editor, ME_DisplayItem **para, ME_DisplayIte } -void ME_SetSelectionParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt) +void ME_SetSelectionParaFormat(ME_TextEditor *editor, const PARAFORMAT2 *pFmt) { ME_DisplayItem *para, *para_end; @@ -386,7 +386,7 @@ void ME_SetSelectionParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt) } while(1); } -void ME_GetParaFormat(ME_TextEditor *editor, ME_DisplayItem *para, PARAFORMAT2 *pFmt) +void ME_GetParaFormat(ME_TextEditor *editor, const ME_DisplayItem *para, PARAFORMAT2 *pFmt) { if (pFmt->cbSize >= sizeof(PARAFORMAT2)) {
1
0
0
0
Mikołaj Zalewski : kernel: Allocate global memory with execute permission.
by Alexandre Julliard
14 Aug '07
14 Aug '07
Module: wine Branch: master Commit: 216c3b0d0aee29728adcd8f0b7846563fca030fb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=216c3b0d0aee29728adcd8f0b…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Mon Aug 13 10:55:08 2007 -0700 kernel: Allocate global memory with execute permission. --- dlls/kernel32/global16.c | 31 ++++++++++++++++++++----------- 1 files changed, 20 insertions(+), 11 deletions(-) diff --git a/dlls/kernel32/global16.c b/dlls/kernel32/global16.c index b17c610..7e5152b 100644 --- a/dlls/kernel32/global16.c +++ b/dlls/kernel32/global16.c @@ -93,6 +93,16 @@ static inline UINT DOSMEM_ResizeBlock(void *ptr, UINT size, BOOL exact) return winedos.ResizeDosBlock ? winedos.ResizeDosBlock(ptr, size, TRUE) : 0; } +static HANDLE get_win16_heap(void) +{ + static HANDLE win16_heap; + + /* we create global memory block with execute permission. The access can be limited + * for 16-bit code on selector level */ + if (!win16_heap) win16_heap = HeapCreate(HEAP_CREATE_ENABLE_EXECUTE, 0, 0); + return win16_heap; +} + /*********************************************************************** * GLOBAL_GetArena * @@ -235,7 +245,7 @@ HGLOBAL16 GLOBAL_Alloc( UINT16 flags, DWORD size, HGLOBAL16 hOwner, unsigned cha size = (size + 0x1f) & ~0x1f; /* Allocate the linear memory */ - ptr = HeapAlloc( GetProcessHeap(), 0, size ); + ptr = HeapAlloc( get_win16_heap(), 0, size ); /* FIXME: free discardable blocks and try again? */ if (!ptr) return 0; @@ -244,7 +254,7 @@ HGLOBAL16 GLOBAL_Alloc( UINT16 flags, DWORD size, HGLOBAL16 hOwner, unsigned cha handle = GLOBAL_CreateBlock( flags, ptr, size, hOwner, selflags ); if (!handle) { - HeapFree( GetProcessHeap(), 0, ptr ); + HeapFree( get_win16_heap(), 0, ptr ); return 0; } @@ -293,6 +303,7 @@ HGLOBAL16 WINAPI GlobalReAlloc16( void *ptr, *newptr; GLOBALARENA *pArena, *pNewArena; WORD sel = GlobalHandleToSel16( handle ); + HANDLE heap = get_win16_heap(); TRACE("%04x %d flags=%04x\n", handle, size, flags ); @@ -315,7 +326,7 @@ HGLOBAL16 WINAPI GlobalReAlloc16( if (pArena->flags & GA_DOSMEM) DOSMEM_FreeBlock( (void *)pArena->base ); else - HeapFree( GetProcessHeap(), 0, (void *)pArena->base ); + HeapFree( heap, 0, (void *)pArena->base ); pArena->base = 0; /* Note: we rely on the fact that SELECTOR_ReallocBlock won't @@ -374,13 +385,11 @@ HGLOBAL16 WINAPI GlobalReAlloc16( */ if (ptr) - newptr = HeapReAlloc( GetProcessHeap(), + newptr = HeapReAlloc( heap, (pArena->pageLockCount > 0) ? HEAP_REALLOC_IN_PLACE_ONLY : 0, ptr, size ); else - newptr = HeapAlloc( GetProcessHeap(), - (pArena->pageLockCount > 0) ? HEAP_REALLOC_IN_PLACE_ONLY : 0, - size ); + newptr = HeapAlloc( heap, 0, size ); } @@ -392,7 +401,7 @@ HGLOBAL16 WINAPI GlobalReAlloc16( if (pArena->flags & GA_DOSMEM) DOSMEM_FreeBlock( (void *)pArena->base ); else - HeapFree( GetProcessHeap(), 0, ptr ); + HeapFree( heap, 0, ptr ); SELECTOR_FreeBlock( sel ); memset( pArena, 0, sizeof(GLOBALARENA) ); } @@ -408,7 +417,7 @@ HGLOBAL16 WINAPI GlobalReAlloc16( if (pArena->flags & GA_DOSMEM) DOSMEM_FreeBlock( (void *)pArena->base ); else - HeapFree( GetProcessHeap(), 0, ptr ); + HeapFree( heap, 0, ptr ); memset( pArena, 0, sizeof(GLOBALARENA) ); return 0; } @@ -419,7 +428,7 @@ HGLOBAL16 WINAPI GlobalReAlloc16( if (pArena->flags & GA_DOSMEM) DOSMEM_FreeBlock( (void *)pArena->base ); else - HeapFree( GetProcessHeap(), 0, ptr ); + HeapFree( heap, 0, ptr ); SELECTOR_FreeBlock( sel ); return 0; } @@ -463,7 +472,7 @@ HGLOBAL16 WINAPI GlobalFree16( TRACE("%04x\n", handle ); if (!GLOBAL_FreeBlock( handle )) return handle; /* failed */ - HeapFree( GetProcessHeap(), 0, ptr ); + HeapFree( get_win16_heap(), 0, ptr ); return 0; }
1
0
0
0
Roderick Colenbrander : wgl: Proper stereo / double buffering support for ChoosePixelFormat.
by Alexandre Julliard
14 Aug '07
14 Aug '07
Module: wine Branch: master Commit: 454a612223d056212a6b359f26b7e6749bf928c1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=454a612223d056212a6b359f2…
Author: Roderick Colenbrander <thunderbird2k(a)gmx.net> Date: Sun Aug 12 14:40:24 2007 +0200 wgl: Proper stereo / double buffering support for ChoosePixelFormat. --- dlls/winex11.drv/opengl.c | 84 ++++++++++++++++++++++++++++++++++---------- 1 files changed, 65 insertions(+), 19 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index ea4a28a..62d7e2d 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1020,6 +1020,8 @@ int X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev, int value = 0; int i = 0; int bestFormat = -1; + int bestDBuffer = -1; + int bestStereo = -1; int bestColor = -1; int bestAlpha = -1; int bestDepth = -1; @@ -1062,34 +1064,69 @@ int X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev, continue; } - /* Doublebuffer: - * Ignore doublebuffer when PFD_DOUBLEBUFFER_DONTCARE is set. Further if the flag - * is not set, we must return a format without double buffering. */ pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_DOUBLEBUFFER, &value); if (value) dwFlags |= PFD_DOUBLEBUFFER; - if (!(ppfd->dwFlags & PFD_DOUBLEBUFFER_DONTCARE) && ((ppfd->dwFlags^dwFlags) & PFD_DOUBLEBUFFER)) - { - TRACE("dbl buffer mismatch for iPixelFormat=%d\n", i+1); - continue; - } - - /* Stereo: - * Ignore stereo when PFD_STEREO_DONTCARE is set. Further if the flag - * is not set, we must return a format without stereo support. */ pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_STEREO, &value); if (value) dwFlags |= PFD_STEREO; - if (!(ppfd->dwFlags & PFD_STEREO_DONTCARE) && ((ppfd->dwFlags^dwFlags) & PFD_STEREO)) - { - TRACE("stereo mismatch for iPixelFormat=%d\n", i+1); - continue; - } - pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_BUFFER_SIZE, &color); /* cColorBits */ pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_ALPHA_SIZE, &alpha); /* cAlphaBits */ pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_DEPTH_SIZE, &depth); /* cDepthBits */ pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_STENCIL_SIZE, &stencil); /* cStencilBits */ pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_AUX_BUFFERS, &aux); /* cAuxBuffers */ + /* The behavior of PDF_STEREO/PFD_STEREO_DONTCARE and PFD_DOUBLEBUFFER / PFD_DOUBLEBUFFER_DONTCARE + * is not very clear on MSDN. They specify that ChoosePixelFormat tries to match pixel formats + * with the flag (PFD_STEREO / PFD_DOUBLEBUFFERING) set. Otherwise it says that it tries to match + * formats without the given flag set. + * A test on Windows using a Radeon 9500pro on WinXP (the driver doesn't support Stereo) + * has indicated that a format without stereo is returned when stereo is unavailable. + * So in case PFD_STEREO is set, formats that support it should have priority above formats + * without. In case PFD_STEREO_DONTCARE is set, stereo is ignored. + * + * To summarize the following is most likely the correct behavior: + * stereo not set -> prefer no-stereo formats, else also accept stereo formats + * stereo set -> prefer stereo formats, else also accept no-stereo formats + * stereo don't care -> it doesn't matter whether we get stereo or not + * + * In Wine we will treat no-stereo the same way as don't care because it makes + * format selection even more complicated and second drivers with Stereo advertise + * each format twice anyway. + */ + + /* Doublebuffer, see the comments above */ + if( !(ppfd->dwFlags & PFD_DOUBLEBUFFER_DONTCARE) ) { + if( ((ppfd->dwFlags & PFD_DOUBLEBUFFER) != bestDBuffer) && + ((dwFlags & PFD_DOUBLEBUFFER) == (ppfd->dwFlags & PFD_DOUBLEBUFFER)) ) + { + bestDBuffer = dwFlags & PFD_DOUBLEBUFFER; + bestStereo = dwFlags & PFD_STEREO; + bestAlpha = alpha; + bestColor = color; + bestDepth = depth; + bestStencil = stencil; + bestAux = aux; + bestFormat = i; + continue; + } + } + + /* Stereo, see the comments above. */ + if( !(ppfd->dwFlags & PFD_STEREO_DONTCARE) ) { + if( ((ppfd->dwFlags & PFD_STEREO) != bestStereo) && + ((dwFlags & PFD_STEREO) == (ppfd->dwFlags & PFD_STEREO)) ) + { + bestDBuffer = dwFlags & PFD_DOUBLEBUFFER; + bestStereo = dwFlags & PFD_STEREO; + bestAlpha = alpha; + bestColor = color; + bestDepth = depth; + bestStencil = stencil; + bestAux = aux; + bestFormat = i; + continue; + } + } + /* Below we will do a number of checks to select the 'best' pixelformat. * We assume the precedence cColorBits > cAlphaBits > cDepthBits > cStencilBits -> cAuxBuffers. * The code works by trying to match the most important options as close as possible. @@ -1099,6 +1136,8 @@ int X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev, if( ((ppfd->cColorBits > bestColor) && (color > bestColor)) || ((color >= ppfd->cColorBits) && (color < bestColor)) ) { + bestDBuffer = dwFlags & PFD_DOUBLEBUFFER; + bestStereo = dwFlags & PFD_STEREO; bestAlpha = alpha; bestColor = color; bestDepth = depth; @@ -1115,6 +1154,8 @@ int X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev, if( ((ppfd->cAlphaBits > bestAlpha) && (alpha > bestAlpha)) || ((alpha >= ppfd->cAlphaBits) && (alpha < bestAlpha)) ) { + bestDBuffer = dwFlags & PFD_DOUBLEBUFFER; + bestStereo = dwFlags & PFD_STEREO; bestAlpha = alpha; bestColor = color; bestDepth = depth; @@ -1131,6 +1172,8 @@ int X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev, if( ((ppfd->cDepthBits > bestDepth) && (depth > bestDepth)) || ((depth >= ppfd->cDepthBits) && (depth < bestDepth)) ) { + bestDBuffer = dwFlags & PFD_DOUBLEBUFFER; + bestStereo = dwFlags & PFD_STEREO; bestAlpha = alpha; bestColor = color; bestDepth = depth; @@ -1147,6 +1190,8 @@ int X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev, if( ((ppfd->cStencilBits > bestStencil) && (stencil > bestStencil)) || ((stencil >= ppfd->cStencilBits) && (stencil < bestStencil)) ) { + bestDBuffer = dwFlags & PFD_DOUBLEBUFFER; + bestStereo = dwFlags & PFD_STEREO; bestAlpha = alpha; bestColor = color; bestDepth = depth; @@ -1163,6 +1208,8 @@ int X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev, if( ((ppfd->cAuxBuffers > bestAux) && (aux > bestAux)) || ((aux >= ppfd->cAuxBuffers) && (aux < bestAux)) ) { + bestDBuffer = dwFlags & PFD_DOUBLEBUFFER; + bestStereo = dwFlags & PFD_STEREO; bestAlpha = alpha; bestColor = color; bestDepth = depth; @@ -1189,7 +1236,6 @@ int X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev, return ret; } - /** * X11DRV_DescribePixelFormat *
1
0
0
0
Roderick Colenbrander : wined3d: Don't use ENTER_GL/ LEAVE_GL on systems without winex11.drv.
by Alexandre Julliard
14 Aug '07
14 Aug '07
Module: wine Branch: master Commit: b78923d015cb1e275e979bf3923c7beee684fd20 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b78923d015cb1e275e979bf39…
Author: Roderick Colenbrander <thunderbird2k(a)gmx.net> Date: Tue Aug 14 12:03:29 2007 +0200 wined3d: Don't use ENTER_GL/LEAVE_GL on systems without winex11.drv. --- dlls/wined3d/wined3d_main.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c index 5ec14be..13ab258 100644 --- a/dlls/wined3d/wined3d_main.c +++ b/dlls/wined3d/wined3d_main.c @@ -94,6 +94,10 @@ static inline DWORD get_config_key(HKEY defkey, HKEY appkey, const char* name, c return ERROR_FILE_NOT_FOUND; } +static void wined3d_do_nothing(void) +{ +} + /* At process attach */ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) { @@ -138,6 +142,11 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) wine_tsx11_lock_ptr = (void *)GetProcAddress( mod, "wine_tsx11_lock" ); wine_tsx11_unlock_ptr = (void *)GetProcAddress( mod, "wine_tsx11_unlock" ); } + else /* We are most likely on Windows */ + { + wine_tsx11_lock_ptr = wined3d_do_nothing; + wine_tsx11_unlock_ptr = wined3d_do_nothing; + } /* @@ Wine registry key: HKCU\Software\Wine\Direct3D */ if ( RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\Direct3D", &hkey ) ) hkey = 0;
1
0
0
0
Roderick Colenbrander : wgl: Recognize Vista's PFD_SUPPORT_COMPOSITION flag .
by Alexandre Julliard
14 Aug '07
14 Aug '07
Module: wine Branch: master Commit: aab98fc6eab504ec64acdbb604cfd41eb4a5c601 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aab98fc6eab504ec64acdbb60…
Author: Roderick Colenbrander <thunderbird2k(a)gmx.net> Date: Tue Aug 14 11:31:14 2007 +0200 wgl: Recognize Vista's PFD_SUPPORT_COMPOSITION flag. --- dlls/winex11.drv/opengl.c | 3 +++ include/wingdi.h | 1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index ebed630..ea4a28a 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -173,6 +173,9 @@ static void dump_PIXELFORMATDESCRIPTOR(const PIXELFORMATDESCRIPTOR *ppfd) { TEST_AND_DUMP(ppfd->dwFlags, PFD_SWAP_COPY); TEST_AND_DUMP(ppfd->dwFlags, PFD_SWAP_EXCHANGE); TEST_AND_DUMP(ppfd->dwFlags, PFD_SWAP_LAYER_BUFFERS); + /* PFD_SUPPORT_COMPOSITION is new in Vista, it is similar to composition + * under X e.g. COMPOSITE + GLX_EXT_TEXTURE_FROM_PIXMAP. */ + TEST_AND_DUMP(ppfd->dwFlags, PFD_SUPPORT_COMPOSITION); #undef TEST_AND_DUMP TRACE("\n"); diff --git a/include/wingdi.h b/include/wingdi.h index 0215922..77d8d92 100644 --- a/include/wingdi.h +++ b/include/wingdi.h @@ -88,6 +88,7 @@ typedef struct tagPIXELFORMATDESCRIPTOR { #define PFD_SWAP_COPY 0x00000400 #define PFD_SWAP_LAYER_BUFFERS 0x00000800 #define PFD_GENERIC_ACCELERATED 0x00001000 +#define PFD_SUPPORT_COMPOSITION 0x00008000 /* Vista stuff */ #define PFD_DEPTH_DONTCARE 0x20000000 #define PFD_DOUBLEBUFFER_DONTCARE 0x40000000
1
0
0
0
Paul Vriens : shell32/tests: Make tests run again on win95.
by Alexandre Julliard
14 Aug '07
14 Aug '07
Module: wine Branch: master Commit: f076919ca828e02a6e86f6286a20d11f44d0e0ed URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f076919ca828e02a6e86f6286…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Tue Aug 14 12:11:04 2007 +0200 shell32/tests: Make tests run again on win95. --- dlls/shell32/tests/shelllink.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dlls/shell32/tests/shelllink.c b/dlls/shell32/tests/shelllink.c index 8db88bb..bdf537e 100644 --- a/dlls/shell32/tests/shelllink.c +++ b/dlls/shell32/tests/shelllink.c @@ -41,6 +41,8 @@ static fnILFree pILFree; static fnILIsEqual pILIsEqual; static fnSHILCreateFromPath pSHILCreateFromPath; +static DWORD (WINAPI *pGetLongPathNameA)(LPCSTR, LPSTR, DWORD); + static const GUID _IID_IShellLinkDataList = { 0x45e2b4ae, 0xb1c3, 0x11d0, { 0xb9, 0x2f, 0x00, 0xa0, 0xc9, 0x03, 0x12, 0xe1 } @@ -563,7 +565,7 @@ static void test_load_save(void) /* Create a temporary non-executable file */ r=GetTempPath(sizeof(mypath), mypath); ok(r>=0 && r<sizeof(mypath), "GetTempPath failed (%d), err %d\n", r, GetLastError()); - r=GetLongPathName(mypath, mydir, sizeof(mydir)); + r=pGetLongPathNameA(mypath, mydir, sizeof(mydir)); ok(r>=0 && r<sizeof(mydir), "GetLongPathName failed (%d), err %d\n", r, GetLastError()); p=strrchr(mydir, '\\'); if (p) @@ -681,13 +683,15 @@ static void test_datalink(void) START_TEST(shelllink) { HRESULT r; - HMODULE hmod; + HMODULE hmod = GetModuleHandleA("shell32.dll"); + HMODULE hkernel32 = GetModuleHandleA("kernel32.dll"); - hmod = GetModuleHandle("shell32"); pILFree = (fnILFree) GetProcAddress(hmod, (LPSTR)155); pILIsEqual = (fnILIsEqual) GetProcAddress(hmod, (LPSTR)21); pSHILCreateFromPath = (fnSHILCreateFromPath) GetProcAddress(hmod, (LPSTR)28); + pGetLongPathNameA = (void *)GetProcAddress(hkernel32, "GetLongPathNameA"); + r = CoInitialize(NULL); ok(SUCCEEDED(r), "CoInitialize failed (0x%08x)\n", r); if (!SUCCEEDED(r))
1
0
0
0
Paul Vriens : ntdll/tests: Make tests run again on win95.
by Alexandre Julliard
14 Aug '07
14 Aug '07
Module: wine Branch: master Commit: 8d80b1323a5510018124cc3628f201cee62c36bf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8d80b1323a5510018124cc362…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Tue Aug 14 12:01:17 2007 +0200 ntdll/tests: Make tests run again on win95. --- dlls/ntdll/tests/om.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index f27b37a..cee8a76 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c @@ -25,6 +25,7 @@ #include "winnt.h" #include "stdlib.h" +static HANDLE (WINAPI *pCreateWaitableTimerA)(SECURITY_ATTRIBUTES*, BOOL, LPCSTR); static NTSTATUS (WINAPI *pRtlCreateUnicodeStringFromAsciiz)(PUNICODE_STRING, LPCSTR); static VOID (WINAPI *pRtlInitUnicodeString)( PUNICODE_STRING, LPCWSTR ); static VOID (WINAPI *pRtlFreeUnicodeString)(PUNICODE_STRING); @@ -246,12 +247,12 @@ static void test_name_collisions(void) pNtClose(h1); pNtClose(h2); - h = CreateWaitableTimerA(NULL, TRUE, "om.c-test"); + h = pCreateWaitableTimerA(NULL, TRUE, "om.c-test"); ok(h != 0, "CreateWaitableTimerA failed got ret=%p (%d)\n", h, GetLastError()); status = pNtCreateTimer(&h1, GENERIC_ALL, &attr, NotificationTimer); ok(status == STATUS_OBJECT_NAME_EXISTS && h1 != NULL, "NtCreateTimer should have succeeded with STATUS_OBJECT_NAME_EXISTS got(%08x)\n", status); - h2 = CreateWaitableTimerA(NULL, TRUE, "om.c-test"); + h2 = pCreateWaitableTimerA(NULL, TRUE, "om.c-test"); winerr = GetLastError(); ok(h2 != 0 && winerr == ERROR_ALREADY_EXISTS, "CreateWaitableTimerA should have succeeded with ERROR_ALREADY_EXISTS got ret=%p (%d)\n", h2, winerr); @@ -541,12 +542,16 @@ static void test_symboliclink(void) START_TEST(om) { HMODULE hntdll = GetModuleHandleA("ntdll.dll"); + HMODULE hkernel32 = GetModuleHandleA("kernel32.dll"); + if (!hntdll) { skip("not running on NT, skipping test\n"); return; } + pCreateWaitableTimerA = (void *)GetProcAddress(hkernel32, "CreateWaitableTimerA"); + pRtlCreateUnicodeStringFromAsciiz = (void *)GetProcAddress(hntdll, "RtlCreateUnicodeStringFromAsciiz"); pRtlFreeUnicodeString = (void *)GetProcAddress(hntdll, "RtlFreeUnicodeString"); pNtCreateEvent = (void *)GetProcAddress(hntdll, "NtCreateEvent");
1
0
0
0
Paul Vriens : crypt32/tests: Make tests run again on win95.
by Alexandre Julliard
14 Aug '07
14 Aug '07
Module: wine Branch: master Commit: c0b88f880f4a90cd78ec66d9fa96c9abfb8771b0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c0b88f880f4a90cd78ec66d9f…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Tue Aug 14 11:53:22 2007 +0200 crypt32/tests: Make tests run again on win95. --- dlls/crypt32/tests/cert.c | 39 ++++++++++++++++++++++----------------- dlls/crypt32/tests/msg.c | 43 +++++++++++++++++++++++++++++++------------ 2 files changed, 53 insertions(+), 29 deletions(-) diff --git a/dlls/crypt32/tests/cert.c b/dlls/crypt32/tests/cert.c index 6a73c91..89b51e7 100644 --- a/dlls/crypt32/tests/cert.c +++ b/dlls/crypt32/tests/cert.c @@ -32,19 +32,24 @@ static BOOL (WINAPI * pCryptVerifyCertificateSignatureEx) (HCRYPTPROV, DWORD, DWORD, void *, DWORD, void *, DWORD, void *); -#define CRYPT_GET_PROC(func) \ - p ## func = (void *)GetProcAddress(hCrypt32, #func); +static BOOL (WINAPI * pCryptAcquireContextW) + (HCRYPTPROV *, LPCWSTR, LPCWSTR, DWORD, DWORD); static void init_function_pointers(void) { - HMODULE hCrypt32; + HMODULE hCrypt32 = GetModuleHandleA("crypt32.dll"); + HMODULE hAdvapi32 = GetModuleHandleA("advapi32.dll"); - pCryptVerifyCertificateSignatureEx = NULL; +#define GET_PROC(dll, func) \ + p ## func = (void *)GetProcAddress(dll, #func); \ + if(!p ## func) \ + trace("GetProcAddress(%s) failed\n", #func); - hCrypt32 = GetModuleHandleA("crypt32.dll"); - assert(hCrypt32); + GET_PROC(hCrypt32, CryptVerifyCertificateSignatureEx) - CRYPT_GET_PROC(CryptVerifyCertificateSignatureEx); + GET_PROC(hAdvapi32, CryptAcquireContextW) + +#undef GET_PROC } static BYTE subjectName[] = { 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, @@ -1519,9 +1524,9 @@ static void testCertSigs(void) DWORD sigSize = sizeof(sig); /* Just in case a previous run failed, delete this thing */ - CryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, + pCryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, CRYPT_DELETEKEYSET); - ret = CryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, + ret = pCryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, CRYPT_NEWKEYSET); ok(ret, "CryptAcquireContext failed: %08x\n", GetLastError()); @@ -1530,7 +1535,7 @@ static void testCertSigs(void) CryptDestroyKey(key); CryptReleaseContext(csp, 0); - ret = CryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, + ret = pCryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, CRYPT_DELETEKEYSET); } @@ -1645,9 +1650,9 @@ static void testCreateSelfSignCert(void) */ /* Acquire a CSP */ - CryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, + pCryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, CRYPT_DELETEKEYSET); - ret = CryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, + ret = pCryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, CRYPT_NEWKEYSET); ok(ret, "CryptAcquireContext failed: %08x\n", GetLastError()); @@ -1702,7 +1707,7 @@ static void testCreateSelfSignCert(void) } CryptReleaseContext(csp, 0); - ret = CryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, + ret = pCryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, CRYPT_DELETEKEYSET); /* do the same test with AT_KEYEXCHANGE and key info*/ @@ -1750,7 +1755,7 @@ static void testCreateSelfSignCert(void) CertFreeCertificateContext(context); } - CryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, + pCryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, CRYPT_DELETEKEYSET); } @@ -2359,7 +2364,7 @@ static void testAcquireCertPrivateKey(void) keyProvInfo.rgProvParam = NULL; keyProvInfo.dwKeySpec = AT_SIGNATURE; - CryptAcquireContextW(NULL, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, + pCryptAcquireContextW(NULL, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, CRYPT_DELETEKEYSET); cert = CertCreateCertificateContext(X509_ASN_ENCODING, selfSignedCert, @@ -2392,7 +2397,7 @@ static void testAcquireCertPrivateKey(void) ok(!ret && GetLastError() == CRYPT_E_NO_KEY_PROPERTY, "Expected CRYPT_E_NO_KEY_PROPERTY, got %08x\n", GetLastError()); - CryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, + pCryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, CRYPT_NEWKEYSET); ret = CryptImportKey(csp, privKey, sizeof(privKey), 0, 0, &key); ok(ret, "CryptImportKey failed: %08x\n", GetLastError()); @@ -2513,7 +2518,7 @@ static void testAcquireCertPrivateKey(void) } CryptReleaseContext(csp, 0); - CryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, + pCryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, CRYPT_DELETEKEYSET); CertFreeCertificateContext(cert); diff --git a/dlls/crypt32/tests/msg.c b/dlls/crypt32/tests/msg.c index dba0752..15f6baa 100644 --- a/dlls/crypt32/tests/msg.c +++ b/dlls/crypt32/tests/msg.c @@ -29,6 +29,23 @@ static char oid_rsa_md5[] = szOID_RSA_MD5; +static BOOL (WINAPI * pCryptAcquireContextW) + (HCRYPTPROV *, LPCWSTR, LPCWSTR, DWORD, DWORD); + +static void init_function_pointers(void) +{ + HMODULE hAdvapi32 = GetModuleHandleA("advapi32.dll"); + +#define GET_PROC(dll, func) \ + p ## func = (void *)GetProcAddress(dll, #func); \ + if(!p ## func) \ + trace("GetProcAddress(%s) failed\n", #func); + + GET_PROC(hAdvapi32, CryptAcquireContextW) + +#undef GET_PROC +} + static void test_msg_open_to_encode(void) { HCRYPTMSG msg; @@ -1042,10 +1059,10 @@ static void test_signed_msg_open(void) "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); } /* The signer's hCryptProv must also be valid. */ - ret = CryptAcquireContextW(&signer.hCryptProv, cspNameW, NULL, + ret = pCryptAcquireContextW(&signer.hCryptProv, cspNameW, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET); if (!ret && GetLastError() == NTE_EXISTS) - ret = CryptAcquireContextW(&signer.hCryptProv, cspNameW, NULL, + ret = pCryptAcquireContextW(&signer.hCryptProv, cspNameW, NULL, PROV_RSA_FULL, 0); ok(ret, "CryptAcquireContextW failed: %x\n", GetLastError()); msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, @@ -1054,7 +1071,7 @@ static void test_signed_msg_open(void) CryptMsgClose(msg); CryptReleaseContext(signer.hCryptProv, 0); - CryptAcquireContextW(&signer.hCryptProv, cspNameW, MS_DEF_PROV_W, + pCryptAcquireContextW(&signer.hCryptProv, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, CRYPT_DELETEKEYSET); } @@ -1101,10 +1118,10 @@ static void test_signed_msg_update(void) signer.HashAlgorithm.pszObjId = oid_rsa_md5; signInfo.cSigners = 1; signInfo.rgSigners = &signer; - ret = CryptAcquireContextW(&signer.hCryptProv, cspNameW, NULL, + ret = pCryptAcquireContextW(&signer.hCryptProv, cspNameW, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET); if (!ret && GetLastError() == NTE_EXISTS) - ret = CryptAcquireContextW(&signer.hCryptProv, cspNameW, NULL, + ret = pCryptAcquireContextW(&signer.hCryptProv, cspNameW, NULL, PROV_RSA_FULL, 0); ok(ret, "CryptAcquireContextW failed: %x\n", GetLastError()); msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, @@ -1183,7 +1200,7 @@ static void test_signed_msg_update(void) CryptDestroyKey(key); CryptReleaseContext(signer.hCryptProv, 0); - CryptAcquireContextW(&signer.hCryptProv, cspNameW, NULL, PROV_RSA_FULL, + pCryptAcquireContextW(&signer.hCryptProv, cspNameW, NULL, PROV_RSA_FULL, CRYPT_DELETEKEYSET); } @@ -1428,10 +1445,10 @@ static void test_signed_msg_encoding(void) signer.HashAlgorithm.pszObjId = oid_rsa_md5; signInfo.cSigners = 1; signInfo.rgSigners = &signer; - ret = CryptAcquireContextW(&signer.hCryptProv, cspNameW, NULL, + ret = pCryptAcquireContextW(&signer.hCryptProv, cspNameW, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET); if (!ret && GetLastError() == NTE_EXISTS) - ret = CryptAcquireContextW(&signer.hCryptProv, cspNameW, NULL, + ret = pCryptAcquireContextW(&signer.hCryptProv, cspNameW, NULL, PROV_RSA_FULL, 0); ok(ret, "CryptAcquireContextW failed: %x\n", GetLastError()); ret = CryptImportKey(signer.hCryptProv, (LPBYTE)privKey, sizeof(privKey), @@ -1546,7 +1563,7 @@ static void test_signed_msg_encoding(void) CryptDestroyKey(key); CryptReleaseContext(signer.hCryptProv, 0); - CryptAcquireContextW(&signer.hCryptProv, cspNameW, NULL, PROV_RSA_FULL, + pCryptAcquireContextW(&signer.hCryptProv, cspNameW, NULL, PROV_RSA_FULL, CRYPT_DELETEKEYSET); } @@ -1605,10 +1622,10 @@ static void test_signed_msg_get_param(void) signer.HashAlgorithm.pszObjId = oid_rsa_md5; signInfo.cSigners = 1; signInfo.rgSigners = &signer; - ret = CryptAcquireContextW(&signer.hCryptProv, cspNameW, NULL, + ret = pCryptAcquireContextW(&signer.hCryptProv, cspNameW, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET); if (!ret && GetLastError() == NTE_EXISTS) - ret = CryptAcquireContextW(&signer.hCryptProv, cspNameW, NULL, + ret = pCryptAcquireContextW(&signer.hCryptProv, cspNameW, NULL, PROV_RSA_FULL, 0); ok(ret, "CryptAcquireContextW failed: %x\n", GetLastError()); msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, @@ -1640,7 +1657,7 @@ static void test_signed_msg_get_param(void) CryptMsgClose(msg); CryptReleaseContext(signer.hCryptProv, 0); - CryptAcquireContextW(&signer.hCryptProv, cspNameW, MS_DEF_PROV_W, + pCryptAcquireContextW(&signer.hCryptProv, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, CRYPT_DELETEKEYSET); } @@ -2042,6 +2059,8 @@ static void test_decode_msg(void) START_TEST(msg) { + init_function_pointers(); + /* Basic parameter checking tests */ test_msg_open_to_encode(); test_msg_open_to_decode();
1
0
0
0
Paul Vriens : d3d8/tests: Make tests run again on win95.
by Alexandre Julliard
14 Aug '07
14 Aug '07
Module: wine Branch: master Commit: c20a285510a7e42d710258e76d46d2a1ae60abd4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c20a285510a7e42d710258e76…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Tue Aug 14 11:18:01 2007 +0200 d3d8/tests: Make tests run again on win95. --- dlls/d3d8/tests/device.c | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index 9f844d4..a1c1e25 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -24,6 +24,8 @@ static IDirect3D8 *(WINAPI *pDirect3DCreate8)(UINT); +static BOOL (WINAPI *pGetCursorInfo)(PCURSORINFO); + static const DWORD simple_vs[] = {0xFFFE0101, /* vs_1_1 */ 0x00000009, 0xC0010000, 0x90E40000, 0xA0E40000, /* dp4 oPos.x, v0, c0 */ 0x00000009, 0xC0020000, 0x90E40000, 0xA0E40001, /* dp4 oPos.y, v0, c1 */ @@ -616,10 +618,18 @@ static void test_cursor(void) CURSORINFO info; IDirect3DSurface8 *cursor = NULL; HCURSOR cur; + HMODULE user32_handle = GetModuleHandleA("user32.dll"); + + pGetCursorInfo = (void *)GetProcAddress(user32_handle, "GetCursorInfo"); + if (!pGetCursorInfo) + { + skip("GetCursorInfo is not available\n"); + return; + } memset(&info, 0, sizeof(info)); info.cbSize = sizeof(info); - hr = GetCursorInfo(&info); + hr = pGetCursorInfo(&info); cur = info.hCursor; pD3d = pDirect3DCreate8( D3D_SDK_VERSION ); @@ -664,7 +674,7 @@ static void test_cursor(void) memset(&info, 0, sizeof(info)); info.cbSize = sizeof(info); - hr = GetCursorInfo(&info); + hr = pGetCursorInfo(&info); ok(hr != 0, "GetCursorInfo returned %#08x\n", hr); ok(info.flags & CURSOR_SHOWING, "The gdi cursor is hidden (%08x)\n", info.flags); ok(info.hCursor == cur, "The cursor handle is %p\n", info.hCursor); /* unchanged */ @@ -680,7 +690,7 @@ static void test_cursor(void) /* GDI cursor unchanged */ memset(&info, 0, sizeof(info)); info.cbSize = sizeof(info); - hr = GetCursorInfo(&info); + hr = pGetCursorInfo(&info); ok(hr != 0, "GetCursorInfo returned %#08x\n", hr); ok(info.flags & CURSOR_SHOWING, "The gdi cursor is hidden (%08x)\n", info.flags); ok(info.hCursor == cur, "The cursor handle is %p\n", info.hCursor); /* unchanged */
1
0
0
0
Paul Vriens : advapi32/tests: Make tests run again on win95.
by Alexandre Julliard
14 Aug '07
14 Aug '07
Module: wine Branch: master Commit: 4e8b83dcde670f03ed381be2583a88e6313f39d7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4e8b83dcde670f03ed381be25…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Tue Aug 14 11:05:04 2007 +0200 advapi32/tests: Make tests run again on win95. --- dlls/advapi32/tests/security.c | 22 ++++++++++++++++++++-- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index 1595930..a49662c 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -55,6 +55,9 @@ static BOOL (WINAPI *pConvertStringSecurityDescriptorToSecurityDescriptorA)(LPCS PSECURITY_DESCRIPTOR*, PULONG ); typedef BOOL (WINAPI *fnGetFileSecurityA)(LPCSTR, SECURITY_INFORMATION, PSECURITY_DESCRIPTOR, DWORD, LPDWORD); +static DWORD (WINAPI *pGetNamedSecurityInfoA)(LPSTR, SE_OBJECT_TYPE, SECURITY_INFORMATION, + PSID*, PSID*, PACL*, PACL*, + PSECURITY_DESCRIPTOR*); typedef DWORD (WINAPI *fnRtlAdjustPrivilege)(ULONG,BOOLEAN,BOOLEAN,PBOOLEAN); typedef BOOL (WINAPI *fnCreateWellKnownSid)(WELL_KNOWN_SID_TYPE,PSID,PSID,DWORD*); typedef BOOL (WINAPI *fnDuplicateTokenEx)(HANDLE,DWORD,LPSECURITY_ATTRIBUTES, @@ -65,6 +68,7 @@ typedef NTSTATUS (WINAPI *fnLsaClose)(LSA_HANDLE); typedef NTSTATUS (WINAPI *fnLsaFreeMemory)(PVOID); typedef NTSTATUS (WINAPI *fnLsaOpenPolicy)(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,ACCESS_MASK,PLSA_HANDLE); static NTSTATUS (WINAPI *pNtQueryObject)(HANDLE,OBJECT_INFORMATION_CLASS,PVOID,ULONG,PULONG); +static DWORD (WINAPI *pSetEntriesInAclW)(ULONG, PEXPLICIT_ACCESSW, PACL, PACL*); static HMODULE hmod; static int myARGC; @@ -102,6 +106,8 @@ static void init(void) hmod = GetModuleHandle("advapi32.dll"); pConvertStringSecurityDescriptorToSecurityDescriptorA = (void *)GetProcAddress(hmod, "ConvertStringSecurityDescriptorToSecurityDescriptorA" ); + pGetNamedSecurityInfoA = (void *)GetProcAddress(hmod, "GetNamedSecurityInfoA"); + pSetEntriesInAclW = (void *)GetProcAddress(hmod, "SetEntriesInAclW"); myARGC = winetest_get_mainargs( &myARGV ); } @@ -1714,7 +1720,13 @@ static void test_SetEntriesInAcl(void) ACL *acl = (ACL*)0xdeadbeef; DWORD res; - res = SetEntriesInAclW(0, NULL, NULL, &acl); + if (!pSetEntriesInAclW) + { + skip("SetEntriesInAclW is not available\n"); + return; + } + + res = pSetEntriesInAclW(0, NULL, NULL, &acl); if(res == ERROR_CALL_NOT_IMPLEMENTED) { skip("SetEntriesInAclW is not implemented\n"); @@ -1737,11 +1749,17 @@ static void test_GetNamedSecurityInfoA(void) BOOL ret; CHAR windows_dir[MAX_PATH]; + if (!pGetNamedSecurityInfoA) + { + skip("GetNamedSecurityInfoA is not available\n"); + return; + } + ret = GetWindowsDirectoryA(windows_dir, MAX_PATH); ok(ret, "GetWindowsDirectory failed with error %d\n", GetLastError()); SetLastError(0xdeadbeef); - error = GetNamedSecurityInfoA(windows_dir, SE_FILE_OBJECT, + error = pGetNamedSecurityInfoA(windows_dir, SE_FILE_OBJECT, OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|DACL_SECURITY_INFORMATION, NULL, NULL, NULL, NULL, &pSecDesc); if (error != ERROR_SUCCESS && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED))
1
0
0
0
← Newer
1
...
55
56
57
58
59
60
61
...
109
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
Results per page:
10
25
50
100
200