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 2012
----- 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
2 participants
737 discussions
Start a n
N
ew thread
Dmitry Timoshkov : oleaut32: Move OLEPicture implementation into its own debug channel.
by Alexandre Julliard
17 May '12
17 May '12
Module: wine Branch: master Commit: 48df41f83462e6aaaa8ed68159ca16b41ba9d727 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=48df41f83462e6aaaa8ed6815…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu May 17 18:29:54 2012 +0900 oleaut32: Move OLEPicture implementation into its own debug channel. --- dlls/oleaut32/olepicture.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c index 348529e..a00d463 100644 --- a/dlls/oleaut32/olepicture.c +++ b/dlls/oleaut32/olepicture.c @@ -66,7 +66,7 @@ #include "wine/unicode.h" #include "wine/library.h" -WINE_DEFAULT_DEBUG_CHANNEL(ole); +WINE_DEFAULT_DEBUG_CHANNEL(olepicture); #include "pshpack1.h"
1
0
0
0
Dmitry Timoshkov : oleaut32: Call OleCreatePictureIndirect directly.
by Alexandre Julliard
17 May '12
17 May '12
Module: wine Branch: master Commit: 340d9c1a78c2453f294c12b75894ebf748813651 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=340d9c1a78c2453f294c12b75…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu May 17 18:29:42 2012 +0900 oleaut32: Call OleCreatePictureIndirect directly. --- dlls/oleaut32/tests/olepicture.c | 22 ++++------------------ 1 files changed, 4 insertions(+), 18 deletions(-) diff --git a/dlls/oleaut32/tests/olepicture.c b/dlls/oleaut32/tests/olepicture.c index ecf88f6..8be8b82 100644 --- a/dlls/oleaut32/tests/olepicture.c +++ b/dlls/oleaut32/tests/olepicture.c @@ -55,7 +55,6 @@ static HMODULE hOleaut32; static HRESULT (WINAPI *pOleLoadPicture)(LPSTREAM,LONG,BOOL,REFIID,LPVOID*); static HRESULT (WINAPI *pOleLoadPictureEx)(LPSTREAM,LONG,BOOL,REFIID,DWORD,DWORD,DWORD,LPVOID*); -static HRESULT (WINAPI *pOleCreatePictureIndirect)(PICTDESC*,REFIID,BOOL,LPVOID*); #define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr) @@ -488,19 +487,13 @@ static void test_OleCreatePictureIndirect(void) HRESULT hr; short type; - if(!pOleCreatePictureIndirect) - { - win_skip("Skipping OleCreatePictureIndirect tests\n"); - return; - } - if (0) { /* crashes on native */ - pOleCreatePictureIndirect(NULL, &IID_IPicture, TRUE, NULL); + OleCreatePictureIndirect(NULL, &IID_IPicture, TRUE, NULL); } - hr = pOleCreatePictureIndirect(NULL, &IID_IPicture, TRUE, (void**)&pict); + hr = OleCreatePictureIndirect(NULL, &IID_IPicture, TRUE, (void**)&pict); ok(hr == S_OK, "hr %08x\n", hr); type = PICTYPE_NONE; @@ -901,12 +894,6 @@ static void test_himetric(void) HDC hdc; INT d; - if (!pOleCreatePictureIndirect) - { - win_skip("OleCreatePictureIndirect not available\n"); - return; - } - desc.cbSizeofstruct = sizeof(desc); desc.picType = PICTYPE_BITMAP; desc.u.bmp.hpal = NULL; @@ -919,7 +906,7 @@ static void test_himetric(void) desc.u.bmp.hbitmap = bmp; /* size in himetric units reported rounded up to next integer value */ - hr = pOleCreatePictureIndirect(&desc, &IID_IPicture, FALSE, (void**)&pic); + hr = OleCreatePictureIndirect(&desc, &IID_IPicture, FALSE, (void**)&pic); ok(hr == S_OK, "got 0x%08x\n", hr); cx = 0; @@ -945,7 +932,7 @@ static void test_himetric(void) desc.picType = PICTYPE_ICON; desc.u.icon.hicon = icon; - hr = pOleCreatePictureIndirect(&desc, &IID_IPicture, FALSE, (void**)&pic); + hr = OleCreatePictureIndirect(&desc, &IID_IPicture, FALSE, (void**)&pic); ok(hr == S_OK, "got 0x%08x\n", hr); cx = 0; @@ -971,7 +958,6 @@ START_TEST(olepicture) hOleaut32 = GetModuleHandleA("oleaut32.dll"); pOleLoadPicture = (void*)GetProcAddress(hOleaut32, "OleLoadPicture"); pOleLoadPictureEx = (void*)GetProcAddress(hOleaut32, "OleLoadPictureEx"); - pOleCreatePictureIndirect = (void*)GetProcAddress(hOleaut32, "OleCreatePictureIndirect"); if (!pOleLoadPicture) { win_skip("OleLoadPicture is not available\n");
1
0
0
0
Vincent Povirk : mscoree: Add a fallback for mono_image_open_from_module_handle.
by Alexandre Julliard
17 May '12
17 May '12
Module: wine Branch: master Commit: 56484cc0379697b934a859700d17d277c496daa5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=56484cc0379697b934a859700…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Thu May 17 09:47:46 2012 -0500 mscoree: Add a fallback for mono_image_open_from_module_handle. --- dlls/mscoree/metahost.c | 40 ++++++++++++++++++++++++++++++++-------- dlls/mscoree/mscoree_private.h | 1 + 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/dlls/mscoree/metahost.c b/dlls/mscoree/metahost.c index 3736dc0..fa12853 100644 --- a/dlls/mscoree/metahost.c +++ b/dlls/mscoree/metahost.c @@ -100,6 +100,29 @@ static void CDECL do_nothing(void) { } +static MonoImage* image_open_module_handle_dummy(HMODULE module_handle, + char* fname, UINT has_entry_point, MonoImageOpenStatus* status, int abi_version) +{ + return loaded_monos[abi_version-1].mono_image_open(fname, status); +} + +static CDECL MonoImage* image_open_module_handle_dummy_1(HMODULE module_handle, + char* fname, UINT has_entry_point, MonoImageOpenStatus* status) +{ + return image_open_module_handle_dummy(module_handle, fname, has_entry_point, status, 1); +} + +static CDECL MonoImage* image_open_module_handle_dummy_2(HMODULE module_handle, + char* fname, UINT has_entry_point, MonoImageOpenStatus* status) +{ + return image_open_module_handle_dummy(module_handle, fname, has_entry_point, status, 2); +} + +MonoImage* (CDECL * const image_from_handle_fn[NUM_ABI_VERSIONS])(HMODULE module_handle, char* fname, UINT has_entry_point, MonoImageOpenStatus* status) = { + image_open_module_handle_dummy_1, + image_open_module_handle_dummy_2 +}; + static void missing_runtime_message(const CLRRuntimeInfo *This) { if (This->major == 1) @@ -172,7 +195,7 @@ static HRESULT load_mono(CLRRuntimeInfo *This, loaded_mono **result) LOAD_MONO_FUNCTION(mono_class_from_name); LOAD_MONO_FUNCTION(mono_class_get_method_from_name); LOAD_MONO_FUNCTION(mono_domain_assembly_open); - LOAD_MONO_FUNCTION(mono_image_open_from_module_handle); + LOAD_MONO_FUNCTION(mono_image_open); LOAD_MONO_FUNCTION(mono_install_assembly_preload_hook); LOAD_MONO_FUNCTION(mono_jit_exec); LOAD_MONO_FUNCTION(mono_jit_init); @@ -207,19 +230,20 @@ static HRESULT load_mono(CLRRuntimeInfo *This, loaded_mono **result) #undef LOAD_MONO_FUNCTION -#define LOAD_OPT_VOID_MONO_FUNCTION(x) do { \ +#define LOAD_OPT_MONO_FUNCTION(x, default) do { \ (*result)->x = (void*)GetProcAddress((*result)->mono_handle, #x); \ if (!(*result)->x) { \ - (*result)->x = do_nothing; \ + (*result)->x = default; \ } \ } while (0); - LOAD_OPT_VOID_MONO_FUNCTION(mono_runtime_set_shutting_down); - LOAD_OPT_VOID_MONO_FUNCTION(mono_thread_pool_cleanup); - LOAD_OPT_VOID_MONO_FUNCTION(mono_thread_suspend_all_other_threads); - LOAD_OPT_VOID_MONO_FUNCTION(mono_threads_set_shutting_down); + LOAD_OPT_MONO_FUNCTION(mono_image_open_from_module_handle, image_from_handle_fn[This->mono_abi_version-1]); + LOAD_OPT_MONO_FUNCTION(mono_runtime_set_shutting_down, do_nothing); + LOAD_OPT_MONO_FUNCTION(mono_thread_pool_cleanup, do_nothing); + LOAD_OPT_MONO_FUNCTION(mono_thread_suspend_all_other_threads, do_nothing); + LOAD_OPT_MONO_FUNCTION(mono_threads_set_shutting_down, do_nothing); -#undef LOAD_OPT_VOID_MONO_FUNCTION +#undef LOAD_OPT_MONO_FUNCTION (*result)->mono_profiler_install((MonoProfiler*)*result, mono_shutdown_callback_fn); diff --git a/dlls/mscoree/mscoree_private.h b/dlls/mscoree/mscoree_private.h index ef9079e..7266687 100644 --- a/dlls/mscoree/mscoree_private.h +++ b/dlls/mscoree/mscoree_private.h @@ -154,6 +154,7 @@ struct loaded_mono void (CDECL *mono_config_parse)(const char *filename); MonoAssembly* (CDECL *mono_domain_assembly_open) (MonoDomain *domain, const char *name); void (CDECL *mono_free)(void *); + MonoImage* (CDECL *mono_image_open)(const char *fname, MonoImageOpenStatus *status); MonoImage* (CDECL *mono_image_open_from_module_handle)(HMODULE module_handle, char* fname, UINT has_entry_point, MonoImageOpenStatus* status); void (CDECL *mono_install_assembly_preload_hook)(MonoAssemblyPreLoadFunc func, void *user_data); int (CDECL *mono_jit_exec)(MonoDomain *domain, MonoAssembly *assembly, int argc, char *argv[]);
1
0
0
0
Vincent Povirk : appwiz.cpl: Move dialog template id to addon_info_t.
by Alexandre Julliard
17 May '12
17 May '12
Module: wine Branch: master Commit: ad7279a5a605ac738d5712105739f1d2fd802fa8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ad7279a5a605ac738d5712105…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Thu May 17 09:19:10 2012 -0500 appwiz.cpl: Move dialog template id to addon_info_t. --- dlls/appwiz.cpl/addons.c | 6 ++++-- dlls/appwiz.cpl/appwiz.rc | 2 +- dlls/appwiz.cpl/res.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/appwiz.cpl/addons.c b/dlls/appwiz.cpl/addons.c index 1cff5c4..ab70ed1 100644 --- a/dlls/appwiz.cpl/addons.c +++ b/dlls/appwiz.cpl/addons.c @@ -72,6 +72,7 @@ typedef struct { const char *config_key; const char *url_config_key; const char *dir_config_key; + LPCWSTR dialog_template; } addon_info_t; static const addon_info_t addons_info[] = { @@ -80,7 +81,8 @@ static const addon_info_t addons_info[] = { "wine_gecko-" GECKO_VERSION "-" ARCH_STRING ".msi", "gecko", GECKO_SHA, - "MSHTML", "GeckoUrl", "GeckoCabDir" + "MSHTML", "GeckoUrl", "GeckoCabDir", + MAKEINTRESOURCEW(ID_DWL_GECKO_DIALOG) } }; @@ -571,7 +573,7 @@ BOOL install_addon(addon_t addon_type) if(!install_from_registered_dir() && !install_from_default_dir() && (url = get_url())) - DialogBoxW(hInst, MAKEINTRESOURCEW(ID_DWL_DIALOG), 0, installer_proc); + DialogBoxW(hInst, addon->dialog_template, 0, installer_proc); heap_free(url); url = NULL; diff --git a/dlls/appwiz.cpl/appwiz.rc b/dlls/appwiz.cpl/appwiz.rc index 8107212..af41d6a 100644 --- a/dlls/appwiz.cpl/appwiz.rc +++ b/dlls/appwiz.cpl/appwiz.rc @@ -92,7 +92,7 @@ FONT 8, "MS Shell Dlg" CONTROL "", IDC_INFO_COMMENTS, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 100, 105, 150, 8 } -ID_DWL_DIALOG DIALOG 0, 0, 260, 95 +ID_DWL_GECKO_DIALOG DIALOG 0, 0, 260, 95 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Wine Gecko Installer" FONT 8, "MS Shell Dlg" diff --git a/dlls/appwiz.cpl/res.h b/dlls/appwiz.cpl/res.h index 7dfbf1f..96cd62d 100644 --- a/dlls/appwiz.cpl/res.h +++ b/dlls/appwiz.cpl/res.h @@ -45,7 +45,7 @@ #define IDC_INFO_COMMENTS 1107 #define IDC_INFO_LABEL 1108 -#define ID_DWL_DIALOG 1200 +#define ID_DWL_GECKO_DIALOG 1200 #define ID_DWL_PROGRESS 1201 #define ID_DWL_INSTALL 1202 #define ID_DWL_STATUS 1203
1
0
0
0
Józef Kucia : d3dx9/tests: Fix messed up parameters.
by Alexandre Julliard
17 May '12
17 May '12
Module: wine Branch: master Commit: 091a4269ef682b90df77603681ba56168b7546f4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=091a4269ef682b90df7760368…
Author: Józef Kucia <joseph.kucia(a)gmail.com> Date: Thu May 17 16:51:23 2012 +0200 d3dx9/tests: Fix messed up parameters. --- dlls/d3dx9_36/tests/texture.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/d3dx9_36/tests/texture.c b/dlls/d3dx9_36/tests/texture.c index 143d45b..5663bfa 100644 --- a/dlls/d3dx9_36/tests/texture.c +++ b/dlls/d3dx9_36/tests/texture.c @@ -473,7 +473,7 @@ static void test_D3DXCreateTexture(IDirect3DDevice9 *device) IDirect3DDevice9_GetDeviceCaps(device, &caps); - hr = D3DXCreateTexture(NULL, 0, 0, 0, 0, D3DX_DEFAULT, 0, D3DPOOL_DEFAULT); + hr = D3DXCreateTexture(NULL, 0, 0, 0, 0, D3DX_DEFAULT, D3DPOOL_DEFAULT, NULL); ok(hr == D3DERR_INVALIDCALL, "D3DXCreateTexture returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); /* width and height tests */
1
0
0
0
Józef Kucia : d3dx9/tests: Do not release a cube texture if it wasn't created.
by Alexandre Julliard
17 May '12
17 May '12
Module: wine Branch: master Commit: 5ab8c2fdf8af0589bc9b2ffed152ebd6e0d0a5a9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5ab8c2fdf8af0589bc9b2ffed…
Author: Józef Kucia <joseph.kucia(a)gmail.com> Date: Thu May 17 16:51:22 2012 +0200 d3dx9/tests: Do not release a cube texture if it wasn't created. --- dlls/d3dx9_36/tests/texture.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/dlls/d3dx9_36/tests/texture.c b/dlls/d3dx9_36/tests/texture.c index 1314fa2..143d45b 100644 --- a/dlls/d3dx9_36/tests/texture.c +++ b/dlls/d3dx9_36/tests/texture.c @@ -734,11 +734,10 @@ static void test_D3DXFilterTexture(IDirect3DDevice9 *device) hr = D3DXFilterTexture((IDirect3DBaseTexture9*) cubetex, NULL, 5, D3DX_FILTER_NONE); /* Invalid miplevel */ ok(hr == D3DERR_INVALIDCALL, "D3DXFilterTexture returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + IDirect3DCubeTexture9_Release(cubetex); } else skip("Failed to create texture\n"); - - IDirect3DCubeTexture9_Release(cubetex); } static BOOL color_match(const DWORD *value, const DWORD *expected)
1
0
0
0
Alex Henrie : kernel32: Correct WideCharToMultiByte and MultiByteToWideChar error codes and conditions .
by Alexandre Julliard
17 May '12
17 May '12
Module: wine Branch: master Commit: 8ccf747d6a7c05f64559949705548e2158b85eea URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8ccf747d6a7c05f6455994970…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Wed May 16 19:24:03 2012 -0600 kernel32: Correct WideCharToMultiByte and MultiByteToWideChar error codes and conditions. --- dlls/kernel32/locale.c | 38 ++++++++++++++++++--- dlls/kernel32/tests/codepage.c | 69 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 6 deletions(-) diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c index 380c616..2970856 100644 --- a/dlls/kernel32/locale.c +++ b/dlls/kernel32/locale.c @@ -1878,7 +1878,7 @@ INT WINAPI MultiByteToWideChar( UINT page, DWORD flags, LPCSTR src, INT srclen, const union cptable *table; int ret; - if (!src || (!dst && dstlen)) + if (!src || !srclen || (!dst && dstlen)) { SetLastError( ERROR_INVALID_PARAMETER ); return 0; @@ -1889,14 +1889,19 @@ INT WINAPI MultiByteToWideChar( UINT page, DWORD flags, LPCSTR src, INT srclen, switch(page) { case CP_SYMBOL: - if( flags) + if (flags) { - SetLastError( ERROR_INVALID_PARAMETER ); + SetLastError( ERROR_INVALID_FLAGS ); return 0; } ret = wine_cpsymbol_mbstowcs( src, srclen, dst, dstlen ); break; case CP_UTF7: + if (flags) + { + SetLastError( ERROR_INVALID_FLAGS ); + return 0; + } FIXME("UTF-7 not supported\n"); SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); return 0; @@ -1969,7 +1974,7 @@ INT WINAPI WideCharToMultiByte( UINT page, DWORD flags, LPCWSTR src, INT srclen, const union cptable *table; int ret, used_tmp; - if (!src || (!dst && dstlen)) + if (!src || !srclen || (!dst && dstlen)) { SetLastError( ERROR_INVALID_PARAMETER ); return 0; @@ -1980,7 +1985,13 @@ INT WINAPI WideCharToMultiByte( UINT page, DWORD flags, LPCWSTR src, INT srclen, switch(page) { case CP_SYMBOL: - if( flags || defchar || used) + /* when using CP_SYMBOL, ERROR_INVALID_FLAGS takes precedence */ + if (flags) + { + SetLastError( ERROR_INVALID_FLAGS ); + return 0; + } + if (defchar || used) { SetLastError( ERROR_INVALID_PARAMETER ); return 0; @@ -1988,6 +1999,17 @@ INT WINAPI WideCharToMultiByte( UINT page, DWORD flags, LPCWSTR src, INT srclen, ret = wine_cpsymbol_wcstombs( src, srclen, dst, dstlen ); break; case CP_UTF7: + /* when using CP_UTF7, ERROR_INVALID_PARAMETER takes precedence */ + if (defchar || used) + { + SetLastError( ERROR_INVALID_PARAMETER ); + return 0; + } + if (flags) + { + SetLastError( ERROR_INVALID_FLAGS ); + return 0; + } FIXME("UTF-7 not supported\n"); SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); return 0; @@ -2000,7 +2022,11 @@ INT WINAPI WideCharToMultiByte( UINT page, DWORD flags, LPCWSTR src, INT srclen, } /* fall through */ case CP_UTF8: - if (used) *used = FALSE; /* all chars are valid for UTF-8 */ + if (defchar || used) + { + SetLastError( ERROR_INVALID_PARAMETER ); + return 0; + } ret = wine_utf8_wcstombs( flags, src, srclen, dst, dstlen ); break; default: diff --git a/dlls/kernel32/tests/codepage.c b/dlls/kernel32/tests/codepage.c index 61bcf54..c980348 100644 --- a/dlls/kernel32/tests/codepage.c +++ b/dlls/kernel32/tests/codepage.c @@ -189,6 +189,74 @@ static void test_negative_dest_length(void) } +static void test_other_invalid_parameters(void) +{ + char c_string[] = "Hello World"; + size_t c_string_len = sizeof(c_string); + WCHAR w_string[] = {'H','e','l','l','o',' ','W','o','r','l','d',0}; + size_t w_string_len = sizeof(w_string) / sizeof(WCHAR); + BOOL used; + INT len; + + /* srclen=0 => ERROR_INVALID_PARAMETER */ + SetLastError(0xdeadbeef); + len = WideCharToMultiByte(CP_ACP, 0, w_string, 0, c_string, c_string_len, NULL, NULL); + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%x\n", len, GetLastError()); + + SetLastError(0xdeadbeef); + len = MultiByteToWideChar(CP_ACP, 0, c_string, 0, w_string, w_string_len); + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%x\n", len, GetLastError()); + + + /* dst=NULL but dstlen not 0 => ERROR_INVALID_PARAMETER */ + SetLastError(0xdeadbeef); + len = WideCharToMultiByte(CP_ACP, 0, w_string, w_string_len, NULL, c_string_len, NULL, NULL); + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%x\n", len, GetLastError()); + + SetLastError(0xdeadbeef); + len = MultiByteToWideChar(CP_ACP, 0, c_string, c_string_len, NULL, w_string_len); + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%x\n", len, GetLastError()); + + + /* CP_UTF7, CP_UTF8, or CP_SYMBOL and defchar not NULL => ERROR_INVALID_PARAMETER */ + /* CP_SYMBOL's behavior here is undocumented */ + SetLastError(0xdeadbeef); + len = WideCharToMultiByte(CP_UTF7, 0, w_string, w_string_len, c_string, c_string_len, c_string, NULL); + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%x\n", len, GetLastError()); + + SetLastError(0xdeadbeef); + len = WideCharToMultiByte(CP_UTF8, 0, w_string, w_string_len, c_string, c_string_len, c_string, NULL); + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%x\n", len, GetLastError()); + + SetLastError(0xdeadbeef); + len = WideCharToMultiByte(CP_SYMBOL, 0, w_string, w_string_len, c_string, c_string_len, c_string, NULL); + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%x\n", len, GetLastError()); + + + /* CP_UTF7, CP_UTF8, or CP_SYMBOL and used not NULL => ERROR_INVALID_PARAMETER */ + /* CP_SYMBOL's behavior here is undocumented */ + SetLastError(0xdeadbeef); + len = WideCharToMultiByte(CP_UTF7, 0, w_string, w_string_len, c_string, c_string_len, NULL, &used); + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%x\n", len, GetLastError()); + + SetLastError(0xdeadbeef); + len = WideCharToMultiByte(CP_UTF8, 0, w_string, w_string_len, c_string, c_string_len, NULL, &used); + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%x\n", len, GetLastError()); + + SetLastError(0xdeadbeef); + len = WideCharToMultiByte(CP_SYMBOL, 0, w_string, w_string_len, c_string, c_string_len, NULL, &used); + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%x\n", len, GetLastError()); + + + /* CP_UTF7, flags not 0 and used not NULL => ERROR_INVALID_PARAMETER */ + /* (tests precedence of ERROR_INVALID_PARAMETER over ERROR_INVALID_FLAGS) */ + /* The same test with CP_SYMBOL instead of CP_UTF7 gives ERROR_INVALID_FLAGS + instead except on Windows NT4 */ + SetLastError(0xdeadbeef); + len = WideCharToMultiByte(CP_UTF7, 1, w_string, w_string_len, c_string, c_string_len, NULL, &used); + ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "len=%d error=%x\n", len, GetLastError()); +} + static void test_overlapped_buffers(void) { static const WCHAR strW[] = {'j','u','s','t',' ','a',' ','t','e','s','t',0}; @@ -402,6 +470,7 @@ START_TEST(codepage) test_null_source(); test_negative_source_length(); test_negative_dest_length(); + test_other_invalid_parameters(); test_overlapped_buffers(); /* WideCharToMultiByte has two code paths, test both here */
1
0
0
0
Alex Henrie : kernel32: Avoid calling MultiByteToWideChar with invalid parameters.
by Alexandre Julliard
17 May '12
17 May '12
Module: wine Branch: master Commit: 92b4979b3312f0d3a308c2c0a259fa0153612019 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=92b4979b3312f0d3a308c2c0a…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Wed May 16 19:24:07 2012 -0600 kernel32: Avoid calling MultiByteToWideChar with invalid parameters. --- dlls/kernel32/locale.c | 57 +++++++++++++++++++++++++++++++---------------- 1 files changed, 37 insertions(+), 20 deletions(-) diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c index b506f15..380c616 100644 --- a/dlls/kernel32/locale.c +++ b/dlls/kernel32/locale.c @@ -2867,34 +2867,51 @@ INT WINAPI CompareStringA(LCID lcid, DWORD style, if (!(style & LOCALE_USE_CP_ACP)) locale_cp = get_lcid_codepage( lcid ); - len1W = MultiByteToWideChar(locale_cp, 0, str1, len1, buf1W, 130); - if (len1W) - str1W = buf1W; - else + if (len1) { - len1W = MultiByteToWideChar(locale_cp, 0, str1, len1, NULL, 0); - str1W = HeapAlloc(GetProcessHeap(), 0, len1W * sizeof(WCHAR)); - if (!str1W) + len1W = MultiByteToWideChar(locale_cp, 0, str1, len1, buf1W, 130); + if (len1W) + str1W = buf1W; + else { - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return 0; + len1W = MultiByteToWideChar(locale_cp, 0, str1, len1, NULL, 0); + str1W = HeapAlloc(GetProcessHeap(), 0, len1W * sizeof(WCHAR)); + if (!str1W) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return 0; + } + MultiByteToWideChar(locale_cp, 0, str1, len1, str1W, len1W); } - MultiByteToWideChar(locale_cp, 0, str1, len1, str1W, len1W); } - len2W = MultiByteToWideChar(locale_cp, 0, str2, len2, buf2W, 130); - if (len2W) - str2W = buf2W; else { - len2W = MultiByteToWideChar(locale_cp, 0, str2, len2, NULL, 0); - str2W = HeapAlloc(GetProcessHeap(), 0, len2W * sizeof(WCHAR)); - if (!str2W) + len1W = 0; + str1W = buf1W; + } + + if (len2) + { + len2W = MultiByteToWideChar(locale_cp, 0, str2, len2, buf2W, 130); + if (len2W) + str2W = buf2W; + else { - if (str1W != buf1W) HeapFree(GetProcessHeap(), 0, str1W); - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return 0; + len2W = MultiByteToWideChar(locale_cp, 0, str2, len2, NULL, 0); + str2W = HeapAlloc(GetProcessHeap(), 0, len2W * sizeof(WCHAR)); + if (!str2W) + { + if (str1W != buf1W) HeapFree(GetProcessHeap(), 0, str1W); + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return 0; + } + MultiByteToWideChar(locale_cp, 0, str2, len2, str2W, len2W); } - MultiByteToWideChar(locale_cp, 0, str2, len2, str2W, len2W); + } + else + { + len2W = 0; + str2W = buf2W; } ret = CompareStringW(lcid, style, str1W, len1W, str2W, len2W);
1
0
0
0
Dmitry Timoshkov : gdiplus: Implement GdipImageGetFrameCount.
by Alexandre Julliard
17 May '12
17 May '12
Module: wine Branch: master Commit: eeee536ad6027086302b18bfc628c00c1894fccb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eeee536ad6027086302b18bfc…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed May 16 23:33:55 2012 +0900 gdiplus: Implement GdipImageGetFrameCount. --- dlls/gdiplus/image.c | 17 +++++++++-------- dlls/gdiplus/tests/image.c | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index c6a72b4..ce04c72 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -2456,23 +2456,24 @@ static struct image_format_dimension image_format_dimensions[] = {NULL} }; -/* FIXME: Need to handle multi-framed images */ GpStatus WINGDIPAPI GdipImageGetFrameCount(GpImage *image, GDIPCONST GUID* dimensionID, UINT* count) { - static int calls; - TRACE("(%p,%s,%p)\n", image, debugstr_guid(dimensionID), count); if(!image || !count) return InvalidParameter; - if(!(calls++)) - FIXME("returning frame count of 1\n"); - - *count = 1; + if (!dimensionID || + IsEqualGUID(dimensionID, &image->format) || + IsEqualGUID(dimensionID, &FrameDimensionPage) || + IsEqualGUID(dimensionID, &FrameDimensionTime)) + { + *count = image->frame_count; + return Ok; + } - return Ok; + return InvalidParameter; } GpStatus WINGDIPAPI GdipImageGetFrameDimensionsCount(GpImage *image, diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index b6262d1..e22d45a 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -2298,7 +2298,7 @@ static void test_multiframegif(void) count = 12345; stat = GdipImageGetFrameCount((GpImage*)bmp, &dimension, &count); expect(Ok, stat); - todo_wine expect(2, count); + expect(2, count); /* SelectActiveFrame overwrites our current data */ stat = GdipImageSelectActiveFrame((GpImage*)bmp, &dimension, 1);
1
0
0
0
Dmitry Timoshkov : gdiplus: Save total and current frame in the image structure.
by Alexandre Julliard
17 May '12
17 May '12
Module: wine Branch: master Commit: 007d642e53b4ddc4ea75aba26fc35936b67fbc3f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=007d642e53b4ddc4ea75aba26…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed May 16 23:33:48 2012 +0900 gdiplus: Save total and current frame in the image structure. --- dlls/gdiplus/gdiplus_private.h | 1 + dlls/gdiplus/image.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index df66903..753a162 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -266,6 +266,7 @@ struct GpImage{ ImageType type; GUID format; UINT flags; + UINT frame_count, current_frame; UINT palette_flags; UINT palette_count; UINT palette_size; diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index ba8b979..c6a72b4 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -1767,6 +1767,8 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride, (*bitmap)->image.type = ImageTypeBitmap; memcpy(&(*bitmap)->image.format, &ImageFormatMemoryBMP, sizeof(GUID)); (*bitmap)->image.flags = ImageFlagsNone; + (*bitmap)->image.frame_count = 1; + (*bitmap)->image.current_frame = 0; (*bitmap)->image.palette_flags = 0; (*bitmap)->image.palette_count = 0; (*bitmap)->image.palette_size = 0; @@ -2591,7 +2593,7 @@ static GpStatus decode_image_wic(IStream* stream, REFCLSID clsid, GpImage **imag WICPixelFormatGUID wic_format; PixelFormat gdip_format=0; int i; - UINT width, height; + UINT width, height, frame_count; BitmapData lockeddata; WICRect wrc; HRESULT initresult; @@ -2604,7 +2606,11 @@ static GpStatus decode_image_wic(IStream* stream, REFCLSID clsid, GpImage **imag hr = IWICBitmapDecoder_Initialize(decoder, (IStream*)stream, WICDecodeMetadataCacheOnLoad); if (SUCCEEDED(hr)) + { + IWICBitmapDecoder_GetFrameCount(decoder, &frame_count); + /* FIXME: set current frame */ hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame); + } if (SUCCEEDED(hr)) /* got frame */ { @@ -2696,6 +2702,8 @@ end: { /* Native GDI+ used to be smarter, but since Win7 it just sets these flags. */ bitmap->image.flags |= ImageFlagsReadOnly|ImageFlagsHasRealPixelSize|ImageFlagsHasRealDPI|ImageFlagsColorSpaceRGB; + bitmap->image.frame_count = frame_count; + bitmap->image.current_frame = 0; } return status; @@ -2765,6 +2773,8 @@ static GpStatus decode_image_olepicture_metafile(IStream* stream, REFCLSID clsid (*image)->type = ImageTypeMetafile; (*image)->picture = pic; (*image)->flags = ImageFlagsNone; + (*image)->frame_count = 1; + (*image)->current_frame = 0; (*image)->palette_flags = 0; (*image)->palette_count = 0; (*image)->palette_size = 0;
1
0
0
0
← Newer
1
...
30
31
32
33
34
35
36
...
74
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
Results per page:
10
25
50
100
200