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
May 2010
----- 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
955 discussions
Start a n
N
ew thread
Henri Verbeet : wined3d: Handle depth/ stencil surfaces in IWineD3DSurfaceImpl_LoadLocation().
by Alexandre Julliard
17 May '10
17 May '10
Module: wine Branch: master Commit: 44ab3d70f1987b239291f753a95c93eabddddb57 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=44ab3d70f1987b239291f753a…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon May 17 11:14:45 2010 +0200 wined3d: Handle depth/stencil surfaces in IWineD3DSurfaceImpl_LoadLocation(). --- dlls/wined3d/device.c | 1 + dlls/wined3d/drawprim.c | 3 +++ dlls/wined3d/surface.c | 16 ++++++++++++++++ 3 files changed, 20 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 2b8f231..cf23b3b 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4483,6 +4483,7 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac if (location == SFLAG_DS_ONSCREEN && depth_stencil != This->onscreen_depth_stencil) device_switch_onscreen_ds(This, context, depth_stencil); prepare_ds_clear(depth_stencil, context, location, &draw_rect, Count, clear_rect); + IWineD3DSurface_ModifyLocation((IWineD3DSurface *)depth_stencil, SFLAG_INDRAWABLE, TRUE); glDepthMask(GL_TRUE); IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_ZWRITEENABLE)); diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 1f904ea..3da4093 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -634,9 +634,12 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT StartIdx, UINT surface_load_ds_location(This->depth_stencil, context, location); if (This->stateBlock->renderState[WINED3DRS_ZWRITEENABLE]) + { surface_modify_ds_location(This->depth_stencil, location, This->depth_stencil->ds_current_size.cx, This->depth_stencil->ds_current_size.cy); + IWineD3DSurface_ModifyLocation((IWineD3DSurface *)This->depth_stencil, SFLAG_INDRAWABLE, TRUE); + } } } diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index db4a58b..4b70622 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -4390,6 +4390,22 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadLocation(IWineD3DSurface *iface, D BOOL drawable_read_ok = TRUE; BOOL in_fbo = FALSE; + if (This->resource.usage & WINED3DUSAGE_DEPTHSTENCIL) + { + if (flag == SFLAG_INTEXTURE) + { + struct wined3d_context *context = context_acquire(device, NULL); + surface_load_ds_location(This, context, SFLAG_DS_OFFSCREEN); + context_release(context); + return WINED3D_OK; + } + else + { + FIXME("Unimplemented location %#x for depth/stencil buffers.\n", flag); + return WINED3DERR_INVALIDCALL; + } + } + if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) { if (surface_is_offscreen(This))
1
0
0
0
Michael Stefaniuc : msvfw32: Replace long with LONG.
by Alexandre Julliard
17 May '10
17 May '10
Module: wine Branch: master Commit: bdc85b69f60ab6c62742abf889ccd7e17e5b5c81 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bdc85b69f60ab6c62742abf88…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Mon May 17 01:09:05 2010 +0200 msvfw32: Replace long with LONG. --- dlls/msvfw32/mciwnd.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msvfw32/mciwnd.c b/dlls/msvfw32/mciwnd.c index 96b6420..bf23a63 100644 --- a/dlls/msvfw32/mciwnd.c +++ b/dlls/msvfw32/mciwnd.c @@ -48,7 +48,7 @@ typedef struct int alias; UINT dev_type; UINT mode; - long position; + LONG position; SIZE size; /* size of the original frame rect */ int zoom; LPWSTR lpName; @@ -158,7 +158,7 @@ static inline void MCIWND_notify_pos(MCIWndInfo *mwi) { if (mwi->dwStyle & MCIWNDF_NOTIFYPOS) { - long new_pos = SendMessageW(mwi->hWnd, MCIWNDM_GETPOSITIONW, 0, 0); + LONG new_pos = SendMessageW(mwi->hWnd, MCIWNDM_GETPOSITIONW, 0, 0); if (new_pos != mwi->position) { mwi->position = new_pos;
1
0
0
0
Andrey Turkin : oleaut32: Set flag for retval params in ICreateTypeInfo:: AddFuncDesc.
by Alexandre Julliard
17 May '10
17 May '10
Module: wine Branch: master Commit: 16468517bb9fed3569365449320617d6bb70af51 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=16468517bb9fed35693654493…
Author: Andrey Turkin <andrey.turkin(a)gmail.com> Date: Mon May 17 02:28:11 2010 +0400 oleaut32: Set flag for retval params in ICreateTypeInfo::AddFuncDesc. --- dlls/oleaut32/typelib2.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c index df36268..b5ebea3 100644 --- a/dlls/oleaut32/typelib2.c +++ b/dlls/oleaut32/typelib2.c @@ -1766,7 +1766,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc( CyclicList *iter, *insert; int *typedata; - int i, num_defaults = 0; + int i, num_defaults = 0, num_retval = 0; int decoded_size; HRESULT hres; @@ -1806,9 +1806,12 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc( return TYPE_E_INCONSISTENTPROPFUNCS; /* get number of arguments with default values specified */ - for (i = 0; i < pFuncDesc->cParams; i++) + for (i = 0; i < pFuncDesc->cParams; i++) { if(pFuncDesc->lprgelemdescParam[i].u.paramdesc.wParamFlags & PARAMFLAG_FHASDEFAULT) num_defaults++; + if(pFuncDesc->lprgelemdescParam[i].u.paramdesc.wParamFlags & PARAMFLAG_FRETVAL) + num_retval++; + } if (!This->typedata) { This->typedata = HeapAlloc(GetProcessHeap(), 0, sizeof(CyclicList)); @@ -1840,6 +1843,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc( typedata[3] = ((sizeof(FUNCDESC) + decoded_size) << 16) | (unsigned short)(pFuncDesc->oVft?pFuncDesc->oVft+1:0); typedata[4] = (pFuncDesc->callconv << 8) | (pFuncDesc->invkind << 3) | pFuncDesc->funckind; if(num_defaults) typedata[4] |= 0x1000; + if (num_retval) typedata[4] |= 0x4000; typedata[5] = pFuncDesc->cParams; /* NOTE: High word of typedata[3] is total size of FUNCDESC + size of all ELEMDESCs for params + TYPEDESCs for pointer params and return types. */
1
0
0
0
Andrey Turkin : oleaut32: Distinguish between variables and functions in ICreateTypeInfo functions.
by Alexandre Julliard
17 May '10
17 May '10
Module: wine Branch: master Commit: 5e4c16b348a5baf448b8a8876b0785ce247bc6d8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5e4c16b348a5baf448b8a8876…
Author: Andrey Turkin <andrey.turkin(a)gmail.com> Date: Mon May 17 02:28:01 2010 +0400 oleaut32: Distinguish between variables and functions in ICreateTypeInfo functions. --- dlls/oleaut32/typelib2.c | 91 ++++++++++++++++++++++++++++++---------------- 1 files changed, 59 insertions(+), 32 deletions(-) diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c index ada89b3..df36268 100644 --- a/dlls/oleaut32/typelib2.c +++ b/dlls/oleaut32/typelib2.c @@ -118,10 +118,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(typelib2); /*================== Implementation Structures ===================================*/ /* Used for storing cyclic list. Tail address is kept */ +enum tagCyclicListElementType { + CyclicListFunc, + CyclicListVar +}; typedef struct tagCyclicList { struct tagCyclicList *next; int indice; int name; + enum tagCyclicListElementType type; union { int val; @@ -1873,6 +1878,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc( /* update the index data */ insert->indice = pFuncDesc->memid; insert->name = -1; + insert->type = CyclicListFunc; /* insert type data to list */ if(index == This->typeinfo->cElement) { @@ -2125,6 +2131,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddVarDesc( /* update the index data */ insert->indice = 0x40000000 + index; insert->name = -1; + insert->type = CyclicListVar; /* figure out type widths and whatnot */ ctl2_encode_typedesc(This->typelib, &pVarDesc->elemdescVar.tdesc, @@ -2192,11 +2199,13 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetFuncAndParamNames( if(!rgszNames) return E_INVALIDARG; - if(index >= This->typeinfo->cElement || !cNames) + if(index >= (This->typeinfo->cElement&0xFFFF) || !cNames) return TYPE_E_ELEMENTNOTFOUND; - for(iter=This->typedata->next->next, i=0; i<index; i++) - iter=iter->next; + for(iter=This->typedata->next->next, i=0; /* empty */; iter=iter->next) + if (iter->type == CyclicListFunc) + if (i++ >= index) + break; /* cNames == cParams for put or putref accessor, cParams+1 otherwise */ if(cNames != iter->u.data[5] + ((iter->u.data[4]>>3)&(INVOKE_PROPERTYPUT|INVOKE_PROPERTYPUTREF) ? 0 : 1)) @@ -2205,14 +2214,17 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetFuncAndParamNames( len = ctl2_encode_name(This->typelib, rgszNames[0], &namedata); for(iter2=This->typedata->next->next; iter2!=This->typedata->next; iter2=iter2->next) { if(iter2->name!=-1 && !memcmp(namedata, - This->typelib->typelib_segment_data[MSFT_SEG_NAME]+iter2->name+8, len)) - { + This->typelib->typelib_segment_data[MSFT_SEG_NAME]+iter2->name+8, len)) { /* getters/setters can have a same name */ - INT inv1 = iter2->u.data[4] >> 3; - INT inv2 = iter->u.data[4] >> 3; - if (!((inv1&(INVOKE_PROPERTYPUT|INVOKE_PROPERTYPUTREF)) && (inv2&INVOKE_PROPERTYGET)) && - !((inv2&(INVOKE_PROPERTYPUT|INVOKE_PROPERTYPUTREF)) && (inv1&INVOKE_PROPERTYGET))) - return TYPE_E_AMBIGUOUSNAME; + if (iter2->type == CyclicListFunc) { + INT inv1 = iter2->u.data[4] >> 3; + INT inv2 = iter->u.data[4] >> 3; + if (((inv1&(INVOKE_PROPERTYPUT|INVOKE_PROPERTYPUTREF)) && (inv2&INVOKE_PROPERTYGET)) || + ((inv2&(INVOKE_PROPERTYPUT|INVOKE_PROPERTYPUTREF)) && (inv1&INVOKE_PROPERTYGET))) + continue; + } + + return TYPE_E_AMBIGUOUSNAME; } } @@ -2269,9 +2281,10 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetVarName( namedata[9] |= 0x20; } - iter = This->typedata->next->next; - for(i=0; i<index; i++) - iter = iter->next; + for(iter = This->typedata->next->next, i = 0; /* empty */; iter = iter->next) + if (iter->type == CyclicListVar) + if (i++ >= index) + break; iter->name = offset; return S_OK; @@ -2373,12 +2386,13 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetFuncHelpContext( if(This->typeinfo->cElement<index) return TYPE_E_ELEMENTNOTFOUND; - if(This->typeinfo->cElement == index) + if(This->typeinfo->cElement == index && This->typedata->type == CyclicListFunc) func = This->typedata; else for(func=This->typedata->next->next; func!=This->typedata; func=func->next) - if(index-- == 0) - break; + if (func->type == CyclicListFunc) + if(index-- == 0) + break; This->typedata->next->u.val += funcrecord_reallochdr(&func->u.data, 7*sizeof(int)); if(!func->u.data) @@ -2438,7 +2452,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnLayOut( ICreateTypeInfo2* iface) { ICreateTypeInfo2Impl *This = (ICreateTypeInfo2Impl *)iface; - CyclicList *iter, *iter2, **typedata; + CyclicList *iter, *iter2, *last = NULL, **typedata; HREFTYPE hreftype; HRESULT hres; unsigned user_vft = 0; @@ -2552,10 +2566,14 @@ static HRESULT WINAPI ICreateTypeInfo2_fnLayOut( return E_OUTOFMEMORY; /* Assign IDs and VTBL entries */ - i = 0; - if(This->typedata->u.data[3]&1) - user_vft = This->typedata->u.data[3]&0xffff; + for(iter=This->typedata->next->next; iter!=This->typedata->next; iter=iter->next) + if (iter->type == CyclicListFunc) + last = iter; + + if(last && last->u.data[3]&1) + user_vft = last->u.data[3]&0xffff; + i = 0; for(iter=This->typedata->next->next; iter!=This->typedata->next; iter=iter->next) { /* Assign MEMBERID if MEMBERID_NIL was specified */ if(iter->indice == MEMBERID_NIL) { @@ -2579,6 +2597,9 @@ static HRESULT WINAPI ICreateTypeInfo2_fnLayOut( } } + if (iter->type != CyclicListFunc) + continue; + typedata[i] = iter; iter->u.data[0] = (iter->u.data[0]&0xffff) | (i<<16); @@ -2788,15 +2809,16 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetFuncCustData( { ICreateTypeInfo2Impl *This = (ICreateTypeInfo2Impl *)iface; CyclicList *iter; - UINT i; TRACE("(%p,%d,%s,%p)\n", iface, index, debugstr_guid(guid), pVarVal); - if(index >= This->typeinfo->cElement) + if(index >= (This->typeinfo->cElement&0xFFFF)) return TYPE_E_ELEMENTNOTFOUND; - for(iter=This->typedata->next->next, i=0; i<index; i++) - iter=iter->next; + for(iter=This->typedata->next->next; /* empty */; iter=iter->next) + if (iter->type == CyclicListFunc) + if (index-- == 0) + break; This->typedata->next->u.val += funcrecord_reallochdr(&iter->u.data, 13*sizeof(int)); if(!iter->u.data) @@ -3247,15 +3269,20 @@ static HRESULT WINAPI ITypeInfo2_fnGetDocumentation( if (This->typedata) { for(iter=This->typedata->next->next; iter!=This->typedata->next; iter=iter->next) { if (iter->indice == memid) { - const int *typedata = iter->u.data; - int size = typedata[0] - typedata[5]*(typedata[4]&0x1000?16:12); - - nameoffset = iter->name; - /* FIXME implement this once SetFuncDocString is implemented */ - docstringoffset = -1; - helpcontext = (size < 7*sizeof(int)) ? 0 : typedata[6]; + if (iter->type == CyclicListFunc) { + const int *typedata = iter->u.data; + int size = typedata[0] - typedata[5]*(typedata[4]&0x1000?16:12); + + nameoffset = iter->name; + /* FIXME implement this once SetFuncDocString is implemented */ + docstringoffset = -1; + helpcontext = (size < 7*sizeof(int)) ? 0 : typedata[6]; + + status = S_OK; + } else { + FIXME("Not implemented for variable members\n"); + } - status = S_OK; break; } }
1
0
0
0
Andrey Turkin : oleaut32: Implement ICreateTypeInfo2::SetFuncCustData.
by Alexandre Julliard
17 May '10
17 May '10
Module: wine Branch: master Commit: 40b59afac87a9a5c8b08151700275ab7023064b9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=40b59afac87a9a5c8b0815170…
Author: Andrey Turkin <andrey.turkin(a)gmail.com> Date: Mon May 17 02:27:50 2010 +0400 oleaut32: Implement ICreateTypeInfo2::SetFuncCustData. --- dlls/oleaut32/typelib2.c | 113 +++++++++++++++++++++++++++++++++++----------- 1 files changed, 87 insertions(+), 26 deletions(-) diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c index c1a3bd9..ada89b3 100644 --- a/dlls/oleaut32/typelib2.c +++ b/dlls/oleaut32/typelib2.c @@ -1316,6 +1316,69 @@ static HRESULT ctl2_add_default_value( } } +/**************************************************************************** + * funcrecord_reallochdr + * + * Ensure FuncRecord data block contains header of required size + * + * PARAMS + * + * typedata [IO] - reference to pointer to data block + * need [I] - required size of block in bytes + * + * RETURNS + * + * Number of additionally allocated bytes + */ +static INT funcrecord_reallochdr(INT **typedata, int need) +{ + int tail = (*typedata)[5]*((*typedata)[4]&0x1000?16:12); + int hdr = (*typedata)[0] - tail; + int i; + + if (hdr >= need) + return 0; + + *typedata = HeapReAlloc(GetProcessHeap(), 0, *typedata, need + tail); + if (!*typedata) + return -1; + + if (tail) + memmove((char*)*typedata + need, (const char*)*typedata + hdr, tail); + (*typedata)[0] = need + tail; + + /* fill in default values */ + for(i = (hdr+3)/4; (i+1)*4 <= need; i++) + { + switch(i) + { + case 2: + (*typedata)[i] = 0; + break; + case 7: + (*typedata)[i] = -1; + break; + case 8: + (*typedata)[i] = -1; + break; + case 9: + (*typedata)[i] = -1; + break; + case 10: + (*typedata)[i] = -1; + break; + case 11: + (*typedata)[i] = 0; + break; + case 12: + (*typedata)[i] = -1; + break; + } + } + + return need - hdr; +} + /*================== ICreateTypeInfo2 Implementation ===================================*/ /****************************************************************************** @@ -2162,14 +2225,11 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetFuncAndParamNames( namedata = This->typelib->typelib_segment_data[MSFT_SEG_NAME] + offset; *((INT *)namedata) = This->typelib->typelib_typeinfo_offsets[This->typeinfo->typekind >> 16]; - if(iter->u.data[4]&0x1000) - len = iter->u.data[5]; - else - len = 0; + len = iter->u.data[0]/4 - iter->u.data[5]*3; for (i = 1; i < cNames; i++) { offset = ctl2_alloc_name(This->typelib, rgszNames[i]); - iter->u.data[(i*3) + 4 + len] = offset; + iter->u.data[len + ((i-1)*3) + 1] = offset; } return S_OK; @@ -2307,8 +2367,6 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetFuncHelpContext( { ICreateTypeInfo2Impl *This = (ICreateTypeInfo2Impl *)iface; CyclicList *func; - int *typedata; - int size; TRACE("(%p,%d,%d)\n", iface, index, dwHelpContext); @@ -2322,24 +2380,11 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetFuncHelpContext( if(index-- == 0) break; - typedata = func->u.data; - - /* Compute func size without arguments */ - size = typedata[0] - typedata[5]*(typedata[4]&0x1000?16:12); - - /* Allocate memory for HelpContext if needed */ - if(size < 7*sizeof(int)) { - typedata = HeapReAlloc(GetProcessHeap(), 0, typedata, typedata[0]+sizeof(int)); - if(!typedata) - return E_OUTOFMEMORY; - - memmove(&typedata[7], &typedata[6], typedata[0]-sizeof(int)*6); - typedata[0] += sizeof(int); - This->typedata->next->u.val += sizeof(int); - func->u.data = typedata; - } + This->typedata->next->u.val += funcrecord_reallochdr(&func->u.data, 7*sizeof(int)); + if(!func->u.data) + return E_OUTOFMEMORY; - typedata[6] = dwHelpContext; + func->u.data[6] = dwHelpContext; return S_OK; } @@ -2741,8 +2786,24 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetFuncCustData( REFGUID guid, /* [I] The GUID used as a key to retrieve the custom data. */ VARIANT* pVarVal) /* [I] The custom data. */ { - FIXME("(%p,%d,%s,%p), stub!\n", iface, index, debugstr_guid(guid), pVarVal); - return E_OUTOFMEMORY; + ICreateTypeInfo2Impl *This = (ICreateTypeInfo2Impl *)iface; + CyclicList *iter; + UINT i; + + TRACE("(%p,%d,%s,%p)\n", iface, index, debugstr_guid(guid), pVarVal); + + if(index >= This->typeinfo->cElement) + return TYPE_E_ELEMENTNOTFOUND; + + for(iter=This->typedata->next->next, i=0; i<index; i++) + iter=iter->next; + + This->typedata->next->u.val += funcrecord_reallochdr(&iter->u.data, 13*sizeof(int)); + if(!iter->u.data) + return E_OUTOFMEMORY; + + iter->u.data[4] |= 0x80; + return ctl2_set_custdata(This->typelib, guid, pVarVal, &iter->u.data[12]); } /******************************************************************************
1
0
0
0
Andrey Turkin : oleaut32: Fix ICreateTypeLib2::SetFuncAndParamNames.
by Alexandre Julliard
17 May '10
17 May '10
Module: wine Branch: master Commit: b4025a3ed17c647240016b701fe1c457764bb41e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b4025a3ed17c647240016b701…
Author: Andrey Turkin <andrey.turkin(a)gmail.com> Date: Mon May 17 02:27:34 2010 +0400 oleaut32: Fix ICreateTypeLib2::SetFuncAndParamNames. Getters and setters for same property can have an identical name --- dlls/oleaut32/tests/typelib.c | 12 ++++++++++++ dlls/oleaut32/typelib2.c | 26 ++++++++++++++++---------- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index a081163..ff7defb 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -982,10 +982,12 @@ static void test_CreateTypeLib(void) { static WCHAR defaultW[] = {'d','e','f','a','u','l','t',0x3213,0}; static OLECHAR func1W[] = {'f','u','n','c','1',0}; static OLECHAR func2W[] = {'f','u','n','c','2',0}; + static OLECHAR prop1W[] = {'P','r','o','p','1',0}; static OLECHAR param1W[] = {'p','a','r','a','m','1',0}; static OLECHAR param2W[] = {'p','a','r','a','m','2',0}; static OLECHAR *names1[] = {func1W, param1W, param2W}; static OLECHAR *names2[] = {func2W, param1W, param2W}; + static OLECHAR *propname[] = {prop1W, param1W}; static const GUID custguid = {0xbf611abe,0x5b38,0x11df,{0x91,0x5c,0x08,0x02,0x79,0x79,0x94,0x70}}; char filename[MAX_PATH]; @@ -1171,6 +1173,16 @@ static void test_CreateTypeLib(void) { hres = ICreateTypeInfo_SetFuncHelpContext(createti, 1, 0xabcdefab); ok(hres == S_OK, "got %08x\n", hres); + hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 0, propname, 1); + ok(hres == S_OK, "got %08x\n", hres); + + hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 1, propname, 1); + ok(hres == S_OK, "got %08x\n", hres); + + hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 1, propname, 2); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + + funcdesc.invkind = INVOKE_PROPERTYPUTREF; hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc); ok(hres == S_OK, "got %08x\n", hres); diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c index c870b4f..c1a3bd9 100644 --- a/dlls/oleaut32/typelib2.c +++ b/dlls/oleaut32/typelib2.c @@ -2132,21 +2132,27 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetFuncAndParamNames( if(index >= This->typeinfo->cElement || !cNames) return TYPE_E_ELEMENTNOTFOUND; - len = ctl2_encode_name(This->typelib, rgszNames[0], &namedata); - for(iter2=This->typedata->next->next; iter2!=This->typedata->next; iter2=iter2->next) { - if(i == index) - iter = iter2; - else if(iter2->name!=-1 && !memcmp(namedata, - This->typelib->typelib_segment_data[MSFT_SEG_NAME]+iter2->name+8, len)) - return TYPE_E_AMBIGUOUSNAME; - - i++; - } + for(iter=This->typedata->next->next, i=0; i<index; i++) + iter=iter->next; /* cNames == cParams for put or putref accessor, cParams+1 otherwise */ if(cNames != iter->u.data[5] + ((iter->u.data[4]>>3)&(INVOKE_PROPERTYPUT|INVOKE_PROPERTYPUTREF) ? 0 : 1)) return TYPE_E_ELEMENTNOTFOUND; + len = ctl2_encode_name(This->typelib, rgszNames[0], &namedata); + for(iter2=This->typedata->next->next; iter2!=This->typedata->next; iter2=iter2->next) { + if(iter2->name!=-1 && !memcmp(namedata, + This->typelib->typelib_segment_data[MSFT_SEG_NAME]+iter2->name+8, len)) + { + /* getters/setters can have a same name */ + INT inv1 = iter2->u.data[4] >> 3; + INT inv2 = iter->u.data[4] >> 3; + if (!((inv1&(INVOKE_PROPERTYPUT|INVOKE_PROPERTYPUTREF)) && (inv2&INVOKE_PROPERTYGET)) && + !((inv2&(INVOKE_PROPERTYPUT|INVOKE_PROPERTYPUTREF)) && (inv1&INVOKE_PROPERTYGET))) + return TYPE_E_AMBIGUOUSNAME; + } + } + offset = ctl2_alloc_name(This->typelib, rgszNames[0]); if(offset == -1) return E_OUTOFMEMORY;
1
0
0
0
Andrey Turkin : oleaut32: Implement ITypeInfo::GetDocumentation.
by Alexandre Julliard
17 May '10
17 May '10
Module: wine Branch: master Commit: 57c784e205609343dba274c9f123da9c414a0c20 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=57c784e205609343dba274c9f…
Author: Andrey Turkin <andrey.turkin(a)gmail.com> Date: Mon May 17 02:27:14 2010 +0400 oleaut32: Implement ITypeInfo::GetDocumentation. --- dlls/oleaut32/tests/typelib.c | 49 +++++++++++++++++++++++-- dlls/oleaut32/typelib2.c | 81 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 124 insertions(+), 6 deletions(-) diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index f0f577a..a081163 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -973,6 +973,7 @@ if(use_midl_tlb) { static void test_CreateTypeLib(void) { static const WCHAR stdoleW[] = {'s','t','d','o','l','e','2','.','t','l','b',0}; static OLECHAR typelibW[] = {'t','y','p','e','l','i','b',0}; + static OLECHAR helpfileW[] = {'C',':','\\','b','o','g','u','s','.','h','l','p',0}; static OLECHAR interface1W[] = {'i','n','t','e','r','f','a','c','e','1',0}; static OLECHAR interface2W[] = {'i','n','t','e','r','f','a','c','e','2',0}; static OLECHAR interface3W[] = {'i','n','t','e','r','f','a','c','e','3',0}; @@ -1052,16 +1053,19 @@ static void test_CreateTypeLib(void) { hres = ICreateTypeLib_SetName(createtl, typelibW); ok(hres == S_OK, "got %08x\n", hres); + hres = ICreateTypeLib_SetHelpFileName(createtl, helpfileW); + ok(hres == S_OK, "got %08x\n", hres); + hres = ITypeLib_GetDocumentation(tl, -1, NULL, NULL, NULL, NULL); ok(hres == S_OK, "got %08x\n", hres); - hres = ITypeLib_GetDocumentation(tl, -1, &name, NULL, NULL, NULL); + hres = ITypeLib_GetDocumentation(tl, -1, &name, NULL, NULL, &helpfile); ok(hres == S_OK, "got %08x\n", hres); ok(!memcmp(name, typelibW, sizeof(typelibW)), "name = %s\n", wine_dbgstr_w(name)); + ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "helpfile = %s\n", wine_dbgstr_w(helpfile)); SysFreeString(name); - - ITypeLib_Release(tl); + SysFreeString(helpfile); hres = ICreateTypeLib_CreateTypeInfo(createtl, interface1W, TKIND_INTERFACE, &createti); ok(hres == S_OK, "got %08x\n", hres); @@ -1069,9 +1073,33 @@ static void test_CreateTypeLib(void) { hres = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (void**)&interface1); ok(hres == S_OK, "got %08x\n", hres); + hres = ITypeLib_GetDocumentation(tl, 0, &name, NULL, NULL, NULL); + ok(hres == S_OK, "got %08x\n", hres); + ok(!memcmp(name, interface1W, sizeof(interface1W)), "name = %s\n", wine_dbgstr_w(name)); + + SysFreeString(name); + + ITypeLib_Release(tl); + + name = (BSTR)0xdeadbeef; + helpfile = (BSTR)0xdeadbeef; + hres = ITypeInfo_GetDocumentation(interface1, -1, &name, &docstring, &helpcontext, &helpfile); + ok(hres == S_OK, "got %08x\n", hres); + ok(!memcmp(name, interface1W, sizeof(interface1W)), "name = %s\n", wine_dbgstr_w(name)); + ok(docstring == NULL, "docstring != NULL\n"); + ok(helpcontext == 0, "helpcontext != 0\n"); + ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "helpfile = %s\n", wine_dbgstr_w(helpfile)); + + SysFreeString(name); + SysFreeString(helpfile); + + hres = ITypeInfo_GetDocumentation(interface1, 0, &name, NULL, NULL, NULL); + ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); + hres = ITypeInfo_GetRefTypeInfo(interface1, 0, NULL); ok(hres == E_INVALIDARG, "got %08x\n", hres); + hres = ICreateTypeInfo_LayOut(createti); ok(hres == S_OK, "got %08x\n", hres); @@ -1212,6 +1240,15 @@ static void test_CreateTypeLib(void) { hres = ICreateTypeInfo_AddFuncDesc(createti, 3, &funcdesc); ok(hres == S_OK, "got %08x\n", hres); + hres = ITypeInfo_GetDocumentation(interface1, 0, &name, &docstring, &helpcontext, &helpfile); + ok(hres == S_OK, "got %08x\n", hres); + ok(name == NULL, "name != NULL\n"); + ok(docstring == NULL, "docstring != NULL\n"); + ok(helpcontext == 0x201, "helpcontext != 0x201\n"); + ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "helpfile = %s\n", wine_dbgstr_w(helpfile)); + + SysFreeString(helpfile); + hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 1000, NULL, 1); ok(hres == E_INVALIDARG, "got %08x\n", hres); @@ -1227,6 +1264,12 @@ static void test_CreateTypeLib(void) { hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 0, names1, 1); ok(hres == S_OK, "got %08x\n", hres); + hres = ITypeInfo_GetDocumentation(interface1, 0, &name, NULL, NULL, NULL); + ok(hres == S_OK, "got %08x\n", hres); + ok(!memcmp(name, func1W, sizeof(func1W)), "name = %s\n", wine_dbgstr_w(name)); + + SysFreeString(name); + hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 3, names2, 3); ok(hres == S_OK, "got %08x\n", hres); diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c index 22a3a23..c870b4f 100644 --- a/dlls/oleaut32/typelib2.c +++ b/dlls/oleaut32/typelib2.c @@ -3163,8 +3163,83 @@ static HRESULT WINAPI ITypeInfo2_fnGetDocumentation( DWORD* pdwHelpContext, BSTR* pBstrHelpFile) { - FIXME("(%p,%d,%p,%p,%p,%p), stub!\n", iface, memid, pBstrName, pBstrDocString, pdwHelpContext, pBstrHelpFile); - return E_OUTOFMEMORY; + ICreateTypeInfo2Impl *This = impl_from_ITypeInfo2(iface); + HRESULT status = TYPE_E_ELEMENTNOTFOUND; + INT nameoffset, docstringoffset, helpcontext; + + TRACE("(%p,%d,%p,%p,%p,%p)\n", iface, memid, pBstrName, pBstrDocString, pdwHelpContext, pBstrHelpFile); + + if (memid == -1) + { + nameoffset = This->typeinfo->NameOffset; + docstringoffset = This->typeinfo->docstringoffs; + helpcontext = This->typeinfo->helpcontext; + status = S_OK; + } else { + CyclicList *iter; + if (This->typedata) { + for(iter=This->typedata->next->next; iter!=This->typedata->next; iter=iter->next) { + if (iter->indice == memid) { + const int *typedata = iter->u.data; + int size = typedata[0] - typedata[5]*(typedata[4]&0x1000?16:12); + + nameoffset = iter->name; + /* FIXME implement this once SetFuncDocString is implemented */ + docstringoffset = -1; + helpcontext = (size < 7*sizeof(int)) ? 0 : typedata[6]; + + status = S_OK; + break; + } + } + } + } + + if (!status) { + WCHAR *string; + if (pBstrName) { + if (nameoffset == -1) + *pBstrName = NULL; + else { + MSFT_NameIntro *name = (MSFT_NameIntro*)&This->typelib-> + typelib_segment_data[MSFT_SEG_NAME][nameoffset]; + ctl2_decode_name((char*)&name->namelen, &string); + *pBstrName = SysAllocString(string); + if(!*pBstrName) + return E_OUTOFMEMORY; + } + } + + if (pBstrDocString) { + if (docstringoffset == -1) + *pBstrDocString = NULL; + else { + MSFT_NameIntro *name = (MSFT_NameIntro*)&This->typelib-> + typelib_segment_data[MSFT_SEG_NAME][docstringoffset]; + ctl2_decode_name((char*)&name->namelen, &string); + *pBstrDocString = SysAllocString(string); + if(!*pBstrDocString) { + if (pBstrName) SysFreeString(*pBstrName); + return E_OUTOFMEMORY; + } + } + } + + if (pdwHelpContext) { + *pdwHelpContext = helpcontext; + } + + if (pBstrHelpFile) { + status = ITypeLib_GetDocumentation((ITypeLib*)&This->typelib->lpVtblTypeLib2, + -1, NULL, NULL, NULL, pBstrHelpFile); + if (status) { + if (pBstrName) SysFreeString(*pBstrName); + if (pBstrDocString) SysFreeString(*pBstrDocString); + } + } + } + + return status; } /****************************************************************************** @@ -4549,7 +4624,7 @@ static HRESULT WINAPI ITypeLib2_fnGetDocumentation( if(!iter) return TYPE_E_ELEMENTNOTFOUND; - return ITypeInfo_GetDocumentation((ITypeInfo*)iter->lpVtblTypeInfo2, + return ITypeInfo_GetDocumentation((ITypeInfo*)&iter->lpVtblTypeInfo2, -1, pBstrName, pBstrDocString, pdwHelpContext, pBstrHelpFile); }
1
0
0
0
Wolfram Sang : user32: Apply sanity-check in BITMAP_Load.
by Alexandre Julliard
17 May '10
17 May '10
Module: wine Branch: master Commit: 636e35d8ada49883fc16de3700a006f7daad6441 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=636e35d8ada49883fc16de370…
Author: Wolfram Sang <wolfram(a)the-dreams.de> Date: Mon May 17 04:57:36 2010 +0200 user32: Apply sanity-check in BITMAP_Load. --- dlls/user32/cursoricon.c | 9 +++++++-- dlls/user32/tests/cursoricon.c | 21 ++++++++++++++------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c index 8cccbbe..dcd94b1 100644 --- a/dlls/user32/cursoricon.c +++ b/dlls/user32/cursoricon.c @@ -2421,12 +2421,16 @@ static HBITMAP BITMAP_Load( HINSTANCE instance, LPCWSTR name, if (bmfh->bfType != 0x4d42 /* 'BM' */) { WARN("Invalid/unsupported bitmap format!\n"); - UnmapViewOfFile( ptr ); - return 0; + goto end_close; } offbits = bmfh->bfOffBits - sizeof(BITMAPFILEHEADER); } + if (info->bmiHeader.biHeight > 65535 || info->bmiHeader.biWidth > 65535) { + WARN("Broken BitmapInfoHeader!\n"); + goto end_close; + } + size = bitmap_info_size(info, DIB_RGB_COLORS); fix_info = HeapAlloc(GetProcessHeap(), 0, size); scaled_info = HeapAlloc(GetProcessHeap(), 0, size); @@ -2490,6 +2494,7 @@ end: if (screen_mem_dc) DeleteDC(screen_mem_dc); HeapFree(GetProcessHeap(), 0, scaled_info); HeapFree(GetProcessHeap(), 0, fix_info); +end_close: if (loadflags & LR_LOADFROMFILE) UnmapViewOfFile( ptr ); return hbitmap; diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c index a7be34f..8af4126 100644 --- a/dlls/user32/tests/cursoricon.c +++ b/dlls/user32/tests/cursoricon.c @@ -667,14 +667,14 @@ static void test_CreateIcon(void) /* Shamelessly ripped from dlls/oleaut32/tests/olepicture.c */ /* 1x1 pixel gif */ -static const unsigned char gifimage[35] = { +static unsigned char gifimage[35] = { 0x47,0x49,0x46,0x38,0x37,0x61,0x01,0x00,0x01,0x00,0x80,0x00,0x00,0xff,0xff,0xff, 0xff,0xff,0xff,0x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x02,0x02,0x44, 0x01,0x00,0x3b }; /* 1x1 pixel jpg */ -static const unsigned char jpgimage[285] = { +static unsigned char jpgimage[285] = { 0xff,0xd8,0xff,0xe0,0x00,0x10,0x4a,0x46,0x49,0x46,0x00,0x01,0x01,0x01,0x01,0x2c, 0x01,0x2c,0x00,0x00,0xff,0xdb,0x00,0x43,0x00,0x05,0x03,0x04,0x04,0x04,0x03,0x05, 0x04,0x04,0x04,0x05,0x05,0x05,0x06,0x07,0x0c,0x08,0x07,0x07,0x07,0x07,0x0f,0x0b, @@ -696,7 +696,7 @@ static const unsigned char jpgimage[285] = { }; /* 1x1 pixel png */ -static const unsigned char pngimage[285] = { +static unsigned char pngimage[285] = { 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,0x44,0x52, 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x08,0x02,0x00,0x00,0x00,0x90,0x77,0x53, 0xde,0x00,0x00,0x00,0x09,0x70,0x48,0x59,0x73,0x00,0x00,0x0b,0x13,0x00,0x00,0x0b, @@ -708,7 +708,7 @@ static const unsigned char pngimage[285] = { /* 1x1 pixel bmp with gap between palette and bitmap. Correct bitmap contains only zeroes, gap is 0xFF. */ -static const unsigned char bmpimage[70] = { +static unsigned char bmpimage[70] = { 0x42,0x4d,0x46,0x00,0x00,0x00,0xDE,0xAD,0xBE,0xEF,0x42,0x00,0x00,0x00,0x28,0x00, 0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00, 0x00,0x00,0x04,0x00,0x00,0x00,0x12,0x0b,0x00,0x00,0x12,0x0b,0x00,0x00,0x02,0x00, @@ -717,7 +717,7 @@ static const unsigned char bmpimage[70] = { }; /* 2x2 pixel gif */ -static const unsigned char gif4pixel[42] = { +static unsigned char gif4pixel[42] = { 0x47,0x49,0x46,0x38,0x37,0x61,0x02,0x00,0x02,0x00,0xa1,0x00,0x00,0x00,0x00,0x00, 0x39,0x62,0xfc,0xff,0x1a,0xe5,0xff,0xff,0xff,0x2c,0x00,0x00,0x00,0x00,0x02,0x00, 0x02,0x00,0x00,0x02,0x03,0x14,0x16,0x05,0x00,0x3b @@ -746,7 +746,7 @@ static void test_LoadImageBitmap(HBITMAP hbm) ok(color_match(pixel, 0x00ffffff), "Pixel is 0x%08x\n", pixel); } -static void test_LoadImageFile(const unsigned char * image_data, +static void test_LoadImageFile(unsigned char * image_data, unsigned int image_size, const char * ext, BOOL expect_success) { HANDLE handle; @@ -787,7 +787,7 @@ static void test_LoadImageFile(const unsigned char * image_data, "Last error: %u\n", error); if (handle != NULL) DestroyIcon(handle); - /* Load as bitmap. Should succeed if bmp, fail for everything else */ + /* Load as bitmap. Should succeed for correct bmp, fail for everything else */ SetLastError(0xdeadbeef); handle = LoadImageA(NULL, filename, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); error = GetLastError(); @@ -897,6 +897,13 @@ static void test_LoadImage(void) test_LoadImageFile(gif4pixel, sizeof(gif4pixel), "gif", 0); test_LoadImageFile(jpgimage, sizeof(jpgimage), "jpg", 0); test_LoadImageFile(pngimage, sizeof(pngimage), "png", 0); + /* Check failure for broken BMP images */ + bmpimage[0x14]++; /* biHeight > 65535 */ + test_LoadImageFile(bmpimage, sizeof(bmpimage), "bmp", 0); + bmpimage[0x14]--; + bmpimage[0x18]++; /* biWidth > 65535 */ + test_LoadImageFile(bmpimage, sizeof(bmpimage), "bmp", 0); + bmpimage[0x18]--; } static void test_CreateIconFromResource(void)
1
0
0
0
Michael Stefaniuc : mciavi32: Remove redundant "not NULL" checks of the lpParms arg.
by Alexandre Julliard
17 May '10
17 May '10
Module: wine Branch: master Commit: cea6f01cd97a9a18afa9aa98f1d8eac727fd32ed URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cea6f01cd97a9a18afa9aa98f…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Mon May 17 01:12:08 2010 +0200 mciavi32: Remove redundant "not NULL" checks of the lpParms arg. --- dlls/mciavi32/mciavi.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/mciavi32/mciavi.c b/dlls/mciavi32/mciavi.c index 1c15dc5..a3bce9d 100644 --- a/dlls/mciavi32/mciavi.c +++ b/dlls/mciavi32/mciavi.c @@ -427,10 +427,10 @@ static DWORD MCIAVI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms dwFromFrame = wma->dwCurrVideoFrame; dwToFrame = wma->dwPlayableVideoFrames - 1; - if (lpParms && (dwFlags & MCI_FROM)) { + if (dwFlags & MCI_FROM) { dwFromFrame = MCIAVI_ConvertTimeFormatToFrame(wma, lpParms->dwFrom); } - if (lpParms && (dwFlags & MCI_TO)) { + if (dwFlags & MCI_TO) { dwToFrame = MCIAVI_ConvertTimeFormatToFrame(wma, lpParms->dwTo); } if (dwToFrame >= wma->dwPlayableVideoFrames) @@ -552,7 +552,7 @@ static DWORD MCIAVI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms mci_play_done: wma->dwStatus = MCI_MODE_STOP; - if (lpParms && (dwFlags & MCI_NOTIFY)) { + if (dwFlags & MCI_NOTIFY) { TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback); mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)), wDevID, MCI_NOTIFY_SUCCESSFUL);
1
0
0
0
Michael Stefaniuc : riched20: Avoid using long.
by Alexandre Julliard
17 May '10
17 May '10
Module: wine Branch: master Commit: cf13e8a3900e3831afe08c7cedf3bd23fdd28aeb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cf13e8a3900e3831afe08c7ce…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Mon May 17 01:11:23 2010 +0200 riched20: Avoid using long. --- dlls/riched20/editor.c | 2 +- dlls/riched20/rtf.h | 2 +- dlls/riched20/tests/editor.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 591f9ff..fcbab6e 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -289,7 +289,7 @@ static LRESULT ME_StreamInText(ME_TextEditor *editor, DWORD dwFormat, ME_InStrea TRACE("%08x %p\n", dwFormat, stream); do { - long nWideChars = 0; + LONG nWideChars = 0; if (!stream->dwSize) { diff --git a/dlls/riched20/rtf.h b/dlls/riched20/rtf.h index d8ac323..4bff331 100644 --- a/dlls/riched20/rtf.h +++ b/dlls/riched20/rtf.h @@ -1122,7 +1122,7 @@ struct _RTF_Info { char *rtfTextBuf; int rtfTextLen; - long rtfLineNum; + int rtfLineNum; int rtfLinePos; diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index ee26683..685eead 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -4318,7 +4318,7 @@ const struct exsetsel_s exsetsel_tests[] = { static void check_EM_EXSETSEL(HWND hwnd, const struct exsetsel_s *setsel, int id) { CHARRANGE cr; - long result; + LRESULT result; int start, end; cr.cpMin = setsel->min;
1
0
0
0
← Newer
1
...
43
44
45
46
47
48
49
...
96
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
Results per page:
10
25
50
100
200