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
January 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
615 discussions
Start a n
N
ew thread
Christian Costa : d3drm: Add definitions for IDirect3DRMFace2.
by Alexandre Julliard
22 Jan '10
22 Jan '10
Module: wine Branch: master Commit: 8909a8085cf2b7c00b754cd7c3ce859c70aa5f0e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8909a8085cf2b7c00b754cd7c…
Author: Christian Costa <titan.costa(a)wanadoo.fr> Date: Thu Jan 21 09:40:52 2010 +0100 d3drm: Add definitions for IDirect3DRMFace2. --- include/d3drmobj.h | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 110 insertions(+), 0 deletions(-) diff --git a/include/d3drmobj.h b/include/d3drmobj.h index 0ec4ee1..3dbd207 100644 --- a/include/d3drmobj.h +++ b/include/d3drmobj.h @@ -2291,6 +2291,116 @@ DECLARE_INTERFACE_(IDirect3DRMFace,IDirect3DRMObject) #define IDirect3DRMFace_GetColor(p,a) (p)->GetColor(a) #endif +/***************************************************************************** + * IDirect3DRMFace2 interface + */ +#define INTERFACE IDirect3DRMFace2 +DECLARE_INTERFACE_(IDirect3DRMFace2,IDirect3DRMObject) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirect3DRMObject methods ***/ + STDMETHOD(Clone)(THIS_ LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObj) PURE; + STDMETHOD(AddDestroyCallback)(THIS_ D3DRMOBJECTCALLBACK, LPVOID argument) PURE; + STDMETHOD(DeleteDestroyCallback)(THIS_ D3DRMOBJECTCALLBACK, LPVOID argument) PURE; + STDMETHOD(SetAppData)(THIS_ DWORD data) PURE; + STDMETHOD_(DWORD, GetAppData)(THIS) PURE; + STDMETHOD(SetName)(THIS_ LPCSTR) PURE; + STDMETHOD(GetName)(THIS_ LPDWORD lpdwSize, LPSTR lpName) PURE; + STDMETHOD(GetClassName)(THIS_ LPDWORD lpdwSize, LPSTR lpName) PURE; + /*** IDirect3DRMFace methods ***/ + STDMETHOD(AddVertex)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE; + STDMETHOD(AddVertexAndNormalIndexed)(THIS_ DWORD vertex, DWORD normal) PURE; + STDMETHOD(SetColorRGB)(THIS_ D3DVALUE, D3DVALUE, D3DVALUE) PURE; + STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE; + STDMETHOD(SetTexture)(THIS_ LPDIRECT3DRMTEXTURE3) PURE; + STDMETHOD(SetTextureCoordinates)(THIS_ DWORD vertex, D3DVALUE u, D3DVALUE v) PURE; + STDMETHOD(SetMaterial)(THIS_ LPDIRECT3DRMMATERIAL2) PURE; + STDMETHOD(SetTextureTopology)(THIS_ BOOL wrap_u, BOOL wrap_v) PURE; + STDMETHOD(GetVertex)(THIS_ DWORD index, D3DVECTOR *vertex, D3DVECTOR *normal) PURE; + STDMETHOD(GetVertices)(THIS_ DWORD *vertex_count, D3DVECTOR *coords, D3DVECTOR *normals); + STDMETHOD(GetTextureCoordinates)(THIS_ DWORD vertex, D3DVALUE *u, D3DVALUE *v) PURE; + STDMETHOD(GetTextureTopology)(THIS_ BOOL *wrap_u, BOOL *wrap_v) PURE; + STDMETHOD(GetNormal)(THIS_ D3DVECTOR *) PURE; + STDMETHOD(GetTexture)(THIS_ LPDIRECT3DRMTEXTURE3 *) PURE; + STDMETHOD(GetMaterial)(THIS_ LPDIRECT3DRMMATERIAL2 *) PURE; + STDMETHOD_(int, GetVertexCount)(THIS) PURE; + STDMETHOD_(int, GetVertexIndex)(THIS_ DWORD which) PURE; + STDMETHOD_(int, GetTextureCoordinateIndex)(THIS_ DWORD which) PURE; + STDMETHOD_(D3DCOLOR, GetColor)(THIS) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirect3DRMFace2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DRMFace2_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DRMFace2_Release(p) (p)->lpVtbl->Release(p) +/*** IDirect3DRMObject methods ***/ +#define IDirect3DRMFace2_Clone(p,a,b,c) (p)->lpVtbl->Clone(p,a,b,c) +#define IDirect3DRMFace2_AddDestroyCallback(p,a,b) (p)->lpVtbl->AddDestroyCallback(p,a,b) +#define IDirect3DRMFace2_DeleteDestroyCallback(p,a,b) (p)->lpVtbl->DeleteDestroyCallback(p,a,b) +#define IDirect3DRMFace2_SetAppData(p,a) (p)->lpVtbl->SetAppData(p,a) +#define IDirect3DRMFace2_GetAppData(p) (p)->lpVtbl->GetAppData(p) +#define IDirect3DRMFace2_SetName(p,a) (p)->lpVtbl->SetName(p,a) +#define IDirect3DRMFace2_GetName(p,a,b) (p)->lpVtbl->GetName(p,a,b) +#define IDirect3DRMFace2_GetClassName(p,a,b) (p)->lpVtbl->GetClassName(p,a,b) +/*** IDirect3DRMFace methods ***/ +#define IDirect3DRMFace2_AddVertex(p,a,b,c) (p)->lpVtbl->AddVertex(p,a,b,c) +#define IDirect3DRMFace2_AddVertexAndNormalIndexed(p,a,b) (p)->lpVtbl->AddVertexAndNormalIndexed(p,a,b) +#define IDirect3DRMFace2_SetColorRGB(p,a,b,c) (p)->lpVtbl->SetColorRGB(p,a,b,c) +#define IDirect3DRMFace2_SetColor(p,a) (p)->lpVtbl->SetColor(p,a) +#define IDirect3DRMFace2_SetTexture(p,a) (p)->lpVtbl->SetTexture(p,a) +#define IDirect3DRMFace2_SetTextureCoordinates(p,a,b,c) (p)->lpVtbl->SetTextureCoordinates(p,a,b,c) +#define IDirect3DRMFace2_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a) +#define IDirect3DRMFace2_SetTextureTopology(p,a,b) (p)->lpVtbl->SetTextureTopology(p,a,b) +#define IDirect3DRMFace2_GetVertex(p,a,b,c) (p)->lpVtbl->GetVertex(p,a,b,c) +#define IDirect3DRMFace2_GetVertices(p,a,b,c) (p)->lpVtbl->GetVertices(p,a,b,c) +#define IDirect3DRMFace2_GetTextureCoordinates(p,a,b,c) (p)->lpVtbl->GetTextureCoordinates(p,a,b,c) +#define IDirect3DRMFace2_GetTextureTopology(p,a,b) (p)->lpVtbl->GetTextureTopology(p,a,b) +#define IDirect3DRMFace2_GetNormal(p,a) (p)->lpVtbl->GetNormal(p,a) +#define IDirect3DRMFace2_GetTexture(p,a) (p)->lpVtbl->GetTexture(p,a) +#define IDirect3DRMFace2_GetVertexCount(p) (p)->lpVtbl->GetVertexCount(p) +#define IDirect3DRMFace2_GetVertexIndex(p,a) (p)->lpVtbl->GetVertexIndex(p,a) +#define IDirect3DRMFace2_GetTextureCoordinateIndex(p,a) (p)->lpVtbl->GetTextureCoordinateIndex(p,a) +#define IDirect3DRMFace2_GetColor(p,a) (p)->lpVtbl->GetColor(p,a) +#else +/*** IUnknown methods ***/ +#define IDirect3DRMFace2_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DRMFace2_AddRef(p) (p)->AddRef() +#define IDirect3DRMFace2_Release(p) (p)->Release() +/*** IDirect3DRMObject methods ***/ +#define IDirect3DRMFace2_Clone(p,a,b,c) (p)->Clone(a,b,c) +#define IDirect3DRMFace2_AddDestroyCallback(p,a,b) (p)->AddDestroyCallback(a,b) +#define IDirect3DRMFace2_DeleteDestroyCallback(p,a,b) (p)->DeleteDestroyCallback(a,b) +#define IDirect3DRMFace2_SetAppData(p,a) (p)->SetAppData(a) +#define IDirect3DRMFace2_GetAppData(p) (p)->GetAppData() +#define IDirect3DRMFace2_SetName(p,a) (p)->SetName(a) +#define IDirect3DRMFace2_GetName(p,a,b) (p)->GetName(a,b) +#define IDirect3DRMFace2_GetClassName(p,a,b) (p)->GetClassName(a,b) +/*** IDirect3DRMFace methods ***/ +#define IDirect3DRMFace2_AddVertex(p,a,b,c) (p)->AddVertex(a,b,c) +#define IDirect3DRMFace2_AddVertexAndNormalIndexed(p,a,b) (p)->AddVertexAndNormalIndexed(a,b) +#define IDirect3DRMFace2_SetColorRGB(p,a,b,c) (p)->SetColorRGB(a,b,c) +#define IDirect3DRMFace2_SetColor(p,a) (p)->SetColor(a) +#define IDirect3DRMFace2_SetTexture(p,a) (p)->SetTexture(a) +#define IDirect3DRMFace2_SetTextureCoordinates(p,a,b,c) (p)->SetTextureCoordinates(a,b,c) +#define IDirect3DRMFace2_SetMaterial(p,a) (p)->SetMaterial(a) +#define IDirect3DRMFace2_SetTextureTopology(p,a,b) (p)->SetTextureTopology(a,b) +#define IDirect3DRMFace2_GetVertex(p,a,b,c) (p)->GetVertex(a,b,c) +#define IDirect3DRMFace2_GetVertices(p,a,b,c) (p)->GetVertices(a,b,c) +#define IDirect3DRMFace2_GetTextureCoordinates(p,a,b,c) (p)->GetTextureCoordinates(a,b,c) +#define IDirect3DRMFace2_GetTextureTopology(p,a,b) (p)->GetTextureTopology(a,b) +#define IDirect3DRMFace2_GetNormal(p,a) (p)->GetNormal(a) +#define IDirect3DRMFace2_GetTexture(p,a) (p)->GetTexture(a) +#define IDirect3DRMFace2_GetVertexCount(p) (p)->GetVertexCount() +#define IDirect3DRMFace2_GetVertexIndex(p,a) (p)->GetVertexIndex(a) +#define IDirect3DRMFace2_GetTextureCoordinateIndex(p,a) (p)->GetTextureCoordinateIndex(a) +#define IDirect3DRMFace2_GetColor(p,a) (p)->GetColor(a) +#endif + #ifdef __cplusplus }; #endif
1
0
0
0
Alexandre Julliard : include: Define some more of the NT global flag values .
by Alexandre Julliard
22 Jan '10
22 Jan '10
Module: wine Branch: master Commit: e26d2665dc43e1358a903567f51fd508ff33bfdd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e26d2665dc43e1358a903567f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jan 21 09:07:46 2010 +0100 include: Define some more of the NT global flag values. --- include/winternl.h | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/include/winternl.h b/include/winternl.h index a4dd93b..08172b0 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -1565,9 +1565,37 @@ typedef void (NTAPI *RTL_WAITORTIMERCALLBACKFUNC)(PVOID,BOOLEAN); /* FIXME: not #define SE_MAX_WELL_KNOWN_PRIVILEGE SE_CREATE_GLOBAL_PRIVILEGE /* NtGlobalFlag bits */ +#define FLG_STOP_ON_EXCEPTION 0x00000001 +#define FLG_SHOW_LDR_SNAPS 0x00000002 +#define FLG_DEBUG_INITIAL_COMMAND 0x00000004 +#define FLG_STOP_ON_HUNG_GUI 0x00000008 #define FLG_HEAP_ENABLE_TAIL_CHECK 0x00000010 #define FLG_HEAP_ENABLE_FREE_CHECK 0x00000020 +#define FLG_HEAP_VALIDATE_PARAMETERS 0x00000040 +#define FLG_HEAP_VALIDATE_ALL 0x00000080 +#define FLG_APPLICATION_VERIFIER 0x00000100 +#define FLG_POOL_ENABLE_TAGGING 0x00000400 +#define FLG_HEAP_ENABLE_TAGGING 0x00000800 +#define FLG_USER_STACK_TRACE_DB 0x00001000 +#define FLG_KERNEL_STACK_TRACE_DB 0x00002000 +#define FLG_MAINTAIN_OBJECT_TYPELIST 0x00004000 +#define FLG_HEAP_ENABLE_TAG_BY_DLL 0x00008000 +#define FLG_DISABLE_STACK_EXTENSION 0x00010000 +#define FLG_ENABLE_CSRDEBUG 0x00020000 +#define FLG_ENABLE_KDEBUG_SYMBOL_LOAD 0x00040000 +#define FLG_DISABLE_PAGE_KERNEL_STACKS 0x00080000 +#define FLG_ENABLE_SYSTEM_CRIT_BREAKS 0x00100000 #define FLG_HEAP_DISABLE_COALESCING 0x00200000 +#define FLG_ENABLE_CLOSE_EXCEPTIONS 0x00400000 +#define FLG_ENABLE_EXCEPTION_LOGGING 0x00800000 +#define FLG_ENABLE_HANDLE_TYPE_TAGGING 0x01000000 +#define FLG_HEAP_PAGE_ALLOCS 0x02000000 +#define FLG_DEBUG_INITIAL_COMMAND_EX 0x04000000 +#define FLG_DISABLE_DBGPRINT 0x08000000 +#define FLG_CRITSEC_EVENT_CREATION 0x10000000 +#define FLG_LDR_TOP_DOWN 0x20000000 +#define FLG_ENABLE_HANDLE_EXCEPTIONS 0x40000000 +#define FLG_DISABLE_PROTDLLS 0x80000000 /* Rtl*Registry* functions structs and defines */ #define RTL_REGISTRY_ABSOLUTE 0
1
0
0
0
Piotr Caban : shlwapi: Improved res protocol handling in UrlCanonicalizeW.
by Alexandre Julliard
22 Jan '10
22 Jan '10
Module: wine Branch: master Commit: 190645e5c58edbfb4baf59f97a6b537bfacf7644 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=190645e5c58edbfb4baf59f97…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Jan 21 01:03:25 2010 +0100 shlwapi: Improved res protocol handling in UrlCanonicalizeW. --- dlls/shlwapi/tests/url.c | 23 ++++++++++++++--------- dlls/shlwapi/url.c | 39 ++++++++++++++++++++++++++++++--------- 2 files changed, 44 insertions(+), 18 deletions(-) diff --git a/dlls/shlwapi/tests/url.c b/dlls/shlwapi/tests/url.c index ab3d0b6..b69ab00 100644 --- a/dlls/shlwapi/tests/url.c +++ b/dlls/shlwapi/tests/url.c @@ -122,16 +122,22 @@ static const TEST_URL_CANONICALIZE TEST_CANONICALIZE[] = { {"c:dir\\file", 0, S_OK, "file:///c:dir/file", FALSE}, {"c:\\tests\\foo bar", URL_FILE_USE_PATHURL, S_OK, "file://c:\\tests\\foo bar", FALSE}, {"c:\\tests\\foo bar", 0, S_OK, "file:///c:/tests/foo%20bar", FALSE}, + {"res://file", 0, S_OK, "res://file/", FALSE}, + {"res://file", URL_FILE_USE_PATHURL, S_OK, "res://file/", FALSE}, {"res:///c:/tests/foo%20bar", URL_UNESCAPE , S_OK, "res:///c:/tests/foo bar", FALSE}, - {"res:///c:/tests\\foo%20bar", URL_UNESCAPE , S_OK, "res:///c:/tests\\foo bar", TRUE}, + {"res:///c:/tests\\foo%20bar", URL_UNESCAPE , S_OK, "res:///c:/tests\\foo bar", FALSE}, {"res:///c:/tests/foo%20bar", 0, S_OK, "res:///c:/tests/foo%20bar", FALSE}, - {"res:///c:/tests/foo%20bar", URL_FILE_USE_PATHURL, S_OK, "res:///c:/tests/foo%20bar", TRUE}, - {"res://c:/tests/../tests/foo%20bar", URL_FILE_USE_PATHURL, S_OK, "res://c:/tests/foo%20bar", TRUE}, - {"res://c:/tests\\../tests/foo%20bar", URL_FILE_USE_PATHURL, S_OK, "res://c:/tests/foo%20bar", TRUE}, - {"res://c:/tests/foo%20bar", URL_FILE_USE_PATHURL, S_OK, "res://c:/tests/foo%20bar", TRUE}, - {"res:///c://tests/foo%20bar", URL_FILE_USE_PATHURL, S_OK, "res:///c://tests/foo%20bar", TRUE}, - {"res:///c:\\tests\\foo bar", 0, S_OK, "res:///c:\\tests\\foo bar", TRUE}, - {"res:///c:\\tests\\foo bar", URL_DONT_SIMPLIFY, S_OK, "res:///c:\\tests\\foo bar", TRUE}, + {"res:///c:/tests/foo%20bar", URL_FILE_USE_PATHURL, S_OK, "res:///c:/tests/foo%20bar", FALSE}, + {"res://c:/tests/../tests/foo%20bar", URL_FILE_USE_PATHURL, S_OK, "res://c:/tests/foo%20bar", FALSE}, + {"res://c:/tests\\../tests/foo%20bar", URL_FILE_USE_PATHURL, S_OK, "res://c:/tests/foo%20bar", FALSE}, + {"res://c:/tests/foo%20bar", URL_FILE_USE_PATHURL, S_OK, "res://c:/tests/foo%20bar", FALSE}, + {"res:///c://tests/foo%20bar", URL_FILE_USE_PATHURL, S_OK, "res:///c://tests/foo%20bar", FALSE}, + {"res:///c:\\tests\\foo bar", 0, S_OK, "res:///c:\\tests\\foo bar", FALSE}, + {"res:///c:\\tests\\foo bar", URL_DONT_SIMPLIFY, S_OK, "res:///c:\\tests\\foo bar", FALSE}, + {"res://c:\\tests\\foo bar/res", URL_FILE_USE_PATHURL, S_OK, "res://c:\\tests\\foo bar/res", FALSE}, + {"res://c:\\tests/res\\foo%20bar/strange\\sth", 0, S_OK, "res://c:\\tests/res\\foo%20bar/strange\\sth", FALSE}, + {"res://c:\\tests/res\\foo%20bar/strange\\sth", URL_FILE_USE_PATHURL, S_OK, "res://c:\\tests/res\\foo%20bar/strange\\sth", FALSE}, + {"res://c:\\tests/res\\foo%20bar/strange\\sth", URL_UNESCAPE, S_OK, "res://c:\\tests/res\\foo bar/strange\\sth", FALSE}, {"A", 0, S_OK, "A", FALSE}, {"/uri-res/N2R?urn:sha1:B3K", URL_DONT_ESCAPE_EXTRA_INFO | URL_WININET_COMPATIBILITY /*0x82000000*/, S_OK, "/uri-res/N2R?urn:sha1:B3K", FALSE} /*LimeWire online installer calls this*/, {"http:www.winehq.org/dir/../index.html", 0, S_OK, "http:www.winehq.org/index.html"}, @@ -1096,5 +1102,4 @@ START_TEST(url) test_UrlIs(); test_UrlUnescape(); test_ParseURL(); - } diff --git a/dlls/shlwapi/url.c b/dlls/shlwapi/url.c index 544b529..d1b6e26 100644 --- a/dlls/shlwapi/url.c +++ b/dlls/shlwapi/url.c @@ -283,6 +283,7 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized, WCHAR slash = '/'; static const WCHAR wszFile[] = {'f','i','l','e',':'}; + static const WCHAR wszRes[] = {'r','e','s',':'}; static const WCHAR wszLocalhost[] = {'l','o','c','a','l','h','o','s','t'}; TRACE("(%s, %p, %p, 0x%08x) *pcchCanonicalized: %d\n", debugstr_w(pszUrl), pszCanonicalized, @@ -304,6 +305,11 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized, && !memcmp(wszFile, pszUrl, sizeof(wszFile))) slash = '\\'; + if(nByteLen >= sizeof(wszRes) && !memcmp(wszRes, pszUrl, sizeof(wszRes))) { + dwFlags &= ~URL_FILE_USE_PATHURL; + slash = '\0'; + } + /* * state = * 0 initial 1,3 @@ -368,10 +374,12 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized, wk1 += nWkLen; wk2 += nWkLen; - while(mp < wk2) { - if(*mp == '/' || *mp == '\\') - *mp = slash; - mp++; + if(slash) { + while(mp < wk2) { + if(*mp == '/' || *mp == '\\') + *mp = slash; + mp++; + } } break; case 4: @@ -380,13 +388,20 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized, while(isalnumW(*wk1) || (*wk1 == '-') || (*wk1 == '.') || (*wk1 == ':')) *wk2++ = *wk1++; state = 5; - if (!*wk1) - *wk2++ = slash; + if (!*wk1) { + if(slash) + *wk2++ = slash; + else + *wk2++ = '/'; + } break; case 5: if (*wk1 != '/' && *wk1 != '\\') {state = 3; break;} while(*wk1 == '/' || *wk1 == '\\') { - *wk2++ = slash; + if(slash) + *wk2++ = slash; + else + *wk2++ = *wk1; wk1++; } state = 6; @@ -419,7 +434,10 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized, wk2 += nLen; wk1 += nLen; } - *wk2++ = slash; + if(slash) + *wk2++ = slash; + else + *wk2++ = *wk1; wk1++; if (*wk1 == '.') { @@ -436,7 +454,10 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized, /* case /../ -> need to backup wk2 */ TRACE("found '/../'\n"); *(wk2-1) = '\0'; /* set end of string */ - mp = strrchrW(root, slash); + mp = strrchrW(root, '/'); + mp2 = strrchrW(root, '\\'); + if(mp2 && (!mp || mp2 < mp)) + mp = mp2; if (mp && (mp >= root)) { /* found valid backup point */ wk2 = mp + 1;
1
0
0
0
Nikolay Sivov : msxml3/tests: Fix interface leak.
by Alexandre Julliard
22 Jan '10
22 Jan '10
Module: wine Branch: master Commit: 97c2a25472784b79a3bb4e5bbeb68800800c5e20 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=97c2a25472784b79a3bb4e5bb…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Thu Jan 21 02:24:29 2010 +0300 msxml3/tests: Fix interface leak. --- dlls/msxml3/tests/xmldoc.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/msxml3/tests/xmldoc.c b/dlls/msxml3/tests/xmldoc.c index aadf088..bc7422d 100644 --- a/dlls/msxml3/tests/xmldoc.c +++ b/dlls/msxml3/tests/xmldoc.c @@ -433,6 +433,7 @@ static void test_persiststreaminit(void) hr = IXMLDocument_get_root(doc, &element); ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); hr = IXMLElement_put_text(element, str); + IXMLElement_Release(element); SysFreeString(str); hr = IPersistStreamInit_IsDirty(psi);
1
0
0
0
Julius Schwartzenberg : avifil32: Use chunksize specified by the chunk itself, avoids a noticable ticking sound heard when reading past the chunk boundary .
by Alexandre Julliard
22 Jan '10
22 Jan '10
Module: wine Branch: master Commit: 7401af64e9a51bfe3fe6996e8d66f9c7fbfad47e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7401af64e9a51bfe3fe6996e8…
Author: Julius Schwartzenberg <julius.schwartzenberg(a)gmail.com> Date: Wed Jan 20 22:57:27 2010 +0100 avifil32: Use chunksize specified by the chunk itself, avoids a noticable ticking sound heard when reading past the chunk boundary. --- dlls/avifil32/avifile.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/dlls/avifil32/avifile.c b/dlls/avifil32/avifile.c index e627196..702ba1c 100644 --- a/dlls/avifil32/avifile.c +++ b/dlls/avifil32/avifile.c @@ -1103,6 +1103,7 @@ static HRESULT WINAPI IAVIStream_fnRead(IAVIStream *iface, LONG start, samples *= This->sInfo.dwSampleSize; while (samples > 0 && buffersize > 0) { + LONG blocksize; if (block != This->dwCurrentFrame) { hr = AVIFILE_ReadBlock(This, block, NULL, 0); if (FAILED(hr)) @@ -1110,7 +1111,9 @@ static HRESULT WINAPI IAVIStream_fnRead(IAVIStream *iface, LONG start, } size = min((DWORD)samples, (DWORD)buffersize); - size = min(size, This->cbBuffer - offset); + blocksize = This->lpBuffer[1]; + TRACE("blocksize = %u\n",blocksize); + size = min(size, blocksize - offset); memcpy(buffer, ((BYTE*)&This->lpBuffer[2]) + offset, size); block++;
1
0
0
0
Andrew Eikum : wininet: Implement PER_CONN_FLAGS option.
by Alexandre Julliard
22 Jan '10
22 Jan '10
Module: wine Branch: master Commit: b0ad0b9c0bb7cb1c413744cc720df3f03467603b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b0ad0b9c0bb7cb1c413744cc7…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Wed Jan 20 14:49:13 2010 -0600 wininet: Implement PER_CONN_FLAGS option. --- dlls/wininet/internet.c | 13 ++++++++++++ dlls/wininet/tests/internet.c | 42 +++++++++++++++++++++++++++------------- 2 files changed, 41 insertions(+), 14 deletions(-) diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 842168d..78a0c4f 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -2518,6 +2518,19 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption, break; case INTERNET_PER_CONN_FLAGS: + switch(option->Value.dwValue) { + case PROXY_TYPE_PROXY: + pi.dwProxyEnabled = 1; + break; + case PROXY_TYPE_DIRECT: + pi.dwProxyEnabled = 0; + break; + default: + FIXME("Unhandled flag: %d\n", option->Value.dwValue); + break; + } + break; + case INTERNET_PER_CONN_AUTOCONFIG_URL: case INTERNET_PER_CONN_AUTODISCOVERY_FLAGS: case INTERNET_PER_CONN_AUTOCONFIG_SECONDARY_URL: diff --git a/dlls/wininet/tests/internet.c b/dlls/wininet/tests/internet.c index 2dc1fd9..8fd251a 100644 --- a/dlls/wininet/tests/internet.c +++ b/dlls/wininet/tests/internet.c @@ -857,10 +857,11 @@ static void test_Option_PerConnectionOption(void) static WCHAR proxy_srvW[] = {'p','r','o','x','y','.','e','x','a','m','p','l','e',0}; /* get the global IE proxy server info, to restore later */ - list.dwOptionCount = 1; - list.pOptions = HeapAlloc(GetProcessHeap(), 0, sizeof(INTERNET_PER_CONN_OPTIONW)); + list.dwOptionCount = 2; + list.pOptions = HeapAlloc(GetProcessHeap(), 0, 2 * sizeof(INTERNET_PER_CONN_OPTIONW)); list.pOptions[0].dwOption = INTERNET_PER_CONN_PROXY_SERVER; + list.pOptions[1].dwOption = INTERNET_PER_CONN_FLAGS; ret = InternetQueryOptionW(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION, &list, &size); @@ -868,11 +869,13 @@ static void test_Option_PerConnectionOption(void) orig_settings = list.pOptions; /* set the global IE proxy server */ - list.dwOptionCount = 1; - list.pOptions = HeapAlloc(GetProcessHeap(), 0, sizeof(INTERNET_PER_CONN_OPTIONW)); + list.dwOptionCount = 2; + list.pOptions = HeapAlloc(GetProcessHeap(), 0, 2 * sizeof(INTERNET_PER_CONN_OPTIONW)); list.pOptions[0].dwOption = INTERNET_PER_CONN_PROXY_SERVER; list.pOptions[0].Value.pszValue = proxy_srvW; + list.pOptions[1].dwOption = INTERNET_PER_CONN_FLAGS; + list.pOptions[1].Value.dwValue = PROXY_TYPE_PROXY; ret = InternetSetOptionW(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION, &list, size); @@ -881,11 +884,12 @@ static void test_Option_PerConnectionOption(void) HeapFree(GetProcessHeap(), 0, list.pOptions); /* get & verify the global IE proxy server */ - list.dwOptionCount = 1; + list.dwOptionCount = 2; list.dwOptionError = 0; - list.pOptions = HeapAlloc(GetProcessHeap(), 0, sizeof(INTERNET_PER_CONN_OPTIONW)); + list.pOptions = HeapAlloc(GetProcessHeap(), 0, 2 * sizeof(INTERNET_PER_CONN_OPTIONW)); list.pOptions[0].dwOption = INTERNET_PER_CONN_PROXY_SERVER; + list.pOptions[1].dwOption = INTERNET_PER_CONN_FLAGS; ret = InternetQueryOptionW(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION, &list, &size); @@ -893,11 +897,14 @@ static void test_Option_PerConnectionOption(void) ok(!lstrcmpW(list.pOptions[0].Value.pszValue, proxy_srvW), "Retrieved proxy server should've been %s, was: %s\n", wine_dbgstr_w(proxy_srvW), wine_dbgstr_w(list.pOptions[0].Value.pszValue)); + ok(list.pOptions[1].Value.dwValue == PROXY_TYPE_PROXY, + "Retrieved flags should've been PROXY_TYPE_PROXY, was: %d\n", + list.pOptions[1].Value.dwValue); HeapFree(GetProcessHeap(), 0, list.pOptions); /* restore original settings */ - list.dwOptionCount = 1; + list.dwOptionCount = 2; list.pOptions = orig_settings; ret = InternetSetOptionW(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION, @@ -916,10 +923,11 @@ static void test_Option_PerConnectionOptionA(void) char proxy_srv[] = "proxy.example"; /* get the global IE proxy server info, to restore later */ - list.dwOptionCount = 1; - list.pOptions = HeapAlloc(GetProcessHeap(), 0, sizeof(INTERNET_PER_CONN_OPTIONA)); + list.dwOptionCount = 2; + list.pOptions = HeapAlloc(GetProcessHeap(), 0, 2 * sizeof(INTERNET_PER_CONN_OPTIONA)); list.pOptions[0].dwOption = INTERNET_PER_CONN_PROXY_SERVER; + list.pOptions[1].dwOption = INTERNET_PER_CONN_FLAGS; ret = InternetQueryOptionA(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION, &list, &size); @@ -927,11 +935,13 @@ static void test_Option_PerConnectionOptionA(void) orig_settings = list.pOptions; /* set the global IE proxy server */ - list.dwOptionCount = 1; - list.pOptions = HeapAlloc(GetProcessHeap(), 0, sizeof(INTERNET_PER_CONN_OPTIONA)); + list.dwOptionCount = 2; + list.pOptions = HeapAlloc(GetProcessHeap(), 0, 2 * sizeof(INTERNET_PER_CONN_OPTIONA)); list.pOptions[0].dwOption = INTERNET_PER_CONN_PROXY_SERVER; list.pOptions[0].Value.pszValue = proxy_srv; + list.pOptions[1].dwOption = INTERNET_PER_CONN_FLAGS; + list.pOptions[1].Value.dwValue = PROXY_TYPE_PROXY; ret = InternetSetOptionA(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION, &list, size); @@ -940,11 +950,12 @@ static void test_Option_PerConnectionOptionA(void) HeapFree(GetProcessHeap(), 0, list.pOptions); /* get & verify the global IE proxy server */ - list.dwOptionCount = 1; + list.dwOptionCount = 2; list.dwOptionError = 0; - list.pOptions = HeapAlloc(GetProcessHeap(), 0, sizeof(INTERNET_PER_CONN_OPTIONA)); + list.pOptions = HeapAlloc(GetProcessHeap(), 0, 2 * sizeof(INTERNET_PER_CONN_OPTIONA)); list.pOptions[0].dwOption = INTERNET_PER_CONN_PROXY_SERVER; + list.pOptions[1].dwOption = INTERNET_PER_CONN_FLAGS; ret = InternetQueryOptionA(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION, &list, &size); @@ -952,11 +963,14 @@ static void test_Option_PerConnectionOptionA(void) ok(!lstrcmpA(list.pOptions[0].Value.pszValue, "proxy.example"), "Retrieved proxy server should've been \"%s\", was: \"%s\"\n", proxy_srv, list.pOptions[0].Value.pszValue); + ok(list.pOptions[1].Value.dwValue == PROXY_TYPE_PROXY, + "Retrieved flags should've been PROXY_TYPE_PROXY, was: %d\n", + list.pOptions[1].Value.dwValue); HeapFree(GetProcessHeap(), 0, list.pOptions); /* restore original settings */ - list.dwOptionCount = 1; + list.dwOptionCount = 2; list.pOptions = orig_settings; ret = InternetSetOptionA(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION,
1
0
0
0
Andrew Eikum : wininet: Implement PER_CONN_PROXY_SERVER option.
by Alexandre Julliard
22 Jan '10
22 Jan '10
Module: wine Branch: master Commit: c3af903ffbbfaf573049a9c96375bba075f68193 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c3af903ffbbfaf573049a9c96…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Wed Jan 20 14:49:05 2010 -0600 wininet: Implement PER_CONN_PROXY_SERVER option. --- dlls/wininet/internet.c | 85 +++++++++++++++++++++++++++++ dlls/wininet/tests/internet.c | 119 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 204 insertions(+), 0 deletions(-) diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 2ee3201..842168d 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -319,6 +319,48 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) return TRUE; } +/*********************************************************************** + * INTERNET_SaveProxySettings + * + * Stores the proxy settings given by lpwai into the registry + * + * RETURNS + * ERROR_SUCCESS if no error, or error code on fail + */ +static LONG INTERNET_SaveProxySettings( proxyinfo_t *lpwpi ) +{ + HKEY key; + LONG ret; + + if ((ret = RegOpenKeyW( HKEY_CURRENT_USER, szInternetSettings, &key ))) + return ret; + + if ((ret = RegSetValueExW( key, szProxyEnable, 0, REG_DWORD, (BYTE*)&lpwpi->dwProxyEnabled, sizeof(DWORD)))) + { + RegCloseKey( key ); + return ret; + } + + if (lpwpi->lpszProxyServer) + { + if ((ret = RegSetValueExW( key, szProxyServer, 0, REG_SZ, (BYTE*)lpwpi->lpszProxyServer, sizeof(WCHAR) * (lstrlenW(lpwpi->lpszProxyServer) + 1)))) + { + RegCloseKey( key ); + return ret; + } + } + else + { + if ((ret = RegDeleteValueW( key, szProxyServer ))) + { + RegCloseKey( key ); + return ret; + } + } + + RegCloseKey(key); + return ERROR_SUCCESS; +} /*********************************************************************** * InternetInitializeAutoProxyDll (WININET.@) @@ -2458,6 +2500,49 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption, SetLastError(ERROR_INVALID_PARAMETER); ret = FALSE; break; + case INTERNET_OPTION_PER_CONNECTION_OPTION: { + INTERNET_PER_CONN_OPTION_LISTW *con = lpBuffer; + LONG res; + int i; + proxyinfo_t pi; + + INTERNET_LoadProxySettings(&pi); + + for (i = 0; i < con->dwOptionCount; i++) { + INTERNET_PER_CONN_OPTIONW *option = con->pOptions + i; + + switch (option->dwOption) { + case INTERNET_PER_CONN_PROXY_SERVER: + HeapFree(GetProcessHeap(), 0, pi.lpszProxyServer); + pi.lpszProxyServer = heap_strdupW(option->Value.pszValue); + break; + + case INTERNET_PER_CONN_FLAGS: + case INTERNET_PER_CONN_AUTOCONFIG_URL: + case INTERNET_PER_CONN_AUTODISCOVERY_FLAGS: + case INTERNET_PER_CONN_AUTOCONFIG_SECONDARY_URL: + case INTERNET_PER_CONN_AUTOCONFIG_RELOAD_DELAY_MINS: + case INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_TIME: + case INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_URL: + case INTERNET_PER_CONN_PROXY_BYPASS: + FIXME("Unhandled dwOption %d\n", option->dwOption); + break; + + default: + FIXME("Unknown dwOption %d\n", option->dwOption); + SetLastError(ERROR_INVALID_PARAMETER); + break; + } + } + + if ((res = INTERNET_SaveProxySettings(&pi))) + SetLastError(res); + + FreeProxyInfo(&pi); + + ret = (res == ERROR_SUCCESS); + break; + } default: FIXME("Option %d STUB\n",dwOption); SetLastError(ERROR_INTERNET_INVALID_OPTION); diff --git a/dlls/wininet/tests/internet.c b/dlls/wininet/tests/internet.c index 8708878..2dc1fd9 100644 --- a/dlls/wininet/tests/internet.c +++ b/dlls/wininet/tests/internet.c @@ -848,6 +848,123 @@ static void test_Option_Policy(void) ok(ret == TRUE, "InternetCloseHandle failed: 0x%08x\n", GetLastError()); } +static void test_Option_PerConnectionOption(void) +{ + BOOL ret; + DWORD size = sizeof(INTERNET_PER_CONN_OPTION_LISTW); + INTERNET_PER_CONN_OPTION_LISTW list = {size}; + INTERNET_PER_CONN_OPTIONW *orig_settings; + static WCHAR proxy_srvW[] = {'p','r','o','x','y','.','e','x','a','m','p','l','e',0}; + + /* get the global IE proxy server info, to restore later */ + list.dwOptionCount = 1; + list.pOptions = HeapAlloc(GetProcessHeap(), 0, sizeof(INTERNET_PER_CONN_OPTIONW)); + + list.pOptions[0].dwOption = INTERNET_PER_CONN_PROXY_SERVER; + + ret = InternetQueryOptionW(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION, + &list, &size); + ok(ret == TRUE, "InternetQueryOption should've succeeded\n"); + orig_settings = list.pOptions; + + /* set the global IE proxy server */ + list.dwOptionCount = 1; + list.pOptions = HeapAlloc(GetProcessHeap(), 0, sizeof(INTERNET_PER_CONN_OPTIONW)); + + list.pOptions[0].dwOption = INTERNET_PER_CONN_PROXY_SERVER; + list.pOptions[0].Value.pszValue = proxy_srvW; + + ret = InternetSetOptionW(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION, + &list, size); + ok(ret == TRUE, "InternetSetOption should've succeeded\n"); + + HeapFree(GetProcessHeap(), 0, list.pOptions); + + /* get & verify the global IE proxy server */ + list.dwOptionCount = 1; + list.dwOptionError = 0; + list.pOptions = HeapAlloc(GetProcessHeap(), 0, sizeof(INTERNET_PER_CONN_OPTIONW)); + + list.pOptions[0].dwOption = INTERNET_PER_CONN_PROXY_SERVER; + + ret = InternetQueryOptionW(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION, + &list, &size); + ok(ret == TRUE, "InternetQueryOption should've succeeded\n"); + ok(!lstrcmpW(list.pOptions[0].Value.pszValue, proxy_srvW), + "Retrieved proxy server should've been %s, was: %s\n", + wine_dbgstr_w(proxy_srvW), wine_dbgstr_w(list.pOptions[0].Value.pszValue)); + + HeapFree(GetProcessHeap(), 0, list.pOptions); + + /* restore original settings */ + list.dwOptionCount = 1; + list.pOptions = orig_settings; + + ret = InternetSetOptionW(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION, + &list, size); + ok(ret == TRUE, "InternetSetOption should've succeeded\n"); + + HeapFree(GetProcessHeap(), 0, list.pOptions); +} + +static void test_Option_PerConnectionOptionA(void) +{ + BOOL ret; + DWORD size = sizeof(INTERNET_PER_CONN_OPTION_LISTA); + INTERNET_PER_CONN_OPTION_LISTA list = {size}; + INTERNET_PER_CONN_OPTIONA *orig_settings; + char proxy_srv[] = "proxy.example"; + + /* get the global IE proxy server info, to restore later */ + list.dwOptionCount = 1; + list.pOptions = HeapAlloc(GetProcessHeap(), 0, sizeof(INTERNET_PER_CONN_OPTIONA)); + + list.pOptions[0].dwOption = INTERNET_PER_CONN_PROXY_SERVER; + + ret = InternetQueryOptionA(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION, + &list, &size); + ok(ret == TRUE, "InternetQueryOption should've succeeded\n"); + orig_settings = list.pOptions; + + /* set the global IE proxy server */ + list.dwOptionCount = 1; + list.pOptions = HeapAlloc(GetProcessHeap(), 0, sizeof(INTERNET_PER_CONN_OPTIONA)); + + list.pOptions[0].dwOption = INTERNET_PER_CONN_PROXY_SERVER; + list.pOptions[0].Value.pszValue = proxy_srv; + + ret = InternetSetOptionA(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION, + &list, size); + ok(ret == TRUE, "InternetSetOption should've succeeded\n"); + + HeapFree(GetProcessHeap(), 0, list.pOptions); + + /* get & verify the global IE proxy server */ + list.dwOptionCount = 1; + list.dwOptionError = 0; + list.pOptions = HeapAlloc(GetProcessHeap(), 0, sizeof(INTERNET_PER_CONN_OPTIONA)); + + list.pOptions[0].dwOption = INTERNET_PER_CONN_PROXY_SERVER; + + ret = InternetQueryOptionA(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION, + &list, &size); + ok(ret == TRUE, "InternetQueryOption should've succeeded\n"); + ok(!lstrcmpA(list.pOptions[0].Value.pszValue, "proxy.example"), + "Retrieved proxy server should've been \"%s\", was: \"%s\"\n", + proxy_srv, list.pOptions[0].Value.pszValue); + + HeapFree(GetProcessHeap(), 0, list.pOptions); + + /* restore original settings */ + list.dwOptionCount = 1; + list.pOptions = orig_settings; + + ret = InternetSetOptionA(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION, + &list, size); + ok(ret == TRUE, "InternetSetOption should've succeeded\n"); + + HeapFree(GetProcessHeap(), 0, list.pOptions); +} /* ############################### */ @@ -872,6 +989,8 @@ START_TEST(internet) test_version(); test_null(); test_Option_Policy(); + test_Option_PerConnectionOption(); + test_Option_PerConnectionOptionA(); if (!pInternetTimeFromSystemTimeA) win_skip("skipping the InternetTime tests\n");
1
0
0
0
Andrew Eikum : wininet: Pull proxy info gathering into its own function.
by Alexandre Julliard
22 Jan '10
22 Jan '10
Module: wine Branch: master Commit: 7f3cbed8ffdabca3bf95d3d400301e730ee04c24 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7f3cbed8ffdabca3bf95d3d40…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Wed Jan 20 14:48:55 2010 -0600 wininet: Pull proxy info gathering into its own function. --- dlls/wininet/internet.c | 131 ++++++++++++++++++++++++++++++++-------------- 1 files changed, 91 insertions(+), 40 deletions(-) diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 0580994..2ee3201 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -105,6 +105,20 @@ static object_header_t **WININET_Handles; static UINT WININET_dwNextHandle; static UINT WININET_dwMaxHandles; +typedef struct +{ + DWORD dwProxyEnabled; + LPWSTR lpszProxyServer; + LPWSTR lpszProxyBypass; +} proxyinfo_t; + +static const WCHAR szInternetSettings[] = + { 'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\', + 'W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', + 'I','n','t','e','r','n','e','t',' ','S','e','t','t','i','n','g','s',0 }; +static const WCHAR szProxyServer[] = { 'P','r','o','x','y','S','e','r','v','e','r', 0 }; +static const WCHAR szProxyEnable[] = { 'P','r','o','x','y','E','n','a','b','l','e', 0 }; + HINTERNET WININET_AllocHandle( object_header_t *info ) { object_header_t **p; @@ -342,33 +356,45 @@ BOOL WINAPI DetectAutoProxyUrl(LPSTR lpszAutoProxyUrl, return FALSE; } +static void FreeProxyInfo( proxyinfo_t *lpwpi ) +{ + HeapFree(GetProcessHeap(), 0, lpwpi->lpszProxyServer); + HeapFree(GetProcessHeap(), 0, lpwpi->lpszProxyBypass); +} /*********************************************************************** - * INTERNET_ConfigureProxy + * INTERNET_LoadProxySettings + * + * Loads proxy information from the registry or environment into lpwpi. + * + * The caller should call FreeProxyInfo when done with lpwpi. * * FIXME: * The proxy may be specified in the form 'http=proxy.my.org' * Presumably that means there can be
ftp=ftpproxy.my.org
too. */ -static BOOL INTERNET_ConfigureProxy( appinfo_t *lpwai ) +static LONG INTERNET_LoadProxySettings( proxyinfo_t *lpwpi ) { HKEY key; - DWORD type, len, enabled = 0; + DWORD type, len; LPCSTR envproxy; - static const WCHAR szInternetSettings[] = - { 'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\', - 'W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', - 'I','n','t','e','r','n','e','t',' ','S','e','t','t','i','n','g','s',0 }; - static const WCHAR szProxyServer[] = { 'P','r','o','x','y','S','e','r','v','e','r', 0 }; - static const WCHAR szProxyEnable[] = { 'P','r','o','x','y','E','n','a','b','l','e', 0 }; + LONG ret; - if (RegOpenKeyW( HKEY_CURRENT_USER, szInternetSettings, &key )) return FALSE; + if ((ret = RegOpenKeyW( HKEY_CURRENT_USER, szInternetSettings, &key ))) + return ret; - len = sizeof enabled; - if (RegQueryValueExW( key, szProxyEnable, NULL, &type, (BYTE *)&enabled, &len ) || type != REG_DWORD) - RegSetValueExW( key, szProxyEnable, 0, REG_DWORD, (BYTE *)&enabled, sizeof(REG_DWORD) ); + len = sizeof(DWORD); + if (RegQueryValueExW( key, szProxyEnable, NULL, &type, (BYTE *)&lpwpi->dwProxyEnabled, &len ) || type != REG_DWORD) + { + lpwpi->dwProxyEnabled = 0; + if((ret = RegSetValueExW( key, szProxyEnable, 0, REG_DWORD, (BYTE *)&lpwpi->dwProxyEnabled, sizeof(DWORD) ))) + { + RegCloseKey( key ); + return ret; + } + } - if (enabled) + if (!(envproxy = getenv( "http_proxy" )) || lpwpi->dwProxyEnabled) { TRACE("Proxy is enabled.\n"); @@ -381,7 +407,7 @@ static BOOL INTERNET_ConfigureProxy( appinfo_t *lpwai ) if (!(szProxy = HeapAlloc( GetProcessHeap(), 0, len ))) { RegCloseKey( key ); - return FALSE; + return ERROR_OUTOFMEMORY; } RegQueryValueExW( key, szProxyServer, NULL, &type, (BYTE*)szProxy, &len ); @@ -395,35 +421,56 @@ static BOOL INTERNET_ConfigureProxy( appinfo_t *lpwai ) p = strchrW( szProxy, ' ' ); if (p) *p = 0; - lpwai->dwAccessType = INTERNET_OPEN_TYPE_PROXY; - lpwai->lpszProxy = szProxy; + lpwpi->lpszProxyServer = szProxy; - TRACE("http proxy = %s\n", debugstr_w(lpwai->lpszProxy)); + TRACE("http proxy = %s\n", debugstr_w(lpwpi->lpszProxyServer)); } else - ERR("Couldn't read proxy server settings from registry.\n"); + { + TRACE("No proxy server settings in registry.\n"); + lpwpi->lpszProxyServer = NULL; + } } - else if ((envproxy = getenv( "http_proxy" ))) + else if (envproxy) { WCHAR *envproxyW; len = MultiByteToWideChar( CP_UNIXCP, 0, envproxy, -1, NULL, 0 ); - if (!(envproxyW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR)))) return FALSE; + if (!(envproxyW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR)))) + return ERROR_OUTOFMEMORY; MultiByteToWideChar( CP_UNIXCP, 0, envproxy, -1, envproxyW, len ); - lpwai->dwAccessType = INTERNET_OPEN_TYPE_PROXY; - lpwai->lpszProxy = envproxyW; + lpwpi->dwProxyEnabled = 1; + lpwpi->lpszProxyServer = envproxyW; - TRACE("http proxy (from environment) = %s\n", debugstr_w(lpwai->lpszProxy)); - enabled = 1; + TRACE("http proxy (from environment) = %s\n", debugstr_w(lpwpi->lpszProxyServer)); } - if (!enabled) + RegCloseKey( key ); + + lpwpi->lpszProxyBypass = NULL; + + return ERROR_SUCCESS; +} + +/*********************************************************************** + * INTERNET_ConfigureProxy + */ +static BOOL INTERNET_ConfigureProxy( appinfo_t *lpwai ) +{ + proxyinfo_t wpi; + + if (INTERNET_LoadProxySettings( &wpi )) + return FALSE; + + if (wpi.dwProxyEnabled) { - TRACE("Proxy is not enabled.\n"); - lpwai->dwAccessType = INTERNET_OPEN_TYPE_DIRECT; + lpwai->dwAccessType = INTERNET_OPEN_TYPE_PROXY; + lpwai->lpszProxy = wpi.lpszProxyServer; + return TRUE; } - RegCloseKey( key ); - return (enabled > 0); + + lpwai->dwAccessType = INTERNET_OPEN_TYPE_DIRECT; + return FALSE; } /*********************************************************************** @@ -2112,16 +2159,17 @@ DWORD INET_QueryOption(DWORD option, void *buffer, DWORD *size, BOOL unicode) INTERNET_PER_CONN_OPTION_LISTW *con = buffer; INTERNET_PER_CONN_OPTION_LISTA *conA = buffer; DWORD res = ERROR_SUCCESS, i; - appinfo_t ai; + proxyinfo_t pi; + LONG ret; TRACE("Getting global proxy info\n"); - memset(&ai, 0, sizeof(appinfo_t)); - INTERNET_ConfigureProxy(&ai); + if((ret = INTERNET_LoadProxySettings(&pi))) + return ret; FIXME("INTERNET_OPTION_PER_CONNECTION_OPTION stub\n"); if (*size < sizeof(INTERNET_PER_CONN_OPTION_LISTW)) { - APPINFO_Destroy(&ai.hdr); + FreeProxyInfo(&pi); return ERROR_INSUFFICIENT_BUFFER; } @@ -2131,21 +2179,24 @@ DWORD INET_QueryOption(DWORD option, void *buffer, DWORD *size, BOOL unicode) switch (option->dwOption) { case INTERNET_PER_CONN_FLAGS: - option->Value.dwValue = ai.dwAccessType; + if(pi.dwProxyEnabled) + option->Value.dwValue = PROXY_TYPE_PROXY; + else + option->Value.dwValue = PROXY_TYPE_DIRECT; break; case INTERNET_PER_CONN_PROXY_SERVER: if (unicode) - option->Value.pszValue = heap_strdupW(ai.lpszProxy); + option->Value.pszValue = heap_strdupW(pi.lpszProxyServer); else - optionA->Value.pszValue = heap_strdupWtoA(ai.lpszProxy); + optionA->Value.pszValue = heap_strdupWtoA(pi.lpszProxyServer); break; case INTERNET_PER_CONN_PROXY_BYPASS: if (unicode) - option->Value.pszValue = heap_strdupW(ai.lpszProxyBypass); + option->Value.pszValue = heap_strdupW(pi.lpszProxyBypass); else - optionA->Value.pszValue = heap_strdupWtoA(ai.lpszProxyBypass); + optionA->Value.pszValue = heap_strdupWtoA(pi.lpszProxyBypass); break; case INTERNET_PER_CONN_AUTOCONFIG_URL: @@ -2164,7 +2215,7 @@ DWORD INET_QueryOption(DWORD option, void *buffer, DWORD *size, BOOL unicode) break; } } - APPINFO_Destroy(&ai.hdr); + FreeProxyInfo(&pi); return res; }
1
0
0
0
Andrew Eikum : wininet: Convert PER_CONN_OPTION_LIST from A to W in InternetSetOptionA.
by Alexandre Julliard
22 Jan '10
22 Jan '10
Module: wine Branch: master Commit: 60bb3f8ec2ea8d782c0522981ef126e286f2a8d7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=60bb3f8ec2ea8d782c0522981…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Wed Jan 20 14:48:47 2010 -0600 wininet: Convert PER_CONN_OPTION_LIST from A to W in InternetSetOptionA. --- dlls/wininet/internet.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 79 insertions(+), 0 deletions(-) diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 074bf79..0580994 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -2483,6 +2483,63 @@ BOOL WINAPI InternetSetOptionA(HINTERNET hInternet, DWORD dwOption, MultiByteToWideChar( CP_ACP, 0, lpBuffer, dwBufferLength, wbuffer, wlen ); break; + case INTERNET_OPTION_PER_CONNECTION_OPTION: { + int i; + INTERNET_PER_CONN_OPTION_LISTW *listW; + INTERNET_PER_CONN_OPTION_LISTA *listA = lpBuffer; + wlen = sizeof(INTERNET_PER_CONN_OPTION_LISTW); + wbuffer = HeapAlloc( GetProcessHeap(), 0, wlen ); + listW = wbuffer; + + listW->dwSize = sizeof(INTERNET_PER_CONN_OPTION_LISTW); + if (listA->pszConnection) + { + wlen = MultiByteToWideChar( CP_ACP, 0, listA->pszConnection, -1, NULL, 0 ); + listW->pszConnection = HeapAlloc( GetProcessHeap(), 0, wlen*sizeof(WCHAR) ); + MultiByteToWideChar( CP_ACP, 0, listA->pszConnection, -1, listW->pszConnection, wlen ); + } + else + listW->pszConnection = NULL; + listW->dwOptionCount = listA->dwOptionCount; + listW->dwOptionError = listA->dwOptionError; + listW->pOptions = HeapAlloc( GetProcessHeap(), 0, sizeof(INTERNET_PER_CONN_OPTIONW) * listA->dwOptionCount ); + + for (i = 0; i < listA->dwOptionCount; ++i) { + INTERNET_PER_CONN_OPTIONA *optA = listA->pOptions + i; + INTERNET_PER_CONN_OPTIONW *optW = listW->pOptions + i; + + optW->dwOption = optA->dwOption; + + switch (optA->dwOption) { + case INTERNET_PER_CONN_AUTOCONFIG_URL: + case INTERNET_PER_CONN_PROXY_BYPASS: + case INTERNET_PER_CONN_PROXY_SERVER: + case INTERNET_PER_CONN_AUTOCONFIG_SECONDARY_URL: + case INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_URL: + if (optA->Value.pszValue) + { + wlen = MultiByteToWideChar( CP_ACP, 0, optA->Value.pszValue, -1, NULL, 0 ); + optW->Value.pszValue = HeapAlloc( GetProcessHeap(), 0, wlen*sizeof(WCHAR) ); + MultiByteToWideChar( CP_ACP, 0, optA->Value.pszValue, -1, optW->Value.pszValue, wlen ); + } + else + optW->Value.pszValue = NULL; + break; + case INTERNET_PER_CONN_AUTODISCOVERY_FLAGS: + case INTERNET_PER_CONN_FLAGS: + case INTERNET_PER_CONN_AUTOCONFIG_RELOAD_DELAY_MINS: + optW->Value.dwValue = optA->Value.dwValue; + break; + case INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_TIME: + optW->Value.ftValue = optA->Value.ftValue; + default: + WARN("Unknown PER_CONN dwOption: %d, guessing at conversion to Wide\n", optA->dwOption); + optW->Value.dwValue = optA->Value.dwValue; + break; + } + } + } + break; default: wbuffer = lpBuffer; wlen = dwBufferLength; @@ -2491,7 +2548,29 @@ BOOL WINAPI InternetSetOptionA(HINTERNET hInternet, DWORD dwOption, r = InternetSetOptionW(hInternet,dwOption, wbuffer, wlen); if( lpBuffer != wbuffer ) + { + if (dwOption == INTERNET_OPTION_PER_CONNECTION_OPTION) + { + INTERNET_PER_CONN_OPTION_LISTW *list = wbuffer; + int i; + for (i = 0; i < list->dwOptionCount; ++i) { + INTERNET_PER_CONN_OPTIONW *opt = list->pOptions + i; + switch (opt->dwOption) { + case INTERNET_PER_CONN_AUTOCONFIG_URL: + case INTERNET_PER_CONN_PROXY_BYPASS: + case INTERNET_PER_CONN_PROXY_SERVER: + case INTERNET_PER_CONN_AUTOCONFIG_SECONDARY_URL: + case INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_URL: + HeapFree( GetProcessHeap(), 0, opt->Value.pszValue ); + break; + default: + break; + } + } + HeapFree( GetProcessHeap(), 0, list->pOptions ); + } HeapFree( GetProcessHeap(), 0, wbuffer ); + } return r; }
1
0
0
0
Andrew Eikum : wininet: Add Internet{Set, Query}Option tests, implement POLICY option.
by Alexandre Julliard
22 Jan '10
22 Jan '10
Module: wine Branch: master Commit: deca2e5c0ed1ec5eecae4426d871918841b03065 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=deca2e5c0ed1ec5eecae4426d…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Wed Jan 20 14:46:44 2010 -0600 wininet: Add Internet{Set,Query}Option tests, implement POLICY option. --- dlls/wininet/internet.c | 6 ++++++ dlls/wininet/tests/internet.c | 26 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 0 deletions(-) diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 969c079..074bf79 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -2170,6 +2170,8 @@ DWORD INET_QueryOption(DWORD option, void *buffer, DWORD *size, BOOL unicode) } case INTERNET_OPTION_USER_AGENT: return ERROR_INTERNET_INCORRECT_HANDLE_TYPE; + case INTERNET_OPTION_POLICY: + return ERROR_INVALID_PARAMETER; } FIXME("Stub for %d\n", option); @@ -2401,6 +2403,10 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption, SetLastError(ERROR_INTERNET_INVALID_OPTION); ret = FALSE; break; + case INTERNET_OPTION_POLICY: + SetLastError(ERROR_INVALID_PARAMETER); + ret = FALSE; + break; default: FIXME("Option %d STUB\n",dwOption); SetLastError(ERROR_INTERNET_INVALID_OPTION); diff --git a/dlls/wininet/tests/internet.c b/dlls/wininet/tests/internet.c index 622711a..8708878 100644 --- a/dlls/wininet/tests/internet.c +++ b/dlls/wininet/tests/internet.c @@ -824,6 +824,31 @@ static void test_PrivacyGetSetZonePreferenceW(void) ok(ret == 0, "expected ret == 0, got %u\n", ret); } +static void test_Option_Policy(void) +{ + HINTERNET hinet; + BOOL ret; + + hinet = InternetOpen(NULL, INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0); + ok(hinet != 0, "InternetOpen failed: 0x%08x\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret = InternetSetOptionW(hinet, INTERNET_OPTION_POLICY, NULL, 0); + ok(ret == FALSE, "InternetSetOption should've failed\n"); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should've " + "given ERROR_INVALID_PARAMETER, gave: 0x%08x\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret = InternetQueryOptionW(hinet, INTERNET_OPTION_POLICY, NULL, 0); + ok(ret == FALSE, "InternetQueryOption should've failed\n"); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError should've " + "given ERROR_INVALID_PARAMETER, gave: 0x%08x\n", GetLastError()); + + ret = InternetCloseHandle(hinet); + ok(ret == TRUE, "InternetCloseHandle failed: 0x%08x\n", GetLastError()); +} + + /* ############################### */ START_TEST(internet) @@ -846,6 +871,7 @@ START_TEST(internet) test_complicated_cookie(); test_version(); test_null(); + test_Option_Policy(); if (!pInternetTimeFromSystemTimeA) win_skip("skipping the InternetTime tests\n");
1
0
0
0
← Newer
1
...
25
26
27
28
29
30
31
...
62
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
Results per page:
10
25
50
100
200