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
February 2009
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
965 discussions
Start a n
N
ew thread
Alistair Leslie-Hughes : mshtml: Implement IHTMLStyle_get_marginLeft.
by Alexandre Julliard
18 Feb '09
18 Feb '09
Module: wine Branch: master Commit: de4f3fd4b9019ceec718395daae37f25dbdd12f5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=de4f3fd4b9019ceec718395da…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Wed Feb 18 20:30:08 2009 +1100 mshtml: Implement IHTMLStyle_get_marginLeft. --- dlls/mshtml/htmlstyle.c | 4 ++-- dlls/mshtml/tests/dom.c | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 3ee3d80..84edd94 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -1196,8 +1196,8 @@ static HRESULT WINAPI HTMLStyle_get_margin(IHTMLStyle *iface, BSTR *p) static HRESULT WINAPI HTMLStyle_get_marginLeft(IHTMLStyle *iface, VARIANT *p) { HTMLStyle *This = HTMLSTYLE_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, p); + return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_LEFT, p, 0); } static HRESULT WINAPI HTMLStyle_put_paddingTop(IHTMLStyle *iface, VARIANT v) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 1663fef..b6f6eaa 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2454,6 +2454,12 @@ static void test_default_style(IHTMLStyle *style) ok(V_VT(&v) == VT_BSTR, "V_VT(marginRight) = %d\n", V_VT(&v)); ok(!V_BSTR(&v), "V_BSTR(marginRight) = %s\n", dbgstr_w(V_BSTR(&v))); + V_VT(&v) = VT_NULL; + hres = IHTMLStyle_get_marginLeft(style, &v); + ok(hres == S_OK, "get_marginLeft failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(marginLeft) = %d\n", V_VT(&v)); + ok(!V_BSTR(&v), "V_BSTR(marginLeft) = %s\n", dbgstr_w(V_BSTR(&v))); + str = (void*)0xdeadbeef; hres = IHTMLStyle_get_fontFamily(style, &str); ok(hres == S_OK, "get_fontFamily failed: %08x\n", hres);
1
0
0
0
Alistair Leslie-Hughes : mshtml: Implement IHTMLStyle_get_marginRight.
by Alexandre Julliard
18 Feb '09
18 Feb '09
Module: wine Branch: master Commit: d6be3967bde15223d2dd865761bd62497dabf1d8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d6be3967bde15223d2dd86576…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Wed Feb 18 20:24:54 2009 +1100 mshtml: Implement IHTMLStyle_get_marginRight. --- dlls/mshtml/htmlstyle.c | 4 ++-- dlls/mshtml/tests/dom.c | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index abe8a3f..3ee3d80 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -1131,8 +1131,8 @@ static HRESULT WINAPI HTMLStyle_put_marginRight(IHTMLStyle *iface, VARIANT v) static HRESULT WINAPI HTMLStyle_get_marginRight(IHTMLStyle *iface, VARIANT *p) { HTMLStyle *This = HTMLSTYLE_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, p); + return get_nsstyle_attr_var(This->nsstyle, STYLEID_MARGIN_RIGHT, p, 0); } static HRESULT WINAPI HTMLStyle_put_marginBottom(IHTMLStyle *iface, VARIANT v) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 90148ea..1663fef 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2448,6 +2448,12 @@ static void test_default_style(IHTMLStyle *style) ok(hres == S_OK, "get_position failed: %08x\n", hres); ok(!str, "str=%s\n", dbgstr_w(str)); + V_VT(&v) = VT_NULL; + hres = IHTMLStyle_get_marginRight(style, &v); + ok(hres == S_OK, "get_marginRight failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(marginRight) = %d\n", V_VT(&v)); + ok(!V_BSTR(&v), "V_BSTR(marginRight) = %s\n", dbgstr_w(V_BSTR(&v))); + str = (void*)0xdeadbeef; hres = IHTMLStyle_get_fontFamily(style, &str); ok(hres == S_OK, "get_fontFamily failed: %08x\n", hres);
1
0
0
0
Alexandre Julliard : msvcrt: Don't try to duplicate invalid handles. Don' t reset std handles if we didn't set them.
by Alexandre Julliard
18 Feb '09
18 Feb '09
Module: wine Branch: master Commit: 1c91d54503f9b2afa513dc4dd79bf19bc9bad51a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1c91d54503f9b2afa513dc4dd…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Feb 18 14:44:17 2009 +0100 msvcrt: Don't try to duplicate invalid handles. Don't reset std handles if we didn't set them. --- dlls/msvcrt/file.c | 42 +++++++++++++++++++++++++++--------------- 1 files changed, 27 insertions(+), 15 deletions(-) diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 6082cb9..7e1210c 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -168,7 +168,10 @@ static HANDLE msvcrt_fdtoh(int fd) /* INTERNAL: free a file entry fd */ static void msvcrt_free_fd(int fd) { + HANDLE old_handle; + LOCK_FILES(); + old_handle = MSVCRT_fdesc[fd].handle; MSVCRT_fdesc[fd].handle = INVALID_HANDLE_VALUE; MSVCRT_fdesc[fd].wxflag = 0; TRACE(":fd (%d) freed\n",fd); @@ -176,9 +179,15 @@ static void msvcrt_free_fd(int fd) { switch (fd) { - case 0: SetStdHandle(STD_INPUT_HANDLE, NULL); break; - case 1: SetStdHandle(STD_OUTPUT_HANDLE, NULL); break; - case 2: SetStdHandle(STD_ERROR_HANDLE, NULL); break; + case 0: + if (GetStdHandle(STD_INPUT_HANDLE) == old_handle) SetStdHandle(STD_INPUT_HANDLE, 0); + break; + case 1: + if (GetStdHandle(STD_OUTPUT_HANDLE) == old_handle) SetStdHandle(STD_OUTPUT_HANDLE, 0); + break; + case 2: + if (GetStdHandle(STD_ERROR_HANDLE) == old_handle) SetStdHandle(STD_ERROR_HANDLE, 0); + break; } } else @@ -361,24 +370,27 @@ void msvcrt_init_io(void) if (!(MSVCRT_fdesc[0].wxflag & WX_OPEN) || MSVCRT_fdesc[0].handle == INVALID_HANDLE_VALUE) { - DuplicateHandle(GetCurrentProcess(), GetStdHandle(STD_INPUT_HANDLE), - GetCurrentProcess(), &MSVCRT_fdesc[0].handle, 0, TRUE, - DUPLICATE_SAME_ACCESS); - MSVCRT_fdesc[0].wxflag = WX_OPEN | WX_TEXT; + HANDLE std = GetStdHandle(STD_INPUT_HANDLE); + if (std != INVALID_HANDLE_VALUE && DuplicateHandle(GetCurrentProcess(), std, + GetCurrentProcess(), &MSVCRT_fdesc[0].handle, + 0, TRUE, DUPLICATE_SAME_ACCESS)) + MSVCRT_fdesc[0].wxflag = WX_OPEN | WX_TEXT; } if (!(MSVCRT_fdesc[1].wxflag & WX_OPEN) || MSVCRT_fdesc[1].handle == INVALID_HANDLE_VALUE) { - DuplicateHandle(GetCurrentProcess(), GetStdHandle(STD_OUTPUT_HANDLE), - GetCurrentProcess(), &MSVCRT_fdesc[1].handle, 0, TRUE, - DUPLICATE_SAME_ACCESS); - MSVCRT_fdesc[1].wxflag = WX_OPEN | WX_TEXT; + HANDLE std = GetStdHandle(STD_OUTPUT_HANDLE); + if (std != INVALID_HANDLE_VALUE && DuplicateHandle(GetCurrentProcess(), std, + GetCurrentProcess(), &MSVCRT_fdesc[1].handle, + 0, TRUE, DUPLICATE_SAME_ACCESS)) + MSVCRT_fdesc[1].wxflag = WX_OPEN | WX_TEXT; } if (!(MSVCRT_fdesc[2].wxflag & WX_OPEN) || MSVCRT_fdesc[2].handle == INVALID_HANDLE_VALUE) { - DuplicateHandle(GetCurrentProcess(), GetStdHandle(STD_ERROR_HANDLE), - GetCurrentProcess(), &MSVCRT_fdesc[2].handle, 0, TRUE, - DUPLICATE_SAME_ACCESS); - MSVCRT_fdesc[2].wxflag = WX_OPEN | WX_TEXT; + HANDLE std = GetStdHandle(STD_ERROR_HANDLE); + if (std != INVALID_HANDLE_VALUE && DuplicateHandle(GetCurrentProcess(), std, + GetCurrentProcess(), &MSVCRT_fdesc[2].handle, + 0, TRUE, DUPLICATE_SAME_ACCESS)) + MSVCRT_fdesc[2].wxflag = WX_OPEN | WX_TEXT; } TRACE(":handles (%p)(%p)(%p)\n",MSVCRT_fdesc[0].handle,
1
0
0
0
Aric Stewart : msctf: Added msctf tests.
by Alexandre Julliard
18 Feb '09
18 Feb '09
Module: wine Branch: master Commit: 64ae0000b68c27402790c5610850404aa12d74bc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=64ae0000b68c27402790c5610…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Tue Feb 17 10:40:34 2009 -0600 msctf: Added msctf tests. --- configure | 9 ++++ configure.ac | 1 + dlls/msctf/tests/Makefile.in | 13 ++++++ dlls/msctf/tests/inputprocessor.c | 84 +++++++++++++++++++++++++++++++++++++ 4 files changed, 107 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 5a91b4e..fc0362f 100755 --- a/configure +++ b/configure @@ -25828,6 +25828,14 @@ dlls/msctf/Makefile: dlls/msctf/Makefile.in dlls/Makedll.rules" ac_config_files="$ac_config_files dlls/msctf/Makefile" ALL_MAKEFILES="$ALL_MAKEFILES \\ + dlls/msctf/tests/Makefile" +test "x$enable_tests" != xno && ALL_TEST_DIRS="$ALL_TEST_DIRS \\ + msctf/tests" +ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS +dlls/msctf/tests/Makefile: dlls/msctf/tests/Makefile.in dlls/Maketest.rules" +ac_config_files="$ac_config_files dlls/msctf/tests/Makefile" + +ALL_MAKEFILES="$ALL_MAKEFILES \\ dlls/msdmo/Makefile" test "x$enable_msdmo" != xno && ALL_DLL_DIRS="$ALL_DLL_DIRS \\ msdmo" @@ -28794,6 +28802,7 @@ do "dlls/mscms/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/mscms/tests/Makefile" ;; "dlls/mscoree/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/mscoree/Makefile" ;; "dlls/msctf/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/msctf/Makefile" ;; + "dlls/msctf/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/msctf/tests/Makefile" ;; "dlls/msdmo/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/msdmo/Makefile" ;; "dlls/msftedit/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/msftedit/Makefile" ;; "dlls/msg711.acm/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/msg711.acm/Makefile" ;; diff --git a/configure.ac b/configure.ac index d1c8d7a..e1e98fa 100644 --- a/configure.ac +++ b/configure.ac @@ -2059,6 +2059,7 @@ WINE_CONFIG_MAKEFILE([dlls/mscms/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_ WINE_CONFIG_MAKEFILE([dlls/mscms/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS],[enable_tests]) WINE_CONFIG_MAKEFILE([dlls/mscoree/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) WINE_CONFIG_MAKEFILE([dlls/msctf/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) +WINE_CONFIG_MAKEFILE([dlls/msctf/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS],[enable_tests]) WINE_CONFIG_MAKEFILE([dlls/msdmo/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) WINE_CONFIG_MAKEFILE([dlls/msftedit/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) WINE_CONFIG_MAKEFILE([dlls/msg711.acm/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) diff --git a/dlls/msctf/tests/Makefile.in b/dlls/msctf/tests/Makefile.in new file mode 100644 index 0000000..669f5a1 --- /dev/null +++ b/dlls/msctf/tests/Makefile.in @@ -0,0 +1,13 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +TESTDLL = msctf.dll +IMPORTS = uuid ole32 user32 kernel32 + +CTESTS = \ + inputprocessor.c + +@MAKE_TEST_RULES@ + +@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/msctf/tests/inputprocessor.c b/dlls/msctf/tests/inputprocessor.c new file mode 100644 index 0000000..200a0d4 --- /dev/null +++ b/dlls/msctf/tests/inputprocessor.c @@ -0,0 +1,84 @@ +/* + * Unit tests for ITfInputProcessor + * + * Copyright 2009 Aric Stewart, CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <stdio.h> + +#define COBJMACROS +#include "wine/test.h" +#include "winuser.h" +#include "shlwapi.h" +#include "shlguid.h" +#include "comcat.h" +#include "initguid.h" +#include "msctf.h" + +static ITfInputProcessorProfiles* g_ipp; +static LANGID gLangid; + +DEFINE_GUID(CLSID_FakeService, 0xEDE1A7AD,0x66DE,0x47E0,0xB6,0x20,0x3E,0x92,0xF8,0x24,0x6B,0xF3); + +static HRESULT initialize(void) +{ + HRESULT hr; + CoInitialize(NULL); + hr = CoCreateInstance (&CLSID_TF_InputProcessorProfiles, NULL, + CLSCTX_INPROC_SERVER, &IID_ITfInputProcessorProfiles, (void**)&g_ipp); + return hr; +} + +static void cleanup(void) +{ + if (g_ipp) + ITfInputProcessorProfiles_Release(g_ipp); + CoUninitialize(); +} + +static void test_Register(void) +{ + HRESULT hr; + + static const WCHAR szDesc[] = {'F','a','k','e',' ','W','i','n','e',' ','S','e','r','v','i','c','e',0}; + static const WCHAR szFile[] = {'F','a','k','e',' ','W','i','n','e',' ','S','e','r','v','i','c','e',' ','F','i','l','e',0}; + + hr = ITfInputProcessorProfiles_Register(g_ipp, &CLSID_FakeService); + ok(SUCCEEDED(hr),"Unable to register text service(%x)\n",hr); + hr = ITfInputProcessorProfiles_AddLanguageProfile(g_ipp, &CLSID_FakeService, gLangid, &CLSID_FakeService, szDesc, sizeof(szDesc)/sizeof(WCHAR), szFile, sizeof(szFile)/sizeof(WCHAR), 1); + ok(SUCCEEDED(hr),"Unable to add Language Profile (%x)\n",hr); +} + +static void test_Unregister(void) +{ + HRESULT hr; + hr = ITfInputProcessorProfiles_Unregister(g_ipp, &CLSID_FakeService); + todo_wine ok(SUCCEEDED(hr),"Unable to unregister text service(%x)\n",hr); +} + +START_TEST(inputprocessor) +{ + if (SUCCEEDED(initialize())) + { + gLangid = GetUserDefaultLCID(); + test_Register(); + test_Unregister(); + } + else + skip("Unable to create InputProcessor\n"); + cleanup(); +}
1
0
0
0
Aric Stewart : wininet: Make use of improved cookie functions and cookie paths.
by Alexandre Julliard
18 Feb '09
18 Feb '09
Module: wine Branch: master Commit: f9368325950cb28b2c803498d459634f2b3a8099 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f9368325950cb28b2c803498d…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Tue Feb 17 10:29:21 2009 -0600 wininet: Make use of improved cookie functions and cookie paths. --- dlls/wininet/http.c | 81 ++++++++------------------------------------------ 1 files changed, 13 insertions(+), 68 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index bf1e1bd..3a42d67 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -329,73 +329,18 @@ static void HTTP_ProcessCookies( LPWININETHTTPREQW lpwhr ) if (!(lpwhr->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES) && setCookieHeader->lpszValue) { - int nPosStart = 0, nPosEnd = 0, len; - static const WCHAR szFmt[] = { 'h','t','t','p',':','/','/','%','s','/',0}; + int len; + static const WCHAR szFmt[] = { 'h','t','t','p',':','/','/','%','s','%','s',0}; + LPWSTR buf_url; + LPHTTPHEADERW Host; - while (setCookieHeader->lpszValue[nPosEnd] != '\0') - { - LPWSTR buf_cookie, cookie_name, cookie_data; - LPWSTR buf_url; - LPWSTR domain = NULL; - LPHTTPHEADERW Host; - - int nEqualPos = 0; - while (setCookieHeader->lpszValue[nPosEnd] != ';' && setCookieHeader->lpszValue[nPosEnd] != ',' && - setCookieHeader->lpszValue[nPosEnd] != '\0') - { - nPosEnd++; - } - if (setCookieHeader->lpszValue[nPosEnd] == ';') - { - /* fixme: not case sensitive, strcasestr is gnu only */ - int nDomainPosEnd = 0; - int nDomainPosStart = 0, nDomainLength = 0; - static const WCHAR szDomain[] = {'d','o','m','a','i','n','=',0}; - LPWSTR lpszDomain = strstrW(&setCookieHeader->lpszValue[nPosEnd], szDomain); - if (lpszDomain) - { /* they have specified their own domain, lets use it */ - while (lpszDomain[nDomainPosEnd] != ';' && lpszDomain[nDomainPosEnd] != ',' && - lpszDomain[nDomainPosEnd] != '\0') - { - nDomainPosEnd++; - } - nDomainPosStart = strlenW(szDomain); - nDomainLength = (nDomainPosEnd - nDomainPosStart) + 1; - domain = HeapAlloc(GetProcessHeap(), 0, (nDomainLength + 1)*sizeof(WCHAR)); - lstrcpynW(domain, &lpszDomain[nDomainPosStart], nDomainLength + 1); - } - } - if (setCookieHeader->lpszValue[nPosEnd] == '\0') break; - buf_cookie = HeapAlloc(GetProcessHeap(), 0, ((nPosEnd - nPosStart) + 1)*sizeof(WCHAR)); - lstrcpynW(buf_cookie, &setCookieHeader->lpszValue[nPosStart], (nPosEnd - nPosStart) + 1); - TRACE("%s\n", debugstr_w(buf_cookie)); - while (buf_cookie[nEqualPos] != '=' && buf_cookie[nEqualPos] != '\0') - { - nEqualPos++; - } - if (buf_cookie[nEqualPos] == '\0' || buf_cookie[nEqualPos + 1] == '\0') - { - HeapFree(GetProcessHeap(), 0, buf_cookie); - break; - } + Host = HTTP_GetHeader(lpwhr,szHost); + len = lstrlenW(Host->lpszValue) + 9 + lstrlenW(lpwhr->lpszPath); + buf_url = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)); + sprintfW(buf_url, szFmt, Host->lpszValue, lpwhr->lpszPath); + InternetSetCookieW(buf_url, NULL, setCookieHeader->lpszValue); - cookie_name = HeapAlloc(GetProcessHeap(), 0, (nEqualPos + 1)*sizeof(WCHAR)); - lstrcpynW(cookie_name, buf_cookie, nEqualPos + 1); - cookie_data = &buf_cookie[nEqualPos + 1]; - - Host = HTTP_GetHeader(lpwhr,szHost); - len = lstrlenW((domain ? domain : (Host?Host->lpszValue:NULL))) + - strlenW(lpwhr->lpszPath) + 9; - buf_url = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)); - sprintfW(buf_url, szFmt, (domain ? domain : (Host?Host->lpszValue:NULL))); /* FIXME PATH!!! */ - InternetSetCookieW(buf_url, cookie_name, cookie_data); - - HeapFree(GetProcessHeap(), 0, buf_url); - HeapFree(GetProcessHeap(), 0, buf_cookie); - HeapFree(GetProcessHeap(), 0, cookie_name); - HeapFree(GetProcessHeap(), 0, domain); - nPosStart = nPosEnd; - } + HeapFree(GetProcessHeap(), 0, buf_url); } numCookies++; } @@ -3249,14 +3194,14 @@ static BOOL HTTP_SecureProxyConnect(LPWININETHTTPREQW lpwhr) static void HTTP_InsertCookies(LPWININETHTTPREQW lpwhr) { - static const WCHAR szUrlForm[] = {'h','t','t','p',':','/','/','%','s',0}; + static const WCHAR szUrlForm[] = {'h','t','t','p',':','/','/','%','s','%','s',0}; LPWSTR lpszCookies, lpszUrl = NULL; DWORD nCookieSize, size; LPHTTPHEADERW Host = HTTP_GetHeader(lpwhr,szHost); - size = (strlenW(Host->lpszValue) + strlenW(szUrlForm)) * sizeof(WCHAR); + size = (strlenW(Host->lpszValue) + strlenW(szUrlForm) + strlenW(lpwhr->lpszPath)) * sizeof(WCHAR); if (!(lpszUrl = HeapAlloc(GetProcessHeap(), 0, size))) return; - sprintfW( lpszUrl, szUrlForm, Host->lpszValue ); + sprintfW( lpszUrl, szUrlForm, Host->lpszValue, lpwhr->lpszPath); if (InternetGetCookieW(lpszUrl, NULL, NULL, &nCookieSize)) {
1
0
0
0
Aric Stewart : wininet: Complicated cookie value set/get tests.
by Alexandre Julliard
18 Feb '09
18 Feb '09
Module: wine Branch: master Commit: d2d26205bed2c3a1678af7998688ec7b80af71f7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d2d26205bed2c3a1678af7998…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Tue Feb 17 10:29:08 2009 -0600 wininet: Complicated cookie value set/get tests. --- dlls/wininet/tests/internet.c | 97 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 97 insertions(+), 0 deletions(-) diff --git a/dlls/wininet/tests/internet.c b/dlls/wininet/tests/internet.c index f3277d3..fe3f477 100644 --- a/dlls/wininet/tests/internet.c +++ b/dlls/wininet/tests/internet.c @@ -244,6 +244,102 @@ static void test_get_cookie(void) ret ? "TRUE" : "FALSE", GetLastError()); } + +static void test_complicated_cookie(void) +{ + DWORD len; + BOOL ret; + + CHAR buffer[1024]; + + ret = InternetSetCookie("
http://www.example.com/bar
",NULL,"A=B;
domain=.example.com
"); + ok(ret == TRUE,"InternetSetCookie failed\n"); + ret = InternetSetCookie("
http://www.example.com/bar
",NULL,"C=D;
domain=.example.com
; path=/"); + ok(ret == TRUE,"InternetSetCookie failed\n"); + + /* Technically illegal! domain should require 2 dots, but native wininet accepts it */ + ret = InternetSetCookie("
http://www.example.com
",NULL,"E=F;
domain=example.com
"); + ok(ret == TRUE,"InternetSetCookie failed\n"); + ret = InternetSetCookie("
http://www.example.com
",NULL,"G=H;
domain=.example.com
; path=/foo"); + ok(ret == TRUE,"InternetSetCookie failed\n"); + ret = InternetSetCookie("
http://www.example.com/bar.html
",NULL,"I=J;
domain=.example.com
"); + ok(ret == TRUE,"InternetSetCookie failed\n"); + ret = InternetSetCookie("
http://www.example.com/bar/
",NULL,"K=L;
domain=.example.com
"); + ok(ret == TRUE,"InternetSetCookie failed\n"); + ret = InternetSetCookie("
http://www.example.com/bar/
",NULL,"M=N;
domain=.example.com
; path=/foo/"); + ok(ret == TRUE,"InternetSetCookie failed\n"); + + len = 1024; + ret = InternetGetCookie("
http://testing.example.com
", NULL, buffer, &len); + ok(strstr(buffer,"A=B")!=NULL,"A=B missing\n"); + ok(strstr(buffer,"C=D")!=NULL,"C=D missing\n"); + ok(strstr(buffer,"E=F")!=NULL,"E=F missing\n"); + ok(strstr(buffer,"G=H")==NULL,"G=H present\n"); + ok(strstr(buffer,"I=J")!=NULL,"I=J missing\n"); + ok(strstr(buffer,"K=L")==NULL,"K=L present\n"); + ok(strstr(buffer,"M=N")==NULL,"M=N present\n"); + + len = 1024; + ret = InternetGetCookie("
http://testing.example.com/foobar
", NULL, buffer, &len); + ok(strstr(buffer,"A=B")!=NULL,"A=B missing\n"); + ok(strstr(buffer,"C=D")!=NULL,"C=D missing\n"); + ok(strstr(buffer,"E=F")!=NULL,"E=F missing\n"); + ok(strstr(buffer,"G=H")==NULL,"G=H present\n"); + ok(strstr(buffer,"I=J")!=NULL,"I=J missing\n"); + ok(strstr(buffer,"K=L")==NULL,"K=L present\n"); + ok(strstr(buffer,"M=N")==NULL,"M=N present\n"); + + len = 1024; + ret = InternetGetCookie("
http://testing.example.com/foobar/
", NULL, buffer, &len); + ok(strstr(buffer,"A=B")!=NULL,"A=B missing\n"); + ok(strstr(buffer,"C=D")!=NULL,"C=D missing\n"); + ok(strstr(buffer,"E=F")!=NULL,"E=F missing\n"); + ok(strstr(buffer,"G=H")!=NULL,"G=H missing\n"); + ok(strstr(buffer,"I=J")!=NULL,"I=J missing\n"); + ok(strstr(buffer,"K=L")==NULL,"K=L present\n"); + ok(strstr(buffer,"M=N")==NULL,"M=N present\n"); + + len = 1024; + ret = InternetGetCookie("
http://testing.example.com/foo/bar
", NULL, buffer, &len); + ok(strstr(buffer,"A=B")!=NULL,"A=B missing\n"); + ok(strstr(buffer,"C=D")!=NULL,"C=D missing\n"); + ok(strstr(buffer,"E=F")!=NULL,"E=F missing\n"); + ok(strstr(buffer,"G=H")!=NULL,"G=H missing\n"); + ok(strstr(buffer,"I=J")!=NULL,"I=J missing\n"); + ok(strstr(buffer,"K=L")==NULL,"K=L present\n"); + ok(strstr(buffer,"M=N")!=NULL,"M=N missing\n"); + + len = 1024; + ret = InternetGetCookie("
http://testing.example.com/barfoo
", NULL, buffer, &len); + ok(strstr(buffer,"A=B")!=NULL,"A=B missing\n"); + ok(strstr(buffer,"C=D")!=NULL,"C=D missing\n"); + ok(strstr(buffer,"E=F")!=NULL,"E=F missing\n"); + ok(strstr(buffer,"G=H")==NULL,"G=H present\n"); + ok(strstr(buffer,"I=J")!=NULL,"I=J missing\n"); + ok(strstr(buffer,"K=L")==NULL,"K=L present\n"); + ok(strstr(buffer,"M=N")==NULL,"M=N present\n"); + + len = 1024; + ret = InternetGetCookie("
http://testing.example.com/barfoo/
", NULL, buffer, &len); + ok(strstr(buffer,"A=B")!=NULL,"A=B missing\n"); + ok(strstr(buffer,"C=D")!=NULL,"C=D missing\n"); + ok(strstr(buffer,"E=F")!=NULL,"E=F missing\n"); + ok(strstr(buffer,"G=H")==NULL,"G=H present\n"); + ok(strstr(buffer,"I=J")!=NULL,"I=J missing\n"); + ok(strstr(buffer,"K=L")==NULL,"K=L present\n"); + ok(strstr(buffer,"M=N")==NULL,"M=N present\n"); + + len = 1024; + ret = InternetGetCookie("
http://testing.example.com/bar/foo
", NULL, buffer, &len); + ok(strstr(buffer,"A=B")!=NULL,"A=B missing\n"); + ok(strstr(buffer,"C=D")!=NULL,"C=D missing\n"); + ok(strstr(buffer,"E=F")!=NULL,"E=F missing\n"); + ok(strstr(buffer,"G=H")==NULL,"G=H present\n"); + ok(strstr(buffer,"I=J")!=NULL,"I=J missing\n"); + ok(strstr(buffer,"K=L")!=NULL,"K=L missing\n"); + ok(strstr(buffer,"M=N")==NULL,"M=N present\n"); +} + static void test_null(void) { HINTERNET hi, hc; @@ -683,6 +779,7 @@ START_TEST(internet) test_InternetCanonicalizeUrlA(); test_InternetQueryOptionA(); test_get_cookie(); + test_complicated_cookie(); test_version(); test_null();
1
0
0
0
Aric Stewart : wininet: Add and match paths for cookies.
by Alexandre Julliard
18 Feb '09
18 Feb '09
Module: wine Branch: master Commit: a253a376a7d7c77d450d1e54f1d0d3ef8097cfc3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a253a376a7d7c77d450d1e54f…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Tue Feb 17 10:29:03 2009 -0600 wininet: Add and match paths for cookies. --- dlls/wininet/cookie.c | 21 ++++++++++++++++----- 1 files changed, 16 insertions(+), 5 deletions(-) diff --git a/dlls/wininet/cookie.c b/dlls/wininet/cookie.c index 60afc03..690cbe9 100644 --- a/dlls/wininet/cookie.c +++ b/dlls/wininet/cookie.c @@ -235,11 +235,22 @@ static BOOL COOKIE_matchDomain(LPCWSTR lpszCookieDomain, LPCWSTR lpszCookiePath, } if (lpszCookiePath) { + INT len; TRACE("comparing paths: %s with %s\n", debugstr_w(lpszCookiePath), debugstr_w(searchDomain->lpCookiePath)); + /* paths match at the beginning. so a path of /foo would match + * /foobar and /foo/bar + */ if (!searchDomain->lpCookiePath) return FALSE; - if (strcmpW(lpszCookiePath, searchDomain->lpCookiePath)) + if (allow_partial) + { + len = lstrlenW(searchDomain->lpCookiePath); + if (strncmpiW(searchDomain->lpCookiePath, lpszCookiePath, len)!=0) + return FALSE; + } + else if (strcmpW(lpszCookiePath, searchDomain->lpCookiePath)) return FALSE; + } return TRUE; } @@ -299,7 +310,7 @@ BOOL WINAPI InternetGetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName, LIST_FOR_EACH(cursor, &domain_list) { cookie_domain *cookiesDomain = LIST_ENTRY(cursor, cookie_domain, entry); - if (COOKIE_matchDomain(hostName, NULL /* FIXME: path */, cookiesDomain, TRUE)) + if (COOKIE_matchDomain(hostName, path, cookiesDomain, TRUE)) { struct list * cursor; domain_count++; @@ -471,7 +482,7 @@ static BOOL set_cookie(LPCWSTR domain, LPCWSTR path, LPCWSTR cookie_name, LPCWST LIST_FOR_EACH(cursor, &domain_list) { thisCookieDomain = LIST_ENTRY(cursor, cookie_domain, entry); - if (COOKIE_matchDomain(domain, NULL /* FIXME: path */, thisCookieDomain, FALSE)) + if (COOKIE_matchDomain(domain, path, thisCookieDomain, FALSE)) break; thisCookieDomain = NULL; } @@ -482,8 +493,8 @@ static BOOL set_cookie(LPCWSTR domain, LPCWSTR path, LPCWSTR cookie_name, LPCWST if ((thisCookie = COOKIE_findCookie(thisCookieDomain, cookie_name))) COOKIE_deleteCookie(thisCookie, FALSE); - TRACE("setting cookie %s=%s for domain %s\n", debugstr_w(cookie_name), - debugstr_w(data), debugstr_w(thisCookieDomain->lpCookieDomain)); + TRACE("setting cookie %s=%s for domain %s path %s\n", debugstr_w(cookie_name), + debugstr_w(data), debugstr_w(thisCookieDomain->lpCookieDomain),debugstr_w(thisCookieDomain->lpCookiePath)); if (!COOKIE_addCookie(thisCookieDomain, cookie_name,data)) {
1
0
0
0
Aric Stewart : wininet: When cracking a cookie url discard the webpage and ensure at least a path of '/'.
by Alexandre Julliard
18 Feb '09
18 Feb '09
Module: wine Branch: master Commit: 99a7ed9f4fcd638e21d600e7fbc7972dc772d8f6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=99a7ed9f4fcd638e21d600e7f…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Tue Feb 17 10:28:54 2009 -0600 wininet: When cracking a cookie url discard the webpage and ensure at least a path of '/'. --- dlls/wininet/cookie.c | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/dlls/wininet/cookie.c b/dlls/wininet/cookie.c index 1a4b5fb..60afc03 100644 --- a/dlls/wininet/cookie.c +++ b/dlls/wininet/cookie.c @@ -181,6 +181,7 @@ static cookie_domain *COOKIE_addDomain(LPCWSTR domain, LPCWSTR path) static BOOL COOKIE_crackUrlSimple(LPCWSTR lpszUrl, LPWSTR hostName, int hostNameLen, LPWSTR path, int pathLen) { URL_COMPONENTSW UrlComponents; + BOOL rc; UrlComponents.lpszExtraInfo = NULL; UrlComponents.lpszPassword = NULL; @@ -195,7 +196,22 @@ static BOOL COOKIE_crackUrlSimple(LPCWSTR lpszUrl, LPWSTR hostName, int hostName UrlComponents.dwHostNameLength = hostNameLen; UrlComponents.dwUrlPathLength = pathLen; - return InternetCrackUrlW(lpszUrl, 0, 0, &UrlComponents); + rc = InternetCrackUrlW(lpszUrl, 0, 0, &UrlComponents); + + /* discard the webpage off the end of the path */ + if (pathLen > 0 && path[pathLen-1] != '/') + { + LPWSTR ptr; + ptr = strrchrW(path,'/'); + if (ptr) + *(++ptr) = 0; + else + { + path[0] = '/'; + path[1] = 0; + } + } + return rc; } /* match a domain. domain must match if the domain is not NULL. path must match if the path is not NULL */
1
0
0
0
Aric Stewart : wininet: Parse cookie information from cookie value.
by Alexandre Julliard
18 Feb '09
18 Feb '09
Module: wine Branch: master Commit: 8aa93c41f0f3dd772d09883968ada19a5ab0a724 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8aa93c41f0f3dd772d0988396…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Tue Feb 17 10:28:46 2009 -0600 wininet: Parse cookie information from cookie value. --- dlls/wininet/cookie.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 49 insertions(+), 3 deletions(-) diff --git a/dlls/wininet/cookie.c b/dlls/wininet/cookie.c index c6352c8..1a4b5fb 100644 --- a/dlls/wininet/cookie.c +++ b/dlls/wininet/cookie.c @@ -409,6 +409,48 @@ static BOOL set_cookie(LPCWSTR domain, LPCWSTR path, LPCWSTR cookie_name, LPCWST cookie_domain *thisCookieDomain = NULL; cookie *thisCookie; struct list *cursor; + LPWSTR data; + WCHAR *ptr; + + data = HeapAlloc(GetProcessHeap(),0,(lstrlenW(cookie_data)+1) * sizeof(WCHAR)); + strcpyW(data,cookie_data); + + /* lots of informations can be parsed out of the cookie value */ + + ptr = data; + for (;;) + { + static const WCHAR szDomain[] = {'d','o','m','a','i','n','=',0}; + static const WCHAR szPath[] = {'p','a','t','h','=',0}; + static const WCHAR szExpires[] = {'e','x','p','i','r','e','s','=',0}; + static const WCHAR szSecure[] = {'s','e','c','u','r','e',0}; + static const WCHAR szHttpOnly[] = {'h','t','t','p','o','n','l','y',0}; + + if (!(ptr = strchrW(ptr,';'))) break; + *ptr++ = 0; + while (*ptr == ' ') ptr++; /* whitespace */ + + if (strncmpiW(ptr, szDomain, 7) == 0) + { + ptr+=strlenW(szDomain); + domain = ptr; + TRACE("Parsing new domain %s\n",debugstr_w(domain)); + } + else if (strncmpiW(ptr, szPath, 5) == 0) + { + ptr+=strlenW(szPath); + path = ptr; + TRACE("Parsing new path %s\n",debugstr_w(path)); + } + else if (strncmpiW(ptr, szExpires, 8) == 0) + FIXME("expires not handled (%s)\n",debugstr_w(ptr)); + else if (strncmpiW(ptr, szSecure, 6) == 0) + FIXME("secure not handled (%s)\n",debugstr_w(ptr)); + else if (strncmpiW(ptr, szHttpOnly, 8) == 0) + FIXME("httponly not handled (%s)\n",debugstr_w(ptr)); + else + FIXME("Unknown additional option %s\n",debugstr_w(ptr)); + } LIST_FOR_EACH(cursor, &domain_list) { @@ -425,11 +467,15 @@ static BOOL set_cookie(LPCWSTR domain, LPCWSTR path, LPCWSTR cookie_name, LPCWST COOKIE_deleteCookie(thisCookie, FALSE); TRACE("setting cookie %s=%s for domain %s\n", debugstr_w(cookie_name), - debugstr_w(cookie_data), debugstr_w(thisCookieDomain->lpCookieDomain)); + debugstr_w(data), debugstr_w(thisCookieDomain->lpCookieDomain)); - if (!COOKIE_addCookie(thisCookieDomain, cookie_name, cookie_data)) + if (!COOKIE_addCookie(thisCookieDomain, cookie_name,data)) + { + HeapFree(GetProcessHeap(),0,data); return FALSE; + } + HeapFree(GetProcessHeap(),0,data); return TRUE; } @@ -479,7 +525,7 @@ BOOL WINAPI InternetSetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName, * the cookie data in the form of name[=data]. */ if (!(data = strchrW(cookie, '='))) data = cookie + len; - else data++; + else *data++ = 0; ret = set_cookie(hostName, path, cookie, data);
1
0
0
0
Michael Stefaniuc : msacm32: Fix some Win64 problems.
by Alexandre Julliard
18 Feb '09
18 Feb '09
Module: wine Branch: master Commit: 9b228bb789607ac91bf63b5e8a65b06c8a0ba160 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9b228bb789607ac91bf63b5e8…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Feb 17 22:36:06 2009 +0100 msacm32: Fix some Win64 problems. - dwInstance and dwDriver are a DWORD_PTR. - acmF*Enum functions take a DWORD_PTR as 4th parameter. - The last parameter of SendDlgItemMessage and MSACM_Message is a LPARAM. --- dlls/msacm32/filter.c | 20 ++++++++++---------- dlls/msacm32/format.c | 38 +++++++++++++++++++------------------- dlls/msacm32/pcmconverter.c | 2 +- dlls/msacm32/stream.c | 2 +- 4 files changed, 31 insertions(+), 31 deletions(-) diff --git a/dlls/msacm32/filter.c b/dlls/msacm32/filter.c index 37b807e..9d70773 100644 --- a/dlls/msacm32/filter.c +++ b/dlls/msacm32/filter.c @@ -137,9 +137,9 @@ MMRESULT WINAPI acmFilterDetailsW(HACMDRIVER had, PACMFILTERDETAILSW pafd, } struct MSACM_FilterEnumWtoA_Instance { - PACMFILTERDETAILSA pafda; - DWORD dwInstance; - ACMFILTERENUMCBA fnCallback; + PACMFILTERDETAILSA pafda; + DWORD_PTR dwInstance; + ACMFILTERENUMCBA fnCallback; }; static BOOL CALLBACK MSACM_FilterEnumCallbackWtoA(HACMDRIVERID hadid, @@ -183,13 +183,13 @@ MMRESULT WINAPI acmFilterEnumA(HACMDRIVER had, PACMFILTERDETAILSA pafda, afei.fnCallback = fnCallback; return acmFilterEnumW(had, &afdw, MSACM_FilterEnumCallbackWtoA, - (DWORD)&afei, fdwEnum); + (DWORD_PTR)&afei, fdwEnum); } static BOOL MSACM_FilterEnumHelper(PWINE_ACMDRIVERID padid, HACMDRIVER had, PACMFILTERDETAILSW pafd, - ACMFILTERENUMCBW fnCallback, DWORD dwInstance, - DWORD fdwEnum) + ACMFILTERENUMCBW fnCallback, + DWORD_PTR dwInstance, DWORD fdwEnum) { ACMFILTERTAGDETAILSW aftd; unsigned int i, j; @@ -368,9 +368,9 @@ MMRESULT WINAPI acmFilterTagDetailsW(HACMDRIVER had, PACMFILTERTAGDETAILSW paftd } struct MSACM_FilterTagEnumWtoA_Instance { - PACMFILTERTAGDETAILSA paftda; - DWORD dwInstance; - ACMFILTERTAGENUMCBA fnCallback; + PACMFILTERTAGDETAILSA paftda; + DWORD_PTR dwInstance; + ACMFILTERTAGENUMCBA fnCallback; }; static BOOL CALLBACK MSACM_FilterTagEnumCallbackWtoA(HACMDRIVERID hadid, @@ -414,7 +414,7 @@ MMRESULT WINAPI acmFilterTagEnumA(HACMDRIVER had, PACMFILTERTAGDETAILSA paftda, aftei.fnCallback = fnCallback; return acmFilterTagEnumW(had, &aftdw, MSACM_FilterTagEnumCallbackWtoA, - (DWORD)&aftei, fdwEnum); + (DWORD_PTR)&aftei, fdwEnum); } /*********************************************************************** diff --git a/dlls/msacm32/format.c b/dlls/msacm32/format.c index 31e0c55..0d5149c 100644 --- a/dlls/msacm32/format.c +++ b/dlls/msacm32/format.c @@ -62,10 +62,10 @@ static BOOL CALLBACK MSACM_FillFormatTagsCB(HACMDRIVERID hadid, switch (affd->mode) { case WINE_ACMFF_TAG: if (SendDlgItemMessageA(affd->hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, - CB_FINDSTRINGEXACT, - (WPARAM)-1, (LPARAM)paftd->szFormatTag) == CB_ERR) + CB_FINDSTRINGEXACT, -1, + (LPARAM)paftd->szFormatTag) == CB_ERR) SendDlgItemMessageA(affd->hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, - CB_ADDSTRING, 0, (DWORD)paftd->szFormatTag); + CB_ADDSTRING, 0, (LPARAM)paftd->szFormatTag); break; case WINE_ACMFF_FORMAT: if (strcmp(affd->szFormatTag, paftd->szFormatTag) == 0) { @@ -97,7 +97,7 @@ static BOOL CALLBACK MSACM_FillFormatTagsCB(HACMDRIVERID hadid, (afd.pwfx->nAvgBytesPerSec + 512) / 1024); SendDlgItemMessageA(affd->hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMAT, - CB_ADDSTRING, 0, (DWORD)buffer); + CB_ADDSTRING, 0, (LPARAM)buffer); } } acmDriverClose(had, 0); @@ -145,7 +145,7 @@ static BOOL MSACM_FillFormatTags(HWND hWnd) affd.hWnd = hWnd; affd.mode = WINE_ACMFF_TAG; - acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD)&affd, 0); + acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD_PTR)&affd, 0); SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, CB_SETCURSEL, 0, 0); return TRUE; } @@ -166,9 +166,9 @@ static BOOL MSACM_FillFormat(HWND hWnd) CB_GETLBTEXT, SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, CB_GETCURSEL, 0, 0), - (DWORD)affd.szFormatTag); + (LPARAM)affd.szFormatTag); - acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD)&affd, 0); + acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD_PTR)&affd, 0); SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMAT, CB_SETCURSEL, 0, 0); return TRUE; } @@ -189,9 +189,9 @@ static MMRESULT MSACM_GetWFX(HWND hWnd, PACMFORMATCHOOSEA afc) CB_GETLBTEXT, SendDlgItemMessageA(hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, CB_GETCURSEL, 0, 0), - (DWORD)affd.szFormatTag); + (LPARAM)affd.szFormatTag); - acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD)&affd, 0); + acmFormatTagEnumA(NULL, &aftd, MSACM_FillFormatTagsCB, (DWORD_PTR)&affd, 0); return affd.ret; } @@ -377,9 +377,9 @@ MMRESULT WINAPI acmFormatDetailsW(HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD } struct MSACM_FormatEnumWtoA_Instance { - PACMFORMATDETAILSA pafda; - DWORD dwInstance; - ACMFORMATENUMCBA fnCallback; + PACMFORMATDETAILSA pafda; + DWORD_PTR dwInstance; + ACMFORMATENUMCBA fnCallback; }; static BOOL CALLBACK MSACM_FormatEnumCallbackWtoA(HACMDRIVERID hadid, @@ -429,7 +429,7 @@ MMRESULT WINAPI acmFormatEnumA(HACMDRIVER had, PACMFORMATDETAILSA pafda, afei.fnCallback = fnCallback; return acmFormatEnumW(had, &afdw, MSACM_FormatEnumCallbackWtoA, - (DWORD)&afei, fdwEnum); + (DWORD_PTR)&afei, fdwEnum); } /*********************************************************************** @@ -437,8 +437,8 @@ MMRESULT WINAPI acmFormatEnumA(HACMDRIVER had, PACMFORMATDETAILSA pafda, */ static BOOL MSACM_FormatEnumHelper(PWINE_ACMDRIVERID padid, HACMDRIVER had, PACMFORMATDETAILSW pafd, PWAVEFORMATEX pwfxRef, - ACMFORMATENUMCBW fnCallback, DWORD dwInstance, - DWORD fdwEnum) + ACMFORMATENUMCBW fnCallback, + DWORD_PTR dwInstance, DWORD fdwEnum) { ACMFORMATTAGDETAILSW aftd; unsigned int i, j; @@ -705,9 +705,9 @@ MMRESULT WINAPI acmFormatTagDetailsW(HACMDRIVER had, PACMFORMATTAGDETAILSW paftd } struct MSACM_FormatTagEnumWtoA_Instance { - PACMFORMATTAGDETAILSA paftda; - DWORD dwInstance; - ACMFORMATTAGENUMCBA fnCallback; + PACMFORMATTAGDETAILSA paftda; + DWORD_PTR dwInstance; + ACMFORMATTAGENUMCBA fnCallback; }; static BOOL CALLBACK MSACM_FormatTagEnumCallbackWtoA(HACMDRIVERID hadid, @@ -760,7 +760,7 @@ MMRESULT WINAPI acmFormatTagEnumA(HACMDRIVER had, PACMFORMATTAGDETAILSA paftda, aftei.fnCallback = fnCallback; return acmFormatTagEnumW(had, &aftdw, MSACM_FormatTagEnumCallbackWtoA, - (DWORD)&aftei, fdwEnum); + (DWORD_PTR)&aftei, fdwEnum); } /*********************************************************************** diff --git a/dlls/msacm32/pcmconverter.c b/dlls/msacm32/pcmconverter.c index 62c359c..7d041c9 100644 --- a/dlls/msacm32/pcmconverter.c +++ b/dlls/msacm32/pcmconverter.c @@ -894,7 +894,7 @@ static LRESULT PCM_StreamOpen(PACMDRVSTREAMINSTANCE adsi) return MMSYSERR_NOMEM; } - adsi->dwDriver = (DWORD)apd; + adsi->dwDriver = (DWORD_PTR)apd; adsi->fdwDriver = 0; if (adsi->pwfxSrc->wBitsPerSample == 16) idx += 8; diff --git a/dlls/msacm32/stream.c b/dlls/msacm32/stream.c index a2065f3..10ce79b 100644 --- a/dlls/msacm32/stream.c +++ b/dlls/msacm32/stream.c @@ -330,7 +330,7 @@ MMRESULT WINAPI acmStreamPrepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash, padsh->pbPreparedDst = 0; padsh->cbPreparedDstLength = 0; - ret = MSACM_Message((HACMDRIVER)was->pDrv, ACMDM_STREAM_PREPARE, (LPARAM)&was->drvInst, (DWORD)padsh); + ret = MSACM_Message((HACMDRIVER)was->pDrv, ACMDM_STREAM_PREPARE, (LPARAM)&was->drvInst, (LPARAM)padsh); if (ret == MMSYSERR_NOERROR || ret == MMSYSERR_NOTSUPPORTED) { ret = MMSYSERR_NOERROR; padsh->fdwStatus &= ~(ACMSTREAMHEADER_STATUSF_DONE|ACMSTREAMHEADER_STATUSF_INQUEUE);
1
0
0
0
← Newer
1
...
35
36
37
38
39
40
41
...
97
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
Results per page:
10
25
50
100
200