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
November 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
2 participants
866 discussions
Start a n
N
ew thread
Andrew Eikum : shell32: Don't search Path or PIDL for an icon in IShellLink ::GetIconLocation.
by Alexandre Julliard
12 Nov '10
12 Nov '10
Module: wine Branch: master Commit: d66317605d2744a409db65170490243e1fffbf8b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d66317605d2744a409db65170…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Thu Nov 11 15:58:37 2010 -0600 shell32: Don't search Path or PIDL for an icon in IShellLink::GetIconLocation. Try as I might, I couldn't get a path out of GetIconLocation that wasn't put there via SetIconLocation. As far as I can tell, the code here was based on nothing. --- dlls/shell32/shelllink.c | 126 +-------------------------------------- dlls/shell32/tests/shelllink.c | 64 ++++++++++++++++++++- 2 files changed, 66 insertions(+), 124 deletions(-) diff --git a/dlls/shell32/shelllink.c b/dlls/shell32/shelllink.c index a052a18..b4a977a 100644 --- a/dlls/shell32/shelllink.c +++ b/dlls/shell32/shelllink.c @@ -1593,78 +1593,19 @@ static HRESULT WINAPI IShellLinkA_fnSetShowCmd(IShellLinkA * iface, INT iShowCmd return NOERROR; } -static HRESULT SHELL_PidlGeticonLocationA(IShellFolder* psf, LPCITEMIDLIST pidl, - LPSTR pszIconPath, int cchIconPath, int* piIcon) -{ - LPCITEMIDLIST pidlLast; - - HRESULT hr = SHBindToParent(pidl, &IID_IShellFolder, (LPVOID*)&psf, &pidlLast); - - if (SUCCEEDED(hr)) { - IExtractIconA* pei; - - hr = IShellFolder_GetUIObjectOf(psf, 0, 1, &pidlLast, &IID_IExtractIconA, NULL, (LPVOID*)&pei); - - if (SUCCEEDED(hr)) { - hr = IExtractIconA_GetIconLocation(pei, 0, pszIconPath, MAX_PATH, piIcon, NULL); - - IExtractIconA_Release(pei); - } - - IShellFolder_Release(psf); - } - - return hr; -} - static HRESULT WINAPI IShellLinkA_fnGetIconLocation(IShellLinkA * iface, LPSTR pszIconPath,INT cchIconPath,INT *piIcon) { IShellLinkImpl *This = (IShellLinkImpl *)iface; TRACE("(%p)->(%p len=%u iicon=%p)\n", This, pszIconPath, cchIconPath, piIcon); - pszIconPath[0] = 0; *piIcon = This->iIcoNdx; if (This->sIcoPath) - { WideCharToMultiByte(CP_ACP, 0, This->sIcoPath, -1, pszIconPath, cchIconPath, NULL, NULL); - return S_OK; - } - - if (This->pPidl || This->sPath) - { - IShellFolder* pdsk; - - HRESULT hr = SHGetDesktopFolder(&pdsk); - - if (SUCCEEDED(hr)) - { - /* first look for an icon using the PIDL (if present) */ - if (This->pPidl) - hr = SHELL_PidlGeticonLocationA(pdsk, This->pPidl, pszIconPath, cchIconPath, piIcon); - else - hr = E_FAIL; - - /* if we couldn't find an icon yet, look for it using the file system path */ - if (FAILED(hr) && This->sPath) - { - LPITEMIDLIST pidl; - - hr = IShellFolder_ParseDisplayName(pdsk, 0, NULL, This->sPath, NULL, &pidl, NULL); - - if (SUCCEEDED(hr)) { - hr = SHELL_PidlGeticonLocationA(pdsk, pidl, pszIconPath, cchIconPath, piIcon); - - SHFree(pidl); - } - } - - IShellFolder_Release(pdsk); - } + else + pszIconPath[0] = 0; - return hr; - } return S_OK; } @@ -1984,78 +1925,19 @@ static HRESULT WINAPI IShellLinkW_fnSetShowCmd(IShellLinkW * iface, INT iShowCmd return S_OK; } -static HRESULT SHELL_PidlGeticonLocationW(IShellFolder* psf, LPCITEMIDLIST pidl, - LPWSTR pszIconPath, int cchIconPath, int* piIcon) -{ - LPCITEMIDLIST pidlLast; - - HRESULT hr = SHBindToParent(pidl, &IID_IShellFolder, (LPVOID*)&psf, &pidlLast); - - if (SUCCEEDED(hr)) { - IExtractIconW* pei; - - hr = IShellFolder_GetUIObjectOf(psf, 0, 1, &pidlLast, &IID_IExtractIconW, NULL, (LPVOID*)&pei); - - if (SUCCEEDED(hr)) { - hr = IExtractIconW_GetIconLocation(pei, 0, pszIconPath, MAX_PATH, piIcon, NULL); - - IExtractIconW_Release(pei); - } - - IShellFolder_Release(psf); - } - - return hr; -} - static HRESULT WINAPI IShellLinkW_fnGetIconLocation(IShellLinkW * iface, LPWSTR pszIconPath,INT cchIconPath,INT *piIcon) { IShellLinkImpl *This = impl_from_IShellLinkW(iface); TRACE("(%p)->(%p len=%u iicon=%p)\n", This, pszIconPath, cchIconPath, piIcon); - pszIconPath[0] = 0; *piIcon = This->iIcoNdx; if (This->sIcoPath) - { lstrcpynW(pszIconPath, This->sIcoPath, cchIconPath); - return S_OK; - } - - if (This->pPidl || This->sPath) - { - IShellFolder* pdsk; - - HRESULT hr = SHGetDesktopFolder(&pdsk); - - if (SUCCEEDED(hr)) - { - /* first look for an icon using the PIDL (if present) */ - if (This->pPidl) - hr = SHELL_PidlGeticonLocationW(pdsk, This->pPidl, pszIconPath, cchIconPath, piIcon); - else - hr = E_FAIL; - - /* if we couldn't find an icon yet, look for it using the file system path */ - if (FAILED(hr) && This->sPath) - { - LPITEMIDLIST pidl; - - hr = IShellFolder_ParseDisplayName(pdsk, 0, NULL, This->sPath, NULL, &pidl, NULL); - - if (SUCCEEDED(hr)) - { - hr = SHELL_PidlGeticonLocationW(pdsk, pidl, pszIconPath, cchIconPath, piIcon); - - SHFree(pidl); - } - } + else + pszIconPath[0] = 0; - IShellFolder_Release(pdsk); - } - return hr; - } return S_OK; } diff --git a/dlls/shell32/tests/shelllink.c b/dlls/shell32/tests/shelllink.c index 55ba936..2277e5e 100644 --- a/dlls/shell32/tests/shelllink.c +++ b/dlls/shell32/tests/shelllink.c @@ -325,8 +325,8 @@ static void test_get_set(void) strcpy(buffer,"garbage"); r = IShellLinkA_GetIconLocation(sl, buffer, sizeof(buffer), &i); ok(r == S_OK, "GetIconLocation failed (0x%08x)\n", r); - todo_wine ok(*buffer=='\0', "GetIconLocation returned '%s'\n", buffer); - todo_wine ok(i==0, "GetIconLocation returned %d\n", i); + ok(*buffer=='\0', "GetIconLocation returned '%s'\n", buffer); + ok(i==0, "GetIconLocation returned %d\n", i); str="c:\\nonexistent\\file"; r = IShellLinkA_SetIconLocation(sl, str, 0xbabecafe); @@ -868,6 +868,65 @@ static void test_shdefextracticon(void) ok(SUCCEEDED(res), "SHDefExtractIconA failed, res=%x\n", res); } +static void test_GetIconLocation(void) +{ + IShellLinkA *sl; + const char *str; + char buffer[INFOTIPSIZE], mypath[MAX_PATH]; + int i; + HRESULT r; + LPITEMIDLIST pidl; + + r = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, + &IID_IShellLinkA, (LPVOID*)&sl); + ok(r == S_OK, "no IID_IShellLinkA (0x%08x)\n", r); + if(r != S_OK) + return; + + i = 0xdeadbeef; + strcpy(buffer, "garbage"); + r = IShellLinkA_GetIconLocation(sl, buffer, sizeof(buffer), &i); + ok(r == S_OK, "GetIconLocation failed (0x%08x)\n", r); + ok(*buffer == '\0', "GetIconLocation returned '%s'\n", buffer); + ok(i == 0, "GetIconLocation returned %d\n", i); + + str = "c:\\some\\path"; + r = IShellLinkA_SetPath(sl, str); + ok(r == S_FALSE || r == S_OK, "SetPath failed (0x%08x)\n", r); + + i = 0xdeadbeef; + strcpy(buffer, "garbage"); + r = IShellLinkA_GetIconLocation(sl, buffer, sizeof(buffer), &i); + ok(r == S_OK, "GetIconLocation failed (0x%08x)\n", r); + ok(*buffer == '\0', "GetIconLocation returned '%s'\n", buffer); + ok(i == 0, "GetIconLocation returned %d\n", i); + + GetWindowsDirectoryA(mypath, sizeof(mypath) - 12); + strcat(mypath, "\\regedit.exe"); + pidl = path_to_pidl(mypath); + r = IShellLinkA_SetIDList(sl, pidl); + ok(r == S_OK, "SetPath failed (0x%08x)\n", r); + + i = 0xdeadbeef; + strcpy(buffer, "garbage"); + r = IShellLinkA_GetIconLocation(sl, buffer, sizeof(buffer), &i); + ok(r == S_OK, "GetIconLocation failed (0x%08x)\n", r); + ok(*buffer == '\0', "GetIconLocation returned '%s'\n", buffer); + ok(i == 0, "GetIconLocation returned %d\n", i); + + str = "c:\\nonexistent\\file"; + r = IShellLinkA_SetIconLocation(sl, str, 0xbabecafe); + ok(r == S_OK, "SetIconLocation failed (0x%08x)\n", r); + + i = 0xdeadbeef; + r = IShellLinkA_GetIconLocation(sl, buffer, sizeof(buffer), &i); + ok(r == S_OK, "GetIconLocation failed (0x%08x)\n", r); + ok(lstrcmpi(buffer,str) == 0, "GetIconLocation returned '%s'\n", buffer); + ok(i == 0xbabecafe, "GetIconLocation returned %d'\n", i); + + IShellLinkA_Release(sl); +} + START_TEST(shelllink) { HRESULT r; @@ -891,6 +950,7 @@ START_TEST(shelllink) test_load_save(); test_datalink(); test_shdefextracticon(); + test_GetIconLocation(); CoUninitialize(); }
1
0
0
0
Andrew Eikum : shell32: Don't fail if the path doesn' t exist in Unix in IShellFolder::ParseDisplayName.
by Alexandre Julliard
12 Nov '10
12 Nov '10
Module: wine Branch: master Commit: f324f3c31ef4b0a6b5273aca534c173d68932462 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f324f3c31ef4b0a6b5273aca5…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Thu Nov 11 15:58:12 2010 -0600 shell32: Don't fail if the path doesn't exist in Unix in IShellFolder::ParseDisplayName. --- dlls/shell32/shfldr_unixfs.c | 25 +++++++++++++++++---- dlls/shell32/tests/shelllink.c | 10 ++------ dlls/shell32/tests/shlfolder.c | 47 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 12 deletions(-) diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c index 11f3686..14bf900 100644 --- a/dlls/shell32/shfldr_unixfs.c +++ b/dlls/shell32/shfldr_unixfs.c @@ -368,8 +368,8 @@ static inline BOOL UNIXFS_is_pidl_of_type(LPCITEMIDLIST pIDL, SHCONTF fFilter) { */ static BOOL UNIXFS_get_unix_path(LPCWSTR pszDosPath, char *pszCanonicalPath) { - char *pPathTail, *pElement, *pCanonicalTail, szPath[FILENAME_MAX], *pszUnixPath; - WCHAR wszDrive[] = { '?', ':', '\\', 0 }; + char *pPathTail, *pElement, *pCanonicalTail, szPath[FILENAME_MAX], *pszUnixPath, has_failed = 0, mb_path[FILENAME_MAX]; + WCHAR wszDrive[] = { '?', ':', '\\', 0 }, dospath[PATH_MAX], *dospath_end; int cDriveSymlinkLen; TRACE("(pszDosPath=%s, pszCanonicalPath=%p)\n", debugstr_w(pszDosPath), pszCanonicalPath); @@ -388,11 +388,26 @@ static BOOL UNIXFS_get_unix_path(LPCWSTR pszDosPath, char *pszCanonicalPath) if (szPath[strlen(szPath)-1] != '/') strcat(szPath, "/"); /* Append the part relative to the drive symbolic link target. */ - pszUnixPath = wine_get_unix_file_name(pszDosPath); - if (!pszUnixPath) return FALSE; + lstrcpyW(dospath, pszDosPath); + dospath_end = dospath + lstrlenW(dospath); + while(!(pszUnixPath = wine_get_unix_file_name(dospath))){ + if(has_failed) + *dospath_end = '/'; + else + has_failed = 1; + while(*dospath_end != '\\' && *dospath_end != '/') + --dospath_end; + *dospath_end = '\0'; + } strcat(szPath, pszUnixPath + cDriveSymlinkLen); HeapFree(GetProcessHeap(), 0, pszUnixPath); - + + if(has_failed && WideCharToMultiByte(CP_UNIXCP, 0, dospath_end + 1, -1, + mb_path, FILENAME_MAX, NULL, NULL) > 0){ + strcat(szPath, "/"); + strcat(szPath, mb_path); + } + /* pCanonicalTail always points to the end of the canonical path constructed * thus far. pPathTail points to the still to be processed part of the input * path. pElement points to the path element currently investigated. diff --git a/dlls/shell32/tests/shelllink.c b/dlls/shell32/tests/shelllink.c index 1b38b0d..55ba936 100644 --- a/dlls/shell32/tests/shelllink.c +++ b/dlls/shell32/tests/shelllink.c @@ -204,16 +204,14 @@ static void test_get_set(void) /* Test the interaction of SetPath and SetIDList */ tmp_pidl=NULL; r = IShellLinkA_GetIDList(sl, &tmp_pidl); - todo_wine ok(r == S_OK, "GetIDList failed (0x%08x)\n", r); + ok(r == S_OK, "GetIDList failed (0x%08x)\n", r); if (r == S_OK) { BOOL ret; strcpy(buffer,"garbage"); ret = SHGetPathFromIDListA(tmp_pidl, buffer); - todo_wine { ok(ret, "SHGetPathFromIDListA failed\n"); - } if (ret) ok(lstrcmpi(buffer,str)==0, "GetIDList returned '%s'\n", buffer); pILFree(tmp_pidl); @@ -326,11 +324,9 @@ static void test_get_set(void) i=0xdeadbeef; strcpy(buffer,"garbage"); r = IShellLinkA_GetIconLocation(sl, buffer, sizeof(buffer), &i); - todo_wine { ok(r == S_OK, "GetIconLocation failed (0x%08x)\n", r); - } - ok(*buffer=='\0', "GetIconLocation returned '%s'\n", buffer); - ok(i==0, "GetIconLocation returned %d\n", i); + todo_wine ok(*buffer=='\0', "GetIconLocation returned '%s'\n", buffer); + todo_wine ok(i==0, "GetIconLocation returned %d\n", i); str="c:\\nonexistent\\file"; r = IShellLinkA_SetIconLocation(sl, str, 0xbabecafe); diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c index 67a9630..6294c5d 100644 --- a/dlls/shell32/tests/shlfolder.c +++ b/dlls/shell32/tests/shlfolder.c @@ -4041,6 +4041,7 @@ static void test_ParseDisplayNamePBC(void) WCHAR wFileSystemBindData[] = {'F','i','l','e',' ','S','y','s','t','e','m',' ','B','i','n','d',' ','D','a','t','a',0}; WCHAR adirW[] = {'C',':','\\','f','s','b','d','d','i','r',0}; + WCHAR afileW[] = {'C',':','\\','f','s','b','d','d','i','r','\\','f','i','l','e','.','t','x','t',0}; const HRESULT exp_err = HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); IShellFolder *psf; @@ -4067,6 +4068,9 @@ static void test_ParseDisplayNamePBC(void) hres = IShellFolder_ParseDisplayName(psf, NULL, NULL, adirW, NULL, &pidl, NULL); ok(hres == exp_err || broken(hres == E_FAIL) /* NT4 */, "ParseDisplayName failed with wrong error: 0x%08x\n", hres); + hres = IShellFolder_ParseDisplayName(psf, NULL, NULL, afileW, NULL, &pidl, NULL); + ok(hres == exp_err || broken(hres == E_FAIL) /* NT4 */, + "ParseDisplayName failed with wrong error: 0x%08x\n", hres); /* fails on unknown dir with IBindCtx with no IFileSystemBindData */ hres = CreateBindCtx(0, &pbc); @@ -4075,6 +4079,9 @@ static void test_ParseDisplayNamePBC(void) hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, adirW, NULL, &pidl, NULL); ok(hres == exp_err || broken(hres == E_FAIL) /* NT4 */, "ParseDisplayName failed with wrong error: 0x%08x\n", hres); + hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afileW, NULL, &pidl, NULL); + ok(hres == exp_err || broken(hres == E_FAIL) /* NT4 */, + "ParseDisplayName failed with wrong error: 0x%08x\n", hres); /* unknown dir with IBindCtx with IFileSystemBindData */ hres = IBindCtx_RegisterObjectParam(pbc, wFileSystemBindData, (IUnknown*)&fsbd); @@ -4091,6 +4098,14 @@ static void test_ParseDisplayNamePBC(void) ILFree(pidl); } + hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afileW, NULL, &pidl, NULL); + ok(hres == S_OK || broken(hres == E_FAIL) /* NT4 */, + "ParseDisplayName failed: 0x%08x\n", hres); + if(SUCCEEDED(hres)){ + verify_pidl(pidl, afileW); + ILFree(pidl); + } + /* set FIND_DATA struct to NULLs */ pidl = (ITEMIDLIST*)0xdeadbeef; fsbdVtbl.GetFindData = fsbd_GetFindData_nul; @@ -4102,6 +4117,14 @@ static void test_ParseDisplayNamePBC(void) ILFree(pidl); } + hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afileW, NULL, &pidl, NULL); + ok(hres == S_OK || broken(hres == E_FAIL) /* NT4 */, + "ParseDisplayName failed: 0x%08x\n", hres); + if(SUCCEEDED(hres)){ + verify_pidl(pidl, afileW); + ILFree(pidl); + } + /* set FIND_DATA struct to junk */ pidl = (ITEMIDLIST*)0xdeadbeef; fsbdVtbl.GetFindData = fsbd_GetFindData_junk; @@ -4113,6 +4136,14 @@ static void test_ParseDisplayNamePBC(void) ILFree(pidl); } + hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afileW, NULL, &pidl, NULL); + ok(hres == S_OK || broken(hres == E_FAIL) /* NT4 */, + "ParseDisplayName failed: 0x%08x\n", hres); + if(SUCCEEDED(hres)){ + verify_pidl(pidl, afileW); + ILFree(pidl); + } + /* set FIND_DATA struct to invalid data */ pidl = (ITEMIDLIST*)0xdeadbeef; fsbdVtbl.GetFindData = fsbd_GetFindData_invalid; @@ -4124,6 +4155,14 @@ static void test_ParseDisplayNamePBC(void) ILFree(pidl); } + hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afileW, NULL, &pidl, NULL); + ok(hres == S_OK || broken(hres == E_FAIL) /* NT4 */, + "ParseDisplayName failed: 0x%08x\n", hres); + if(SUCCEEDED(hres)){ + verify_pidl(pidl, afileW); + ILFree(pidl); + } + /* set FIND_DATA struct to valid data */ pidl = (ITEMIDLIST*)0xdeadbeef; fsbdVtbl.GetFindData = fsbd_GetFindData_valid; @@ -4135,6 +4174,14 @@ static void test_ParseDisplayNamePBC(void) ILFree(pidl); } + hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afileW, NULL, &pidl, NULL); + ok(hres == S_OK || broken(hres == E_FAIL) /* NT4 */, + "ParseDisplayName failed: 0x%08x\n", hres); + if(SUCCEEDED(hres)){ + verify_pidl(pidl, afileW); + ILFree(pidl); + } + IBindCtx_Release(pbc); IShellFolder_Release(psf); }
1
0
0
0
Nikolay Sivov : msxml3: Don't include assert.h where it's not used.
by Alexandre Julliard
12 Nov '10
12 Nov '10
Module: wine Branch: master Commit: 5240bae30892453e8a8e6c3503041f37363451e3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5240bae30892453e8a8e6c350…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Nov 11 23:44:14 2010 +0300 msxml3: Don't include assert.h where it's not used. --- dlls/msxml3/bsc.c | 1 - dlls/msxml3/dispex.c | 1 - dlls/msxml3/node.c | 1 - dlls/msxml3/parseerror.c | 1 - dlls/msxml3/saxreader.c | 1 - dlls/msxml3/schema.c | 1 - 6 files changed, 0 insertions(+), 6 deletions(-) diff --git a/dlls/msxml3/bsc.c b/dlls/msxml3/bsc.c index cd3d456..020a6e5 100644 --- a/dlls/msxml3/bsc.c +++ b/dlls/msxml3/bsc.c @@ -22,7 +22,6 @@ #include "config.h" #include <stdarg.h> -#include <assert.h> #include "windef.h" #include "winbase.h" #include "winuser.h" diff --git a/dlls/msxml3/dispex.c b/dlls/msxml3/dispex.c index 4afcc99..6afbb70 100644 --- a/dlls/msxml3/dispex.c +++ b/dlls/msxml3/dispex.c @@ -21,7 +21,6 @@ #include "config.h" #include <stdarg.h> -#include <assert.h> #include "windef.h" #include "winbase.h" #include "winuser.h" diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c index 221abc2..5ed2573 100644 --- a/dlls/msxml3/node.c +++ b/dlls/msxml3/node.c @@ -23,7 +23,6 @@ #define COBJMACROS #include <stdarg.h> -#include <assert.h> #include "windef.h" #include "winbase.h" #include "winuser.h" diff --git a/dlls/msxml3/parseerror.c b/dlls/msxml3/parseerror.c index 5193216..d5e4cde 100644 --- a/dlls/msxml3/parseerror.c +++ b/dlls/msxml3/parseerror.c @@ -24,7 +24,6 @@ #include "config.h" #include <stdarg.h> -#include <assert.h> #include "windef.h" #include "winbase.h" #include "winerror.h" diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index 4f88ffb..5a98c82 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -23,7 +23,6 @@ #include "config.h" #include <stdarg.h> -#include <assert.h> #include "windef.h" #include "winbase.h" #include "winuser.h" diff --git a/dlls/msxml3/schema.c b/dlls/msxml3/schema.c index 1ff4566..c9016ce 100644 --- a/dlls/msxml3/schema.c +++ b/dlls/msxml3/schema.c @@ -24,7 +24,6 @@ #include "config.h" #include <stdarg.h> -#include <assert.h> #include "windef.h" #include "winbase.h" #include "winuser.h"
1
0
0
0
Nikolay Sivov : msxml3: Fix a ::get_xml() for libxml2 without xmlSaveToBuffer.
by Alexandre Julliard
12 Nov '10
12 Nov '10
Module: wine Branch: master Commit: 9ec17a841d9a1116f658d24fadae1ba8e4a28beb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9ec17a841d9a1116f658d24fa…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Nov 11 23:08:33 2010 +0300 msxml3: Fix a ::get_xml() for libxml2 without xmlSaveToBuffer. --- dlls/msxml3/domdoc.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index e7c15e3..a7e7342 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -1281,6 +1281,10 @@ static HRESULT WINAPI domdoc_put_dataType( return IXMLDOMNode_put_dataType( IXMLDOMNode_from_impl(&This->node), dataTypeName ); } +static int XMLCALL domdoc_get_xml_writecallback(void *ctx, const char *data, int len) +{ + return xmlBufferAdd((xmlBufferPtr)ctx, (xmlChar*)data, len) == 0 ? len : 0; +} static HRESULT WINAPI domdoc_get_xml( IXMLDOMDocument3 *iface, @@ -1305,7 +1309,8 @@ static HRESULT WINAPI domdoc_get_xml( options = xmldoc_has_decl(get_doc(This)) ? XML_SAVE_NO_DECL : 0; options |= XML_SAVE_FORMAT; - ctxt = xmlSaveToBuffer(buf, "UTF-8", options); + ctxt = xmlSaveToIO(domdoc_get_xml_writecallback, NULL, buf, "UTF-8", options); + if(!ctxt) { xmlBufferFree(buf);
1
0
0
0
Alexandre Julliard : rpcrt4: Get rid of the ICOM_THIS_MULTI macro.
by Alexandre Julliard
12 Nov '10
12 Nov '10
Module: wine Branch: master Commit: dc9b648fcb587ddd9778f819f6641bbd5e04d226 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dc9b648fcb587ddd9778f819f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 11 20:21:57 2010 +0100 rpcrt4: Get rid of the ICOM_THIS_MULTI macro. --- dlls/rpcrt4/cproxy.c | 27 +++++++++++++++------------ 1 files changed, 15 insertions(+), 12 deletions(-) diff --git a/dlls/rpcrt4/cproxy.c b/dlls/rpcrt4/cproxy.c index b07dd7c..6bf0a43 100644 --- a/dlls/rpcrt4/cproxy.c +++ b/dlls/rpcrt4/cproxy.c @@ -58,7 +58,10 @@ typedef struct { static const IRpcProxyBufferVtbl StdProxy_Vtbl; -#define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field)) +static inline StdProxyImpl *impl_from_proxy_obj( void *iface ) +{ + return (StdProxyImpl *)((char*)iface - FIELD_OFFSET(StdProxyImpl, PVtbl)); +} #if defined(__i386__) @@ -229,7 +232,7 @@ HRESULT StdProxy_Construct(REFIID riid, static void StdProxy_Destruct(LPRPCPROXYBUFFER iface) { - ICOM_THIS_MULTI(StdProxyImpl,lpVtbl,iface); + StdProxyImpl *This = (StdProxyImpl *)iface; if (This->pChannel) IRpcProxyBuffer_Disconnect(iface); @@ -245,7 +248,7 @@ static HRESULT WINAPI StdProxy_QueryInterface(LPRPCPROXYBUFFER iface, REFIID riid, LPVOID *obj) { - ICOM_THIS_MULTI(StdProxyImpl,lpVtbl,iface); + StdProxyImpl *This = (StdProxyImpl *)iface; TRACE("(%p)->QueryInterface(%s,%p)\n",This,debugstr_guid(riid),obj); if (IsEqualGUID(&IID_IUnknown,riid) || @@ -266,7 +269,7 @@ static HRESULT WINAPI StdProxy_QueryInterface(LPRPCPROXYBUFFER iface, static ULONG WINAPI StdProxy_AddRef(LPRPCPROXYBUFFER iface) { - ICOM_THIS_MULTI(StdProxyImpl,lpVtbl,iface); + StdProxyImpl *This = (StdProxyImpl *)iface; TRACE("(%p)->AddRef()\n",This); return InterlockedIncrement(&This->RefCount); @@ -275,7 +278,7 @@ static ULONG WINAPI StdProxy_AddRef(LPRPCPROXYBUFFER iface) static ULONG WINAPI StdProxy_Release(LPRPCPROXYBUFFER iface) { ULONG refs; - ICOM_THIS_MULTI(StdProxyImpl,lpVtbl,iface); + StdProxyImpl *This = (StdProxyImpl *)iface; TRACE("(%p)->Release()\n",This); refs = InterlockedDecrement(&This->RefCount); @@ -287,7 +290,7 @@ static ULONG WINAPI StdProxy_Release(LPRPCPROXYBUFFER iface) static HRESULT WINAPI StdProxy_Connect(LPRPCPROXYBUFFER iface, LPRPCCHANNELBUFFER pChannel) { - ICOM_THIS_MULTI(StdProxyImpl,lpVtbl,iface); + StdProxyImpl *This = (StdProxyImpl *)iface; TRACE("(%p)->Connect(%p)\n",This,pChannel); This->pChannel = pChannel; @@ -298,7 +301,7 @@ static HRESULT WINAPI StdProxy_Connect(LPRPCPROXYBUFFER iface, static VOID WINAPI StdProxy_Disconnect(LPRPCPROXYBUFFER iface) { - ICOM_THIS_MULTI(StdProxyImpl,lpVtbl,iface); + StdProxyImpl *This = (StdProxyImpl *)iface; TRACE("(%p)->Disconnect()\n",This); if (This->base_proxy) IRpcProxyBuffer_Disconnect( This->base_proxy ); @@ -319,7 +322,7 @@ static const IRpcProxyBufferVtbl StdProxy_Vtbl = static void StdProxy_GetChannel(LPVOID iface, LPRPCCHANNELBUFFER *ppChannel) { - ICOM_THIS_MULTI(StdProxyImpl,PVtbl,iface); + StdProxyImpl *This = impl_from_proxy_obj( iface ); TRACE("(%p)->GetChannel(%p) %s\n",This,ppChannel,This->name); *ppChannel = This->pChannel; @@ -328,7 +331,7 @@ static void StdProxy_GetChannel(LPVOID iface, static void StdProxy_GetIID(LPVOID iface, const IID **ppiid) { - ICOM_THIS_MULTI(StdProxyImpl,PVtbl,iface); + StdProxyImpl *This = impl_from_proxy_obj( iface ); TRACE("(%p)->GetIID(%p) %s\n",This,ppiid,This->name); *ppiid = This->piid; @@ -338,21 +341,21 @@ HRESULT WINAPI IUnknown_QueryInterface_Proxy(LPUNKNOWN iface, REFIID riid, LPVOID *ppvObj) { - ICOM_THIS_MULTI(StdProxyImpl,PVtbl,iface); + StdProxyImpl *This = impl_from_proxy_obj( iface ); TRACE("(%p)->QueryInterface(%s,%p) %s\n",This,debugstr_guid(riid),ppvObj,This->name); return IUnknown_QueryInterface(This->pUnkOuter,riid,ppvObj); } ULONG WINAPI IUnknown_AddRef_Proxy(LPUNKNOWN iface) { - ICOM_THIS_MULTI(StdProxyImpl,PVtbl,iface); + StdProxyImpl *This = impl_from_proxy_obj( iface ); TRACE("(%p)->AddRef() %s\n",This,This->name); return IUnknown_AddRef(This->pUnkOuter); } ULONG WINAPI IUnknown_Release_Proxy(LPUNKNOWN iface) { - ICOM_THIS_MULTI(StdProxyImpl,PVtbl,iface); + StdProxyImpl *This = impl_from_proxy_obj( iface ); TRACE("(%p)->Release() %s\n",This,This->name); return IUnknown_Release(This->pUnkOuter); }
1
0
0
0
Alexandre Julliard : ole32: Get rid of the ICOM_THIS_MULTI macro.
by Alexandre Julliard
12 Nov '10
12 Nov '10
Module: wine Branch: master Commit: 54bf38575e85920f892e1fbea4c02832fd4ece33 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=54bf38575e85920f892e1fbea…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 11 20:16:59 2010 +0100 ole32: Get rid of the ICOM_THIS_MULTI macro. --- dlls/ole32/compobj_private.h | 23 --------------------- dlls/ole32/marshal.c | 45 +++++++++++++++++++++++++++++++++++------ 2 files changed, 38 insertions(+), 30 deletions(-) diff --git a/dlls/ole32/compobj_private.h b/dlls/ole32/compobj_private.h index 076d845..a00bdc9 100644 --- a/dlls/ole32/compobj_private.h +++ b/dlls/ole32/compobj_private.h @@ -120,27 +120,6 @@ struct ifproxy IRpcChannelBuffer *chan; /* channel to object (CS parent->cs) */ }; -/* imported object / proxy manager */ -struct proxy_manager -{ - const IMultiQIVtbl *lpVtbl; - const IMarshalVtbl *lpVtblMarshal; - const IClientSecurityVtbl *lpVtblCliSec; - struct apartment *parent; /* owning apartment (RO) */ - struct list entry; /* entry in apartment (CS parent->cs) */ - OXID oxid; /* object exported ID (RO) */ - OXID_INFO oxid_info; /* string binding, ipid of rem unknown and other information (RO) */ - OID oid; /* object ID (RO) */ - struct list interfaces; /* imported interfaces (CS cs) */ - LONG refs; /* proxy reference count (LOCK) */ - CRITICAL_SECTION cs; /* thread safety for this object and children */ - ULONG sorflags; /* STDOBJREF flags (RO) */ - IRemUnknown *remunk; /* proxy to IRemUnknown used for lifecycle management (CS cs) */ - HANDLE remoting_mutex; /* mutex used for synchronizing access to IRemUnknown */ - MSHCTX dest_context; /* context used for activating optimisations (LOCK) */ - void *dest_context_data; /* reserved context value (LOCK) */ -}; - struct apartment { struct list entry; @@ -297,8 +276,6 @@ static inline GUID COM_CurrentCausalityId(void) return info->causality_id; } -#define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field)) - /* helpers for debugging */ # define DEBUG_SET_CRITSEC_NAME(cs, name) (cs)->DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": " name) # define DEBUG_CLEAR_CRITSEC_NAME(cs) (cs)->DebugInfo->Spare[0] = 0 diff --git a/dlls/ole32/marshal.c b/dlls/ole32/marshal.c index d14516f..ab1d332 100644 --- a/dlls/ole32/marshal.c +++ b/dlls/ole32/marshal.c @@ -52,6 +52,37 @@ extern const CLSID CLSID_DfMarshal; * when the proxy disconnects or is destroyed */ #define SORFP_NOLIFETIMEMGMT SORF_OXRES2 +/* imported object / proxy manager */ +struct proxy_manager +{ + const IMultiQIVtbl *lpVtbl; + const IMarshalVtbl *lpVtblMarshal; + const IClientSecurityVtbl *lpVtblCliSec; + struct apartment *parent; /* owning apartment (RO) */ + struct list entry; /* entry in apartment (CS parent->cs) */ + OXID oxid; /* object exported ID (RO) */ + OXID_INFO oxid_info; /* string binding, ipid of rem unknown and other information (RO) */ + OID oid; /* object ID (RO) */ + struct list interfaces; /* imported interfaces (CS cs) */ + LONG refs; /* proxy reference count (LOCK) */ + CRITICAL_SECTION cs; /* thread safety for this object and children */ + ULONG sorflags; /* STDOBJREF flags (RO) */ + IRemUnknown *remunk; /* proxy to IRemUnknown used for lifecycle management (CS cs) */ + HANDLE remoting_mutex; /* mutex used for synchronizing access to IRemUnknown */ + MSHCTX dest_context; /* context used for activating optimisations (LOCK) */ + void *dest_context_data; /* reserved context value (LOCK) */ +}; + +static inline struct proxy_manager *impl_from_IMarshal( IMarshal *iface ) +{ + return (struct proxy_manager *)((char*)iface - FIELD_OFFSET(struct proxy_manager, lpVtblMarshal)); +} + +static inline struct proxy_manager *impl_from_IClientSecurity( IClientSecurity *iface ) +{ + return (struct proxy_manager *)((char*)iface - FIELD_OFFSET(struct proxy_manager, lpVtblCliSec)); +} + static HRESULT unmarshal_object(const STDOBJREF *stdobjref, APARTMENT *apt, MSHCTX dest_context, void *dest_context_data, REFIID riid, const OXID_INFO *oxid_info, @@ -352,19 +383,19 @@ static HRESULT WINAPI StdMarshalImpl_DisconnectObject(LPMARSHAL iface, DWORD dwR static HRESULT WINAPI Proxy_QueryInterface(IMarshal *iface, REFIID riid, void **ppvObject) { - ICOM_THIS_MULTI(struct proxy_manager, lpVtblMarshal, iface); + struct proxy_manager *This = impl_from_IMarshal( iface ); return IMultiQI_QueryInterface((IMultiQI *)&This->lpVtbl, riid, ppvObject); } static ULONG WINAPI Proxy_AddRef(IMarshal *iface) { - ICOM_THIS_MULTI(struct proxy_manager, lpVtblMarshal, iface); + struct proxy_manager *This = impl_from_IMarshal( iface ); return IMultiQI_AddRef((IMultiQI *)&This->lpVtbl); } static ULONG WINAPI Proxy_Release(IMarshal *iface) { - ICOM_THIS_MULTI(struct proxy_manager, lpVtblMarshal, iface); + struct proxy_manager *This = impl_from_IMarshal( iface ); return IMultiQI_Release((IMultiQI *)&This->lpVtbl); } @@ -372,7 +403,7 @@ static HRESULT WINAPI Proxy_MarshalInterface( LPMARSHAL iface, IStream *pStm, REFIID riid, void* pv, DWORD dwDestContext, void* pvDestContext, DWORD mshlflags) { - ICOM_THIS_MULTI(struct proxy_manager, lpVtblMarshal, iface); + struct proxy_manager *This = impl_from_IMarshal( iface ); HRESULT hr; struct ifproxy *ifproxy; @@ -497,19 +528,19 @@ static const IMarshalVtbl ProxyMarshal_Vtbl = static HRESULT WINAPI ProxyCliSec_QueryInterface(IClientSecurity *iface, REFIID riid, void **ppvObject) { - ICOM_THIS_MULTI(struct proxy_manager, lpVtblCliSec, iface); + struct proxy_manager *This = impl_from_IClientSecurity( iface ); return IMultiQI_QueryInterface((IMultiQI *)&This->lpVtbl, riid, ppvObject); } static ULONG WINAPI ProxyCliSec_AddRef(IClientSecurity *iface) { - ICOM_THIS_MULTI(struct proxy_manager, lpVtblCliSec, iface); + struct proxy_manager *This = impl_from_IClientSecurity( iface ); return IMultiQI_AddRef((IMultiQI *)&This->lpVtbl); } static ULONG WINAPI ProxyCliSec_Release(IClientSecurity *iface) { - ICOM_THIS_MULTI(struct proxy_manager, lpVtblCliSec, iface); + struct proxy_manager *This = impl_from_IClientSecurity( iface ); return IMultiQI_Release((IMultiQI *)&This->lpVtbl); }
1
0
0
0
Alexandre Julliard : oleaut32: Get rid of the ICOM_THIS_MULTI macro.
by Alexandre Julliard
12 Nov '10
12 Nov '10
Module: wine Branch: master Commit: 6682d86e156fb9b222c781ab92031890b2cb50d8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6682d86e156fb9b222c781ab9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 11 20:10:33 2010 +0100 oleaut32: Get rid of the ICOM_THIS_MULTI macro. --- dlls/oleaut32/tmarshal.c | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/dlls/oleaut32/tmarshal.c b/dlls/oleaut32/tmarshal.c index bfe17c8..9f0145d 100644 --- a/dlls/oleaut32/tmarshal.c +++ b/dlls/oleaut32/tmarshal.c @@ -54,8 +54,6 @@ static const WCHAR IDispatchW[] = { 'I','D','i','s','p','a','t','c','h',0}; WINE_DEFAULT_DEBUG_CHANNEL(ole); WINE_DECLARE_DEBUG_CHANNEL(olerelay); -#define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field)) - static HRESULT TMarshalDispatchChannel_Create( IRpcChannelBuffer *pDelegateChannel, REFIID tmarshal_riid, IRpcChannelBuffer **ppChannel); @@ -405,6 +403,11 @@ typedef struct _TMProxyImpl { IRpcProxyBuffer *dispatch_proxy; } TMProxyImpl; +static inline TMProxyImpl *impl_from_IRpcProxyBuffer( IRpcProxyBuffer *iface ) +{ + return (TMProxyImpl *)((char*)iface - FIELD_OFFSET(TMProxyImpl, lpvtbl2)); +} + static HRESULT WINAPI TMProxyImpl_QueryInterface(LPRPCPROXYBUFFER iface, REFIID riid, LPVOID *ppv) { @@ -421,7 +424,7 @@ TMProxyImpl_QueryInterface(LPRPCPROXYBUFFER iface, REFIID riid, LPVOID *ppv) static ULONG WINAPI TMProxyImpl_AddRef(LPRPCPROXYBUFFER iface) { - ICOM_THIS_MULTI(TMProxyImpl,lpvtbl2,iface); + TMProxyImpl *This = impl_from_IRpcProxyBuffer( iface ); ULONG refCount = InterlockedIncrement(&This->ref); TRACE("(%p)->(ref before=%u)\n",This, refCount - 1); @@ -432,7 +435,7 @@ TMProxyImpl_AddRef(LPRPCPROXYBUFFER iface) static ULONG WINAPI TMProxyImpl_Release(LPRPCPROXYBUFFER iface) { - ICOM_THIS_MULTI(TMProxyImpl,lpvtbl2,iface); + TMProxyImpl *This = impl_from_IRpcProxyBuffer( iface ); ULONG refCount = InterlockedDecrement(&This->ref); TRACE("(%p)->(ref before=%u)\n",This, refCount + 1); @@ -455,7 +458,7 @@ static HRESULT WINAPI TMProxyImpl_Connect( LPRPCPROXYBUFFER iface,IRpcChannelBuffer* pRpcChannelBuffer) { - ICOM_THIS_MULTI(TMProxyImpl, lpvtbl2, iface); + TMProxyImpl *This = impl_from_IRpcProxyBuffer( iface ); TRACE("(%p)\n", pRpcChannelBuffer); @@ -483,7 +486,7 @@ TMProxyImpl_Connect( static void WINAPI TMProxyImpl_Disconnect(LPRPCPROXYBUFFER iface) { - ICOM_THIS_MULTI(TMProxyImpl, lpvtbl2, iface); + TMProxyImpl *This = impl_from_IRpcProxyBuffer( iface ); TRACE("()\n");
1
0
0
0
Alexandre Julliard : avifil32: Fix the multiple inheritance implementation of edit streams.
by Alexandre Julliard
12 Nov '10
12 Nov '10
Module: wine Branch: master Commit: 469c55350c67e12ffa9228e4d5b9454178e998c8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=469c55350c67e12ffa9228e4d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 11 20:07:13 2010 +0100 avifil32: Fix the multiple inheritance implementation of edit streams. --- dlls/avifil32/avifile_private.h | 1 - dlls/avifil32/editstream.c | 191 ++++++++++----------------------------- 2 files changed, 50 insertions(+), 142 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=469c55350c67e12ffa922…
1
0
0
0
Jörg Höhle : winmm/tests: Fix test failure in multi-byte locale.
by Alexandre Julliard
11 Nov '10
11 Nov '10
Module: wine Branch: master Commit: c138970ea2ce0661ebb80a5e0079e284a19d3176 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c138970ea2ce0661ebb80a5e0…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Wed Nov 10 18:45:27 2010 +0100 winmm/tests: Fix test failure in multi-byte locale. --- dlls/winmm/tests/mci.c | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/dlls/winmm/tests/mci.c b/dlls/winmm/tests/mci.c index ec88ad9..cb6df72 100644 --- a/dlls/winmm/tests/mci.c +++ b/dlls/winmm/tests/mci.c @@ -489,14 +489,17 @@ static void test_openCloseWAVE(HWND hwnd) ok(err==MCIERR_INVALID_DEVICE_NAME || broken(err==MMSYSERR_NOTSUPPORTED/* Win9x */), "mciCommand MCI_SYSINFO nodev installname: %s\n", dbg_mcierr(err)); ok(!strcmp(buf,"K"), "output buffer %s\n", buf); - buf[1] = 'L'; + buf[0] = 0; buf[1] = 'A'; buf[2] = 'j'; buf[3] = 0; parm.info.lpstrReturn = buf; parm.info.dwRetSize = 2; - err = mciSendCommand(1, MCI_INFO, MCI_INFO_PRODUCT, (DWORD_PTR)&parm); + err = mciSendCommandA(1, MCI_INFO, MCI_INFO_PRODUCT, (DWORD_PTR)&parm); ok(!err, "mciCommand MCI_INFO product: %s\n", dbg_mcierr(err)); - ok(buf[0] && !buf[1], "info product output buffer %s\n", buf); + ok(buf[0] /* && !buf[1] */ && (buf[2] == 'j' || broken(!buf[2])), "info product output buffer %s\n", buf); + /* Producing non-ASCII multi-byte output, native forgets to zero-terminate a too small buffer + * with SendStringA, while SendStringW works correctly (jap. and chin. locale): ignore buf[1] */ + /* Bug in 64 bit Vista/w2k8/w7: mciSendStringW is used! (not in xp nor w2k3) */ - buf[0] = 'K'; + buf[0] = 'K'; buf[1] = 0; parm.info.dwRetSize = sizeof(buf); err = mciSendCommandW(1, MCI_INFO, 0x07000000, (DWORD_PTR)&parm); ok(err==MCIERR_UNRECOGNIZED_KEYWORD || broken(err==MMSYSERR_NOTSUPPORTED/* Win9x */), "mciCommand MCI_INFO other: %s\n", dbg_mcierr(err)); @@ -1123,6 +1126,9 @@ static void test_AutoOpenWAVE(HWND hwnd) test_notification(hwnd, "-prior to auto-open-", 0); err = mciSendString("play tempfile.wav notify", buf, sizeof(buf), hwnd); + if(ok_saved==MCIERR_FILE_NOT_FOUND) todo_wine /* same as above */ + ok(err==MCIERR_NOTIFY_ON_AUTO_OPEN,"mci auto-open play notify returned %s\n", dbg_mcierr(err)); + else ok(err==MCIERR_NOTIFY_ON_AUTO_OPEN,"mci auto-open play notify returned %s\n", dbg_mcierr(err)); if(err) /* FIXME: don't open twice yet, it confuses Wine. */
1
0
0
0
Vitaliy Margolen : ntdll: Mask invalid flags for RtlQueueWorkItem.
by Alexandre Julliard
11 Nov '10
11 Nov '10
Module: wine Branch: master Commit: aafa74908b64bbcd18a814fd94640c39aa159605 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aafa74908b64bbcd18a814fd9…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Thu Nov 11 08:31:56 2010 -0700 ntdll: Mask invalid flags for RtlQueueWorkItem. --- dlls/ntdll/threadpool.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/ntdll/threadpool.c b/dlls/ntdll/threadpool.c index 44afb01..1a10240 100644 --- a/dlls/ntdll/threadpool.c +++ b/dlls/ntdll/threadpool.c @@ -447,7 +447,9 @@ NTSTATUS WINAPI RtlRegisterWait(PHANDLE NewWaitObject, HANDLE Object, return status; } - status = RtlQueueWorkItem( wait_thread_proc, wait_work_item, Flags & ~WT_EXECUTEONLYONCE ); + Flags = Flags & (WT_EXECUTEINIOTHREAD | WT_EXECUTEINPERSISTENTTHREAD | + WT_EXECUTELONGFUNCTION | WT_TRANSFER_IMPERSONATION); + status = RtlQueueWorkItem( wait_thread_proc, wait_work_item, Flags ); if (status != STATUS_SUCCESS) { delete_wait_work_item( wait_work_item );
1
0
0
0
← Newer
1
...
41
42
43
44
45
46
47
...
87
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
Results per page:
10
25
50
100
200