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
June 2011
----- 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
809 discussions
Start a n
N
ew thread
Mariusz Pluciński : shell32: Add support of known folders redirection to GetPath.
by Alexandre Julliard
29 Jun '11
29 Jun '11
Module: wine Branch: master Commit: 7340dcdb6d226400735d98a558485a6bb4949f54 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7340dcdb6d226400735d98a55…
Author: Mariusz Pluciński <vshader(a)gmail.com> Date: Wed Jun 29 19:42:25 2011 +0200 shell32: Add support of known folders redirection to GetPath. --- dlls/shell32/shellpath.c | 60 ++++++++++++++++++++++++++++++++------- dlls/shell32/tests/shellpath.c | 16 ++++------ 2 files changed, 56 insertions(+), 20 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=7340dcdb6d226400735d9…
1
0
0
0
Mariusz Pluciński : shell32: Add support of known folders redirection to Redirect.
by Alexandre Julliard
29 Jun '11
29 Jun '11
Module: wine Branch: master Commit: e554ee7fb427551b14ea94a1a8d46992f2249b7d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e554ee7fb427551b14ea94a1a…
Author: Mariusz Pluciński <vshader(a)gmail.com> Date: Wed Jun 29 19:37:06 2011 +0200 shell32: Add support of known folders redirection to Redirect. --- dlls/shell32/shellpath.c | 87 ++++++++++++++++++++++++++++++++++++++- dlls/shell32/tests/shellpath.c | 6 --- 2 files changed, 84 insertions(+), 9 deletions(-) diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index 6328ec5..e107f0e 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -817,6 +817,7 @@ static const WCHAR szSHFolders[] = {'S','o','f','t','w','a','r','e','\\','M','i' static const WCHAR szSHUserFolders[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\','E','x','p','l','o','r','e','r','\\','U','s','e','r',' ','S','h','e','l','l',' ','F','o','l','d','e','r','s','\0'}; static const WCHAR szDefaultProfileDirW[] = {'u','s','e','r','s',0}; static const WCHAR szKnownFolderDescriptions[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\','E','x','p','l','o','r','e','r','\\','F','o','l','d','e','r','D','e','s','c','r','i','p','t','i','o','n','s','\0'}; +static const WCHAR szKnownFolderRedirections[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\','E','x','p','l','o','r','e','r','\\','U','s','e','r',' ','S','h','e','l','l',' ','F','o','l','d','e','r','s',0}; static const WCHAR AllUsersW[] = {'P','u','b','l','i','c',0}; typedef enum _CSIDL_Type { @@ -3124,6 +3125,88 @@ static HRESULT get_known_folder_registry_path( return hr; } +/* + * Internal function to get place where folder redirection information are stored. + * + * Parameters: + * rfid [I] pointer to known folder identifier (may be NULL) + * rootKey [O] root key where the redirection information are stored + * It can be HKLM for COMMON folders, and HKCU for PERUSER folders. + * However, besides root key, path is always that same, and is stored + * as "szKnownFolderRedirections" constant + */ +static HRESULT WINAPI get_known_folder_redirection_place( + REFKNOWNFOLDERID rfid, + HKEY *rootKey) +{ + HRESULT hr; + LPWSTR lpRegistryPath = NULL; + KF_CATEGORY category; + DWORD dwSize; + + /* first, get known folder's category */ + hr = get_known_folder_registry_path(rfid, NULL, &lpRegistryPath); + + if(SUCCEEDED(hr)) + { + dwSize = sizeof(category); + hr = HRESULT_FROM_WIN32(RegGetValueW(HKEY_LOCAL_MACHINE, lpRegistryPath, szCategory, RRF_RT_DWORD, NULL, &category, &dwSize)); + } + + if(SUCCEEDED(hr)) + { + if(category == KF_CATEGORY_COMMON) + { + *rootKey = HKEY_LOCAL_MACHINE; + hr = S_OK; + } + else if(category == KF_CATEGORY_PERUSER) + { + *rootKey = HKEY_CURRENT_USER; + hr = S_OK; + } + else + hr = E_FAIL; + } + + HeapFree(GetProcessHeap(), 0, lpRegistryPath); + return hr; +} + +static HRESULT WINAPI redirect_known_folder( + REFKNOWNFOLDERID rfid, + HWND hwnd, + KF_REDIRECT_FLAGS flags, + LPCWSTR pszTargetPath, + UINT cFolders, + KNOWNFOLDERID const *pExclusion, + LPWSTR *ppszError) +{ + HRESULT hr; + HKEY rootKey = HKEY_LOCAL_MACHINE, hKey; + WCHAR sGuid[39]; + TRACE("(%s, %p, 0x%08x, %s, %d, %p, %p)\n", debugstr_guid(rfid), hwnd, flags, debugstr_w(pszTargetPath), cFolders, pExclusion, ppszError); + + /* get path to redirection storage */ + hr = get_known_folder_redirection_place(rfid, &rootKey); + + /* write redirection information */ + if(SUCCEEDED(hr)) + hr = HRESULT_FROM_WIN32(RegCreateKeyExW(rootKey, szKnownFolderRedirections, 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL)); + + if(SUCCEEDED(hr)) + { + StringFromGUID2(rfid, sGuid, sizeof(sGuid)/sizeof(sGuid[0])); + + hr = HRESULT_FROM_WIN32(RegSetValueExW(hKey, sGuid, 0, REG_SZ, (LPBYTE)pszTargetPath, (lstrlenW(pszTargetPath)+1)*sizeof(WCHAR))); + + RegCloseKey(hKey); + } + + return hr; +} + + struct knownfolder { const struct IKnownFolderVtbl *vtbl; @@ -3681,9 +3764,7 @@ static HRESULT WINAPI foldermanager_Redirect( KNOWNFOLDERID const *pExclusion, LPWSTR *ppszError) { - FIXME("%p, %p, 0x%08x, %s, %u, %p, %p\n", rfid, hwnd, flags, - debugstr_w(pszTargetPath), cFolders, pExclusion, ppszError); - return E_NOTIMPL; + return redirect_known_folder(rfid, hwnd, flags, pszTargetPath, cFolders, pExclusion, ppszError); } static const struct IKnownFolderManagerVtbl foldermanager_vtbl = diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c index 3623029..e99b554 100644 --- a/dlls/shell32/tests/shellpath.c +++ b/dlls/shell32/tests/shellpath.c @@ -1232,7 +1232,6 @@ static void test_knownFolders(void) /* try to redirect Example to Temp\Example2 */ hr = IKnownFolderManager_Redirect(mgr, &newFolderId, NULL, 0, sExample2Path, 0, NULL, &errorMsg); - todo_wine ok(hr == S_OK, "failed to redirect known folder: 0x%08x, errorMsg: %s\n", hr, wine_dbgstr_w(errorMsg)); /* verify */ @@ -1268,7 +1267,6 @@ static void test_knownFolders(void) /* again perform that same redirection */ hr = IKnownFolderManager_Redirect(mgr, &newFolderId, NULL, 0, sExample2Path, 0, NULL, &errorMsg); - todo_wine ok(hr == S_OK, "failed to redirect known folder: 0x%08x, errorMsg: %s\n", hr, wine_dbgstr_w(errorMsg)); /* verify sub folder. It should succeed now, as the required sub folder exists */ @@ -1312,7 +1310,6 @@ static void test_knownFolders(void) /* do that same redirection, but try to exclude sub-folder */ hr = IKnownFolderManager_Redirect(mgr, &newFolderId, NULL, 0, sExample2Path, 1, &subFolderId, &errorMsg); - todo_wine ok(hr == S_OK, "failed to redirect known folder: 0x%08x, errorMsg: %s\n", hr, wine_dbgstr_w(errorMsg)); /* verify */ @@ -1352,7 +1349,6 @@ static void test_knownFolders(void) /* do that same redirection again, but set it to copy content. It should also copy the sub folder, so checking it would succeed now */ hr = IKnownFolderManager_Redirect(mgr, &newFolderId, NULL, KF_REDIRECT_COPY_CONTENTS, sExample2Path, 0, NULL, &errorMsg); - todo_wine ok(hr == S_OK, "failed to redirect known folder: 0x%08x, errorMsg: %s\n", hr, wine_dbgstr_w(errorMsg)); /* verify */ @@ -1392,7 +1388,6 @@ static void test_knownFolders(void) /* redirect again, set it to copy content and remove originals */ hr = IKnownFolderManager_Redirect(mgr, &newFolderId, NULL, KF_REDIRECT_COPY_CONTENTS | KF_REDIRECT_DEL_SOURCE_CONTENTS, sExample2Path, 0, NULL, &errorMsg); - todo_wine ok(hr == S_OK, "failed to redirect known folder: 0x%08x, errorMsg: %s\n", hr, wine_dbgstr_w(errorMsg)); /* verify */ @@ -1417,7 +1412,6 @@ static void test_knownFolders(void) /* redirect (with copy) to original path */ hr = IKnownFolderManager_Redirect(mgr, &newFolderId, NULL, KF_REDIRECT_COPY_CONTENTS, sExamplePath, 0, NULL, &errorMsg); - todo_wine ok(hr == S_OK, "failed to redirect known folder: 0x%08x, errorMsg: %s\n", hr, wine_dbgstr_w(errorMsg)); /* verify */
1
0
0
0
Mariusz Pluciński : shell32: Add support of parent folder to GetPath.
by Alexandre Julliard
29 Jun '11
29 Jun '11
Module: wine Branch: master Commit: 4c0959b9d69d0f37dc77fa792d5cb5818c45b4ae URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4c0959b9d69d0f37dc77fa792…
Author: Mariusz Pluciński <vshader(a)gmail.com> Date: Wed Jun 29 19:35:27 2011 +0200 shell32: Add support of parent folder to GetPath. --- dlls/shell32/shellpath.c | 87 +++++++++++++++++++++++++++++++--------- dlls/shell32/tests/shellpath.c | 5 -- 2 files changed, 68 insertions(+), 24 deletions(-) diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index 33c9908..6328ec5 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -3087,20 +3087,27 @@ static const WCHAR szParentFolder[] = {'P','a','r','e','n','t','F','o','l','d',' * associated with known folder. * * Parameters: - * rfid [I] pointer to known folder identifier + * rfid [I] pointer to known folder identifier (may be NULL) + * lpStringGuid [I] string with known folder identifier (used when rfid is NULL) * lpPath [O] place to store string address. String should be * later freed using HeapFree(GetProcessHeap(),0, ... ) */ -static HRESULT get_known_folder_registry_path(REFKNOWNFOLDERID rfid, LPWSTR *lpPath) +static HRESULT get_known_folder_registry_path( + REFKNOWNFOLDERID rfid, + LPWSTR lpStringGuid, + LPWSTR *lpPath) { static const WCHAR sBackslash[] = {'\\',0}; HRESULT hr = S_OK; int length; WCHAR sGuid[50]; - TRACE("(%s, %p)\n", debugstr_guid(rfid), lpPath); + TRACE("(%s, %s, %p)\n", debugstr_guid(rfid), debugstr_w(lpStringGuid), lpPath); - StringFromGUID2(rfid, sGuid, sizeof(sGuid)/sizeof(sGuid[0])); + if(rfid) + StringFromGUID2(rfid, sGuid, sizeof(sGuid)/sizeof(sGuid[0])); + else + lstrcpyW(sGuid, lpStringGuid); length = lstrlenW(szKnownFolderDescriptions)+51; *lpPath = HeapAlloc(GetProcessHeap(), 0, length*sizeof(WCHAR)); @@ -3187,7 +3194,7 @@ static HRESULT knownfolder_set_id( knownfolder->id = *kfid; /* check is it registry-registered folder */ - hr = get_known_folder_registry_path(kfid, &knownfolder->registryPath); + hr = get_known_folder_registry_path(kfid, NULL, &knownfolder->registryPath); if(SUCCEEDED(hr)) hr = HRESULT_FROM_WIN32(RegOpenKeyExW(HKEY_LOCAL_MACHINE, knownfolder->registryPath, 0, 0, &hKey)); @@ -3249,13 +3256,64 @@ static HRESULT WINAPI knownfolder_GetShellItem( return E_NOTIMPL; } +static HRESULT get_known_folder_path( + LPWSTR registryPath, + LPWSTR *ppszPath) +{ + static const WCHAR sBackslash[] = {'\\',0}; + HRESULT hr; + DWORD dwSize, dwType; + WCHAR path[MAX_PATH] = {0}; + WCHAR parentGuid[39]; + LPWSTR parentRegistryPath, parentPath; + + TRACE("(%s, %p)\n", debugstr_w(registryPath), ppszPath); + + /* check if folder has parent */ + dwSize = sizeof(parentGuid); + hr = HRESULT_FROM_WIN32(RegGetValueW(HKEY_LOCAL_MACHINE, registryPath, szParentFolder, RRF_RT_REG_SZ, &dwType, parentGuid, &dwSize)); + if(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) hr = S_FALSE; + + if(hr == S_OK) + { + /* get parent's known folder path (recursive) */ + get_known_folder_registry_path(NULL, parentGuid, &parentRegistryPath); + + hr = get_known_folder_path(parentRegistryPath, &parentPath); + + lstrcatW(path, parentPath); + lstrcatW(path, sBackslash); + + HeapFree(GetProcessHeap(), 0, parentRegistryPath); + HeapFree(GetProcessHeap(), 0, parentPath); + } + + /* read the relative path from registry */ + if(SUCCEEDED(hr)) + hr = HRESULT_FROM_WIN32(RegGetValueW(HKEY_LOCAL_MACHINE, registryPath, szRelativePath, RRF_RT_REG_SZ, &dwType, NULL, &dwSize)); + + if(SUCCEEDED(hr)) + { + *ppszPath = CoTaskMemAlloc(dwSize+(lstrlenW(path)+1)*sizeof(WCHAR)); + if(!*ppszPath) hr = E_OUTOFMEMORY; + } + + if(SUCCEEDED(hr)) + { + lstrcpyW(*ppszPath, path); + hr = HRESULT_FROM_WIN32(RegGetValueW(HKEY_LOCAL_MACHINE, registryPath, szRelativePath, RRF_RT_REG_SZ, &dwType, *ppszPath + lstrlenW(path), &dwSize)); + } + + TRACE("returning path: %s\n", debugstr_w(*ppszPath)); + return hr; +} + static HRESULT WINAPI knownfolder_GetPath( IKnownFolder *iface, DWORD dwFlags, LPWSTR *ppszPath) { struct knownfolder *knownfolder = impl_from_IKnownFolder( iface ); - DWORD dwSize, dwType; HRESULT hr; TRACE("(%p, 0x%08x, %p)\n", knownfolder, dwFlags, ppszPath); @@ -3263,16 +3321,7 @@ static HRESULT WINAPI knownfolder_GetPath( /* if this is registry-registered known folder, get path from registry */ if(knownfolder->registryPath) { - hr = HRESULT_FROM_WIN32(RegGetValueW(HKEY_LOCAL_MACHINE, knownfolder->registryPath, szRelativePath, RRF_RT_REG_SZ, &dwType, NULL, &dwSize)); - - if(SUCCEEDED(hr)) - { - *ppszPath = CoTaskMemAlloc(dwSize); - if(!*ppszPath) hr = E_OUTOFMEMORY; - } - - if(SUCCEEDED(hr)) - hr = HRESULT_FROM_WIN32(RegGetValueW(HKEY_LOCAL_MACHINE, knownfolder->registryPath, szRelativePath, RRF_RT_REG_SZ, &dwType, *ppszPath, &dwSize)); + hr = get_known_folder_path(knownfolder->registryPath, ppszPath); } /* in other case, use older way */ else @@ -3495,7 +3544,7 @@ static BOOL is_knownfolder( struct foldermanager *fm, const KNOWNFOLDERID *id ) for (i = 0; i < fm->num_ids; i++) if (IsEqualGUID( &fm->ids[i], id )) return TRUE; - hr = get_known_folder_registry_path(id, ®istryPath); + hr = get_known_folder_registry_path(id, NULL, ®istryPath); if(SUCCEEDED(hr)) hr = HRESULT_FROM_WIN32(RegOpenKeyExW(HKEY_LOCAL_MACHINE, registryPath, 0, 0, &hKey)); @@ -3550,7 +3599,7 @@ static HRESULT WINAPI foldermanager_RegisterFolder( LPWSTR registryPath = NULL; TRACE("(%p, %s, %p)\n", iface, debugstr_guid(rfid), pKFD); - hr = get_known_folder_registry_path(rfid, ®istryPath); + hr = get_known_folder_registry_path(rfid, NULL, ®istryPath); TRACE("registry path: %s\n", debugstr_w(registryPath)); if(SUCCEEDED(hr)) @@ -3594,7 +3643,7 @@ static HRESULT WINAPI foldermanager_UnregisterFolder( LPWSTR registryPath = NULL; TRACE("(%p, %s)\n", iface, debugstr_guid(rfid)); - hr = get_known_folder_registry_path(rfid, ®istryPath); + hr = get_known_folder_registry_path(rfid, NULL, ®istryPath); if(SUCCEEDED(hr)) hr = HRESULT_FROM_WIN32(RegDeleteKeyW(HKEY_LOCAL_MACHINE, registryPath)); diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c index ff47951..3623029 100644 --- a/dlls/shell32/tests/shellpath.c +++ b/dlls/shell32/tests/shellpath.c @@ -1226,7 +1226,6 @@ static void test_knownFolders(void) /* check sub folder path */ hr = IKnownFolder_GetPath(subFolder, 0, &folderPath); ok(hr == S_OK, "failed to get known folder path: 0x%08x\n", hr); - todo_wine ok(lstrcmpiW(folderPath, sSubFolderPath)==0, "invalid known folder path retrieved: \"%s\" when \"%s\" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sSubFolderPath)); CoTaskMemFree(folderPath); @@ -1303,7 +1302,6 @@ static void test_knownFolders(void) /* verify sub folder */ hr = IKnownFolder_GetPath(subFolder, 0, &folderPath); ok(hr == S_OK, "failed to get known folder path: 0x%08x\n", hr); - todo_wine ok(lstrcmpiW(folderPath, sSubFolderPath)==0, "invalid known folder path retrieved: \"%s\" when \"%s\" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sSubFolderPath)); CoTaskMemFree(folderPath); @@ -1348,7 +1346,6 @@ static void test_knownFolders(void) /* verify sub folder */ hr = IKnownFolder_GetPath(subFolder, 0, &folderPath); ok(hr == S_OK, "failed to get known folder path: 0x%08x\n", hr); - todo_wine ok(lstrcmpiW(folderPath, sSubFolderPath)==0, "invalid known folder path retrieved: \"%s\" when \"%s\" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sSubFolderPath)); CoTaskMemFree(folderPath); @@ -1389,7 +1386,6 @@ static void test_knownFolders(void) /* verify sub folder */ hr = IKnownFolder_GetPath(subFolder, 0, &folderPath); ok(hr == S_OK, "failed to get known folder path: 0x%08x\n", hr); - todo_wine ok(lstrcmpiW(folderPath, sSubFolderPath)==0, "invalid known folder path retrieved: \"%s\" when \"%s\" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sSubFolderPath)); CoTaskMemFree(folderPath); @@ -1433,7 +1429,6 @@ static void test_knownFolders(void) /* verify sub folder */ hr = IKnownFolder_GetPath(subFolder, 0, &folderPath); ok(hr == S_OK, "failed to get known folder path: 0x%08x\n", hr); - todo_wine ok(lstrcmpiW(folderPath, sSubFolderPath)==0, "invalid known folder path retrieved: \"%s\" when \"%s\" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sSubFolderPath)); CoTaskMemFree(folderPath);
1
0
0
0
Mariusz Pluciński : shell32: Add support of parent folder to RegisterFolder.
by Alexandre Julliard
29 Jun '11
29 Jun '11
Module: wine Branch: master Commit: 06f706a068c8fc1a41755004ee296aab886f2eda URL:
http://source.winehq.org/git/wine.git/?a=commit;h=06f706a068c8fc1a41755004e…
Author: Mariusz Pluciński <vshader(a)gmail.com> Date: Wed Jun 29 19:34:44 2011 +0200 shell32: Add support of parent folder to RegisterFolder. --- dlls/shell32/shellpath.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index aed7ceb..33c9908 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -3080,6 +3080,7 @@ HRESULT WINAPI SHGetFolderPathEx(REFKNOWNFOLDERID rfid, DWORD flags, HANDLE toke static const WCHAR szCategory[] = {'C','a','t','e','g','o','r','y',0}; static const WCHAR szName[] = {'N','a','m','e',0}; static const WCHAR szRelativePath[] = {'R','e','l','a','t','i','v','e','P','a','t','h',0}; +static const WCHAR szParentFolder[] = {'P','a','r','e','n','t','F','o','l','d','e','r',0}; /* * Internal function to convert known folder identifier to path of registry key @@ -3566,6 +3567,15 @@ static HRESULT WINAPI foldermanager_RegisterFolder( if(SUCCEEDED(hr)) hr = HRESULT_FROM_WIN32(RegSetValueExW(hKey, szName, 0, REG_SZ, (LPBYTE)pKFD->pszName, (lstrlenW(pKFD->pszName)+1)*sizeof(WCHAR) )); + if(SUCCEEDED(hr) && !IsEqualGUID(&pKFD->fidParent, &GUID_NULL)) + { + WCHAR sParentGuid[39]; + StringFromGUID2(&pKFD->fidParent, sParentGuid, sizeof(sParentGuid)/sizeof(sParentGuid[0])); + + /* this known folder has parent folder */ + hr = HRESULT_FROM_WIN32(RegSetValueExW(hKey, szParentFolder, 0, REG_SZ, (LPBYTE)sParentGuid, sizeof(sParentGuid))); + } + if(SUCCEEDED(hr) && pKFD->category != KF_CATEGORY_VIRTUAL) hr = HRESULT_FROM_WIN32(RegSetValueExW(hKey, szRelativePath, 0, REG_SZ, (LPBYTE)pKFD->pszRelativePath, (lstrlenW(pKFD->pszRelativePath)+1)*sizeof(WCHAR) ));
1
0
0
0
Mariusz Pluciński : shell32/tests: Modify tests of redirection to check more advanced features.
by Alexandre Julliard
29 Jun '11
29 Jun '11
Module: wine Branch: master Commit: 43769da95e24758a178a0bf8c346aa1da0eb6800 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=43769da95e24758a178a0bf8c…
Author: Mariusz Pluciński <vshader(a)gmail.com> Date: Wed Jun 29 19:34:24 2011 +0200 shell32/tests: Modify tests of redirection to check more advanced features. --- dlls/shell32/tests/shellpath.c | 339 ++++++++++++++++++++++++++++++++++------ 1 files changed, 293 insertions(+), 46 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=43769da95e24758a178a0…
1
0
0
0
Piotr Caban : comctl32: Fixed tab elements recognition.
by Alexandre Julliard
29 Jun '11
29 Jun '11
Module: wine Branch: master Commit: 8c42ac319a5de2a9227b2c80e9c1947a865ccf0d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8c42ac319a5de2a9227b2c80e…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Jun 29 19:12:51 2011 +0200 comctl32: Fixed tab elements recognition. --- dlls/comctl32/tab.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c index e4a7adc..c2f2d25 100644 --- a/dlls/comctl32/tab.c +++ b/dlls/comctl32/tab.c @@ -2118,9 +2118,10 @@ static void TAB_DrawItem(const TAB_INFO *infoPtr, HDC hdc, INT iItem) partIndex += 4; /* The part also differs on the position of a tab on a line. * "Visually" determining the position works well enough. */ + GetClientRect(infoPtr->hwnd, &r1); if(selectedRect.left == 0) partIndex += 1; - if(selectedRect.right == clRight) + if(selectedRect.right == r1.right) partIndex += 2; if (iItem == infoPtr->iSelected)
1
0
0
0
Jacek Caban : d3d10_1.idl: Added D3D10_1_SDK_VERSION declaration.
by Alexandre Julliard
29 Jun '11
29 Jun '11
Module: wine Branch: master Commit: a8a213dddc486b7dae666a35192190240602ae56 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a8a213dddc486b7dae666a351…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Jun 29 18:01:30 2011 +0200 d3d10_1.idl: Added D3D10_1_SDK_VERSION declaration. --- include/d3d10_1.idl | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/d3d10_1.idl b/include/d3d10_1.idl index c380c5a..5724b63 100644 --- a/include/d3d10_1.idl +++ b/include/d3d10_1.idl @@ -118,3 +118,5 @@ interface ID3D10Device1 : ID3D10Device D3D10_FEATURE_LEVEL1 GetFeatureLevel(); } + +const UINT D3D10_1_SDK_VERSION = 0x20;
1
0
0
0
Jacek Caban : d3d10.idl: Added CD3D10_TEXTURE2D_DESC and CD3D10_BUFFER_DESC declarations.
by Alexandre Julliard
29 Jun '11
29 Jun '11
Module: wine Branch: master Commit: a285a08055b9913fda5d7a42b6f9ae5e9c09b6a3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a285a08055b9913fda5d7a42b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Jun 29 18:01:21 2011 +0200 d3d10.idl: Added CD3D10_TEXTURE2D_DESC and CD3D10_BUFFER_DESC declarations. --- include/d3d10.idl | 70 +++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 60 insertions(+), 10 deletions(-) diff --git a/include/d3d10.idl b/include/d3d10.idl index 57e8049..e2ac0f6 100644 --- a/include/d3d10.idl +++ b/include/d3d10.idl @@ -459,6 +459,16 @@ typedef enum D3D10_USAGE { D3D10_USAGE_STAGING, } D3D10_USAGE; +typedef enum D3D10_BIND_FLAG { + D3D10_BIND_VERTEX_BUFFER = 0x1, + D3D10_BIND_INDEX_BUFFER = 0x2, + D3D10_BIND_CONSTANT_BUFFER = 0x4, + D3D10_BIND_SHADER_RESOURCE = 0x8, + D3D10_BIND_STREAM_OUTPUT = 0x10, + D3D10_BIND_RENDER_TARGET = 0x20, + D3D10_BIND_DEPTH_STENCIL = 0x40 +} D3D10_BIND_FLAG; + typedef struct D3D10_BUFFER_DESC { UINT ByteWidth; D3D10_USAGE Usage; @@ -467,6 +477,24 @@ typedef struct D3D10_BUFFER_DESC { UINT MiscFlags; } D3D10_BUFFER_DESC; +cpp_quote("#if !defined(D3D10_NO_HELPERS) && defined(__cplusplus)") +cpp_quote("struct CD3D10_BUFFER_DESC : public D3D10_BUFFER_DESC {") +cpp_quote(" CD3D10_BUFFER_DESC() {}" ) +cpp_quote(" explicit CD3D10_BUFFER_DESC(const D3D10_BUFFER_DESC &o) : D3D10_BUFFER_DESC(o) {}") +cpp_quote(" explicit CD3D10_BUFFER_DESC(UINT byteWidth, UINT bindFlags, D3D10_USAGE usage = D3D10_USAGE_DEFAULT, UINT cpuaccessFlags = 0, UINT miscFlags = 0 ) {") +cpp_quote(" ByteWidth = byteWidth;") +cpp_quote(" Usage = usage;") +cpp_quote(" BindFlags = bindFlags;") +cpp_quote(" CPUAccessFlags = cpuaccessFlags;") +cpp_quote(" MiscFlags = miscFlags;") +cpp_quote(" }") +cpp_quote(" ~CD3D10_BUFFER_DESC() {}") +cpp_quote(" operator const D3D10_BUFFER_DESC&() const {") +cpp_quote(" return *this;") +cpp_quote(" }") +cpp_quote("};") +cpp_quote("#endif") + typedef enum D3D10_MAP { D3D10_MAP_READ = 1, D3D10_MAP_WRITE, @@ -499,6 +527,38 @@ typedef struct D3D10_TEXTURE2D_DESC { UINT MiscFlags; } D3D10_TEXTURE2D_DESC; +cpp_quote("#if !defined(D3D10_NO_HELPERS) && defined(__cplusplus)") +cpp_quote("struct CD3D10_TEXTURE2D_DESC : public D3D10_TEXTURE2D_DESC {") +cpp_quote(" CD3D10_TEXTURE2D_DESC() {}" ) +cpp_quote(" explicit CD3D10_TEXTURE2D_DESC(const D3D10_TEXTURE2D_DESC &o) : D3D10_TEXTURE2D_DESC(o) {}") +cpp_quote(" explicit CD3D10_TEXTURE2D_DESC(DXGI_FORMAT format, UINT width, UINT height,") +cpp_quote(" UINT arraySize = 1,") +cpp_quote(" UINT mipLevels = 0,") +cpp_quote(" UINT bindFlags = D3D10_BIND_SHADER_RESOURCE,") +cpp_quote(" D3D10_USAGE usage = D3D10_USAGE_DEFAULT,") +cpp_quote(" UINT cpuaccessFlags = 0,") +cpp_quote(" UINT sampleCount = 1,") +cpp_quote(" UINT sampleQuality = 0,") +cpp_quote(" UINT miscFlags = 0) {") +cpp_quote(" Width = width;" ) +cpp_quote(" Height = height;" ) +cpp_quote(" MipLevels = mipLevels;" ) +cpp_quote(" ArraySize = arraySize;" ) +cpp_quote(" Format = format;" ) +cpp_quote(" SampleDesc.Count = sampleCount;" ) +cpp_quote(" SampleDesc.Quality = sampleQuality;" ) +cpp_quote(" Usage = usage;" ) +cpp_quote(" BindFlags = bindFlags;" ) +cpp_quote(" CPUAccessFlags = cpuaccessFlags;" ) +cpp_quote(" MiscFlags = miscFlags;" ) +cpp_quote(" }") +cpp_quote(" ~CD3D10_TEXTURE2D_DESC() {}") +cpp_quote(" operator const D3D10_TEXTURE2D_DESC&() const {") +cpp_quote(" return *this;") +cpp_quote(" }") +cpp_quote("};") +cpp_quote("#endif") + typedef struct D3D10_TEXTURE3D_DESC { UINT Width; UINT Height; @@ -777,16 +837,6 @@ typedef struct D3D10_MAPPED_TEXTURE3D { UINT DepthPitch; } D3D10_MAPPED_TEXTURE3D; -typedef enum D3D10_BIND_FLAG { - D3D10_BIND_VERTEX_BUFFER = 0x1, - D3D10_BIND_INDEX_BUFFER = 0x2, - D3D10_BIND_CONSTANT_BUFFER = 0x4, - D3D10_BIND_SHADER_RESOURCE = 0x8, - D3D10_BIND_STREAM_OUTPUT = 0x10, - D3D10_BIND_RENDER_TARGET = 0x20, - D3D10_BIND_DEPTH_STENCIL = 0x40 -} D3D10_BIND_FLAG; - typedef enum D3D10_CPU_ACCESS_FLAG { D3D10_CPU_ACCESS_WRITE = 0x10000, D3D10_CPU_ACCESS_READ = 0x20000
1
0
0
0
Jacek Caban : d3dx9math.h: Removed duplicated D3DXMatrixOrthoLH declaration .
by Alexandre Julliard
29 Jun '11
29 Jun '11
Module: wine Branch: master Commit: 1522b3ca14a5d93d8b810f2cb3b666c10029ab3c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1522b3ca14a5d93d8b810f2cb…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Jun 29 18:01:11 2011 +0200 d3dx9math.h: Removed duplicated D3DXMatrixOrthoLH declaration. --- include/d3dx9math.h | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/include/d3dx9math.h b/include/d3dx9math.h index f842e3e..f28ffd1 100644 --- a/include/d3dx9math.h +++ b/include/d3dx9math.h @@ -282,7 +282,6 @@ D3DXMATRIX* WINAPI D3DXMatrixMultiplyTranspose(D3DXMATRIX *pout, CONST D3DXMATRI D3DXMATRIX* WINAPI D3DXMatrixOrthoLH(D3DXMATRIX *pout, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf); D3DXMATRIX* WINAPI D3DXMatrixOrthoOffCenterLH(D3DXMATRIX *pout, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn, FLOAT zf); D3DXMATRIX* WINAPI D3DXMatrixOrthoOffCenterRH(D3DXMATRIX *pout, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn, FLOAT zf); -D3DXMATRIX* WINAPI D3DXMatrixOrthoLH(D3DXMATRIX *pout, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf); D3DXMATRIX* WINAPI D3DXMatrixOrthoRH(D3DXMATRIX *pout, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf); D3DXMATRIX* WINAPI D3DXMatrixPerspectiveFovLH(D3DXMATRIX *pout, FLOAT fovy, FLOAT aspect, FLOAT zn, FLOAT zf); D3DXMATRIX* WINAPI D3DXMatrixPerspectiveFovRH(D3DXMATRIX *pout, FLOAT fovy, FLOAT aspect, FLOAT zn, FLOAT zf);
1
0
0
0
Aric Stewart : hhctrl.ocx: Improve parsing of incoming file specs to HtmlHelp.
by Alexandre Julliard
29 Jun '11
29 Jun '11
Module: wine Branch: master Commit: 3414d0ea0e8fe8cbd5f4ee090e0673620ffd36ab URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3414d0ea0e8fe8cbd5f4ee090…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Wed Jun 29 10:51:05 2011 -0500 hhctrl.ocx: Improve parsing of incoming file specs to HtmlHelp. --- dlls/hhctrl.ocx/chm.c | 2 +- dlls/hhctrl.ocx/hhctrl.c | 55 +++++++++++++++++++++++++++++++++------------ dlls/hhctrl.ocx/hhctrl.h | 2 + 3 files changed, 43 insertions(+), 16 deletions(-) diff --git a/dlls/hhctrl.ocx/chm.c b/dlls/hhctrl.ocx/chm.c index f0452fa..51d1685 100644 --- a/dlls/hhctrl.ocx/chm.c +++ b/dlls/hhctrl.ocx/chm.c @@ -282,7 +282,7 @@ done: return SUCCEEDED(hr); } -static LPCWSTR skip_schema(LPCWSTR url) +LPCWSTR skip_schema(LPCWSTR url) { static const WCHAR its_schema[] = {'i','t','s',':'}; static const WCHAR msits_schema[] = {'m','s','-','i','t','s',':'}; diff --git a/dlls/hhctrl.ocx/hhctrl.c b/dlls/hhctrl.ocx/hhctrl.c index 08dfc4e..33cc1f1 100644 --- a/dlls/hhctrl.ocx/hhctrl.c +++ b/dlls/hhctrl.ocx/hhctrl.c @@ -98,9 +98,41 @@ static const char *command_to_string(UINT command) #undef X } -static BOOL resolve_filename(const WCHAR *filename, WCHAR *fullname, DWORD buflen) +static BOOL resolve_filename(const WCHAR *filename, WCHAR *fullname, DWORD buflen, const WCHAR **index, const WCHAR **window) { + const WCHAR *extra; + WCHAR chm_file[MAX_PATH]; + static const WCHAR helpW[] = {'\\','h','e','l','p','\\',0}; + static const WCHAR delimW[] = {':',':',0}; + static const WCHAR delim2W[] = {'>',0}; + + filename = skip_schema(filename); + + /* the format is "helpFile[::/index][>window]" */ + if (index) *index = NULL; + if (window) *window = NULL; + + extra = strstrW(filename, delim2W); + if (extra) + { + memcpy(chm_file, filename, (extra-filename)*sizeof(WCHAR)); + chm_file[extra-filename] = 0; + filename = chm_file; + if (window) + *window = strdupW(extra+1); + } + + extra = strstrW(filename, delimW); + if (extra) + { + if (filename != chm_file); + memcpy(chm_file, filename, (extra-filename)*sizeof(WCHAR)); + chm_file[extra-filename] = 0; + filename = chm_file; + if (index) + *index = strdupW(extra+2); + } GetFullPathNameW(filename, buflen, fullname, NULL); if (GetFileAttributesW(fullname) == INVALID_FILE_ATTRIBUTES) @@ -128,27 +160,16 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat case HH_DISPLAY_TOPIC: case HH_DISPLAY_TOC: case HH_DISPLAY_SEARCH:{ - static const WCHAR delimW[] = {':',':',0}; HHInfo *info; BOOL res; - WCHAR chm_file[MAX_PATH]; - const WCHAR *index; + const WCHAR *index = NULL; FIXME("Not all HH cases handled correctly\n"); if (!filename) return NULL; - index = strstrW(filename, delimW); - if (index) - { - memcpy(chm_file, filename, (index-filename)*sizeof(WCHAR)); - chm_file[index-filename] = 0; - filename = chm_file; - index += 2; /* advance beyond "::" for calling NavigateToChm() later */ - } - - if (!resolve_filename(filename, fullname, MAX_PATH)) + if (!resolve_filename(filename, fullname, MAX_PATH, &index, NULL)) { WARN("can't find %s\n", debugstr_w(filename)); return 0; @@ -162,6 +183,10 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat index = info->WinType.pszFile; res = NavigateToChm(info, info->pCHMInfo->szFile, index); + + if (index != info->WinType.pszFile) + heap_free((WCHAR*)index); + if(!res) { ReleaseHelpViewer(info); @@ -176,7 +201,7 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat if (!filename) return NULL; - if (!resolve_filename(filename, fullname, MAX_PATH)) + if (!resolve_filename(filename, fullname, MAX_PATH, NULL, NULL)) { WARN("can't find %s\n", debugstr_w(filename)); return 0; diff --git a/dlls/hhctrl.ocx/hhctrl.h b/dlls/hhctrl.ocx/hhctrl.h index 1d45201..8e63545 100644 --- a/dlls/hhctrl.ocx/hhctrl.h +++ b/dlls/hhctrl.ocx/hhctrl.h @@ -189,6 +189,8 @@ BOOL NavigateToChm(HHInfo*,LPCWSTR,LPCWSTR) DECLSPEC_HIDDEN; void InitSearch(HHInfo *info, const char *needle) DECLSPEC_HIDDEN; void ReleaseSearch(HHInfo *info) DECLSPEC_HIDDEN; +LPCWSTR skip_schema(LPCWSTR url) DECLSPEC_HIDDEN; + /* memory allocation functions */ static inline void * __WINE_ALLOC_SIZE(1) heap_alloc(size_t len)
1
0
0
0
← Newer
1
2
3
4
...
81
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
Results per page:
10
25
50
100
200