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
April
March
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
August 2008
----- 2025 -----
April 2025
March 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
839 discussions
Start a n
N
ew thread
Henri Verbeet : wined3d: Remove useless hash_table_t typedef.
by Alexandre Julliard
29 Aug '08
29 Aug '08
Module: wine Branch: master Commit: b4f43e372ed21a32d571c31ac5999abbb51760a8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b4f43e372ed21a32d571c31ac…
Author: Henri Verbeet <hverbeet(a)gmail.com> Date: Fri Aug 29 02:12:10 2008 +0200 wined3d: Remove useless hash_table_t typedef. --- dlls/wined3d/ati_fragment_shader.c | 2 +- dlls/wined3d/utils.c | 22 +++++++++++----------- dlls/wined3d/wined3d_private.h | 22 +++++++++++----------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/dlls/wined3d/ati_fragment_shader.c b/dlls/wined3d/ati_fragment_shader.c index 97875c7..20c4ebe 100644 --- a/dlls/wined3d/ati_fragment_shader.c +++ b/dlls/wined3d/ati_fragment_shader.c @@ -50,7 +50,7 @@ struct atifs_ffp_desc struct atifs_private_data { - hash_table_t *fragment_shaders; /* A hashtable to track fragment pipeline replacement shaders */ + struct hash_table_t *fragment_shaders; /* A hashtable to track fragment pipeline replacement shaders */ }; diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index a577e28..31a1944 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -1564,12 +1564,12 @@ BOOL CalculateTexRect(IWineD3DSurfaceImpl *This, RECT *Rect, float glTexCoord[4] /* Hash table functions */ -hash_table_t *hash_table_create(hash_function_t *hash_function, compare_function_t *compare_function) +struct hash_table_t *hash_table_create(hash_function_t *hash_function, compare_function_t *compare_function) { - hash_table_t *table; + struct hash_table_t *table; unsigned int initial_size = 8; - table = HeapAlloc(GetProcessHeap(), 0, sizeof(hash_table_t) + (initial_size * sizeof(struct list))); + table = HeapAlloc(GetProcessHeap(), 0, sizeof(struct hash_table_t) + (initial_size * sizeof(struct list))); if (!table) { ERR("Failed to allocate table, returning NULL.\n"); @@ -1607,7 +1607,7 @@ hash_table_t *hash_table_create(hash_function_t *hash_function, compare_function return table; } -void hash_table_destroy(hash_table_t *table, void (*free_value)(void *value, void *cb), void *cb) +void hash_table_destroy(struct hash_table_t *table, void (*free_value)(void *value, void *cb), void *cb) { unsigned int i = 0; @@ -1624,7 +1624,7 @@ void hash_table_destroy(hash_table_t *table, void (*free_value)(void *value, voi HeapFree(GetProcessHeap(), 0, table); } -static inline struct hash_table_entry_t *hash_table_get_by_idx(hash_table_t *table, void *key, unsigned int idx) +static inline struct hash_table_entry_t *hash_table_get_by_idx(struct hash_table_t *table, void *key, unsigned int idx) { struct hash_table_entry_t *entry; @@ -1635,7 +1635,7 @@ static inline struct hash_table_entry_t *hash_table_get_by_idx(hash_table_t *tab return NULL; } -static BOOL hash_table_resize(hash_table_t *table, unsigned int new_bucket_count) +static BOOL hash_table_resize(struct hash_table_t *table, unsigned int new_bucket_count) { unsigned int new_entry_count = 0; struct hash_table_entry_t *new_entries; @@ -1694,7 +1694,7 @@ static BOOL hash_table_resize(hash_table_t *table, unsigned int new_bucket_count return TRUE; } -void hash_table_put(hash_table_t *table, void *key, void *value) +void hash_table_put(struct hash_table_t *table, void *key, void *value) { unsigned int idx; unsigned int hash; @@ -1767,12 +1767,12 @@ void hash_table_put(hash_table_t *table, void *key, void *value) ++table->count; } -void hash_table_remove(hash_table_t *table, void *key) +void hash_table_remove(struct hash_table_t *table, void *key) { hash_table_put(table, key, NULL); } -void *hash_table_get(hash_table_t *table, void *key) +void *hash_table_get(struct hash_table_t *table, void *key) { unsigned int idx; struct hash_table_entry_t *entry; @@ -2004,11 +2004,11 @@ void gen_ffp_op(IWineD3DStateBlockImpl *stateblock, struct ffp_settings *setting } #undef GLINFO_LOCATION -struct ffp_desc *find_ffp_shader(hash_table_t *fragment_shaders, struct ffp_settings *settings) +struct ffp_desc *find_ffp_shader(struct hash_table_t *fragment_shaders, struct ffp_settings *settings) { return (struct ffp_desc *)hash_table_get(fragment_shaders, settings);} -void add_ffp_shader(hash_table_t *shaders, struct ffp_desc *desc) { +void add_ffp_shader(struct hash_table_t *shaders, struct ffp_desc *desc) { struct ffp_settings *key = HeapAlloc(GetProcessHeap(), 0, sizeof(*key)); /* Note that the key is the implementation independent part of the ffp_desc structure, * whereas desc points to an extended structure with implementation specific parts. diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 897e654..f4b81f7 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -54,7 +54,7 @@ struct hash_table_entry_t { struct list entry; }; -typedef struct { +struct hash_table_t { hash_function_t *hash_function; compare_function_t *compare_function; struct list *buckets; @@ -65,13 +65,13 @@ typedef struct { unsigned int count; unsigned int grow_size; unsigned int shrink_size; -} hash_table_t; +}; -hash_table_t *hash_table_create(hash_function_t *hash_function, compare_function_t *compare_function); -void hash_table_destroy(hash_table_t *table, void (*free_value)(void *value, void *cb), void *cb); -void *hash_table_get(hash_table_t *table, void *key); -void hash_table_put(hash_table_t *table, void *key, void *value); -void hash_table_remove(hash_table_t *table, void *key); +struct hash_table_t *hash_table_create(hash_function_t *hash_function, compare_function_t *compare_function); +void hash_table_destroy(struct hash_table_t *table, void (*free_value)(void *value, void *cb), void *cb); +void *hash_table_get(struct hash_table_t *table, void *key); +void hash_table_put(struct hash_table_t *table, void *key, void *value); +void hash_table_remove(struct hash_table_t *table, void *key); /* Device caps */ #define MAX_PALETTES 65536 @@ -257,7 +257,7 @@ extern const shader_backend_t none_shader_backend; /* GLSL shader private data */ struct shader_glsl_priv { - hash_table_t *glsl_program_lookup; + struct hash_table_t *glsl_program_lookup; struct glsl_shader_prog_link *glsl_program; GLhandleARB depth_blt_glsl_program_id; }; @@ -269,7 +269,7 @@ struct shader_arb_priv { GLuint depth_blt_vprogram_id; GLuint depth_blt_fprogram_id; BOOL use_arbfp_fixed_func; - hash_table_t *fragment_shaders; + struct hash_table_t *fragment_shaders; }; /* X11 locking */ @@ -795,8 +795,8 @@ struct ffp_desc }; void gen_ffp_op(IWineD3DStateBlockImpl *stateblock, struct ffp_settings *settings, BOOL ignore_textype); -struct ffp_desc *find_ffp_shader(hash_table_t *fragment_shaders, struct ffp_settings *settings); -void add_ffp_shader(hash_table_t *shaders, struct ffp_desc *desc); +struct ffp_desc *find_ffp_shader(struct hash_table_t *fragment_shaders, struct ffp_settings *settings); +void add_ffp_shader(struct hash_table_t *shaders, struct ffp_desc *desc); BOOL ffp_program_key_compare(void *keya, void *keyb); unsigned int ffp_program_key_hash(void *key);
1
0
0
0
Alexander Nicolaysen Sørnes : regedit: Convert value creation to unicode.
by Alexandre Julliard
29 Aug '08
29 Aug '08
Module: wine Branch: master Commit: 9d6b80b12131808d806564bb72d2ea14d6ee13ab URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9d6b80b12131808d806564bb7…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Thu Aug 28 16:18:44 2008 +0200 regedit: Convert value creation to unicode. --- programs/regedit/edit.c | 14 ++++---- programs/regedit/framewnd.c | 71 ++++++++++++++++++++++-------------------- programs/regedit/main.h | 2 +- 3 files changed, 45 insertions(+), 42 deletions(-) diff --git a/programs/regedit/edit.c b/programs/regedit/edit.c index 1c26baa..4e4c1ed 100644 --- a/programs/regedit/edit.c +++ b/programs/regedit/edit.c @@ -449,27 +449,27 @@ done: return result; } -BOOL CreateValue(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath, DWORD valueType, LPTSTR valueName) +BOOL CreateValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, DWORD valueType, LPWSTR valueName) { LONG lRet = ERROR_SUCCESS; - TCHAR newValue[256]; + WCHAR newValue[256]; DWORD valueDword = 0; BOOL result = FALSE; int valueNum; HKEY hKey; - lRet = RegOpenKeyEx(hKeyRoot, keyPath, 0, KEY_READ | KEY_SET_VALUE, &hKey); + lRet = RegOpenKeyExW(hKeyRoot, keyPath, 0, KEY_READ | KEY_SET_VALUE, &hKey); if (lRet != ERROR_SUCCESS) { error_code_messagebox(hwnd, lRet); return FALSE; } - if (!LoadString(GetModuleHandle(0), IDS_NEWVALUE, newValue, COUNT_OF(newValue))) goto done; + if (!LoadStringW(GetModuleHandle(0), IDS_NEWVALUE, newValue, COUNT_OF(newValue))) goto done; /* try to find out a name for the newly create key (max 100 times) */ for (valueNum = 1; valueNum < 100; valueNum++) { - wsprintf(valueName, newValue, valueNum); - lRet = RegQueryValueEx(hKey, valueName, 0, 0, 0, 0); + wsprintfW(valueName, newValue, valueNum); + lRet = RegQueryValueExW(hKey, valueName, 0, 0, 0, 0); if (lRet == ERROR_FILE_NOT_FOUND) break; } if (lRet != ERROR_FILE_NOT_FOUND) { @@ -477,7 +477,7 @@ BOOL CreateValue(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath, DWORD valueType, LPT goto done; } - lRet = RegSetValueEx(hKey, valueName, 0, valueType, (BYTE*)&valueDword, sizeof(DWORD)); + lRet = RegSetValueExW(hKey, valueName, 0, valueType, (BYTE*)&valueDword, sizeof(DWORD)); if (lRet != ERROR_SUCCESS) { error_code_messagebox(hwnd, lRet); goto done; diff --git a/programs/regedit/framewnd.c b/programs/regedit/framewnd.c index dc76eab..2053f70 100644 --- a/programs/regedit/framewnd.c +++ b/programs/regedit/framewnd.c @@ -636,15 +636,11 @@ static INT_PTR CALLBACK removefavorite_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM w static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { HKEY hKeyRoot = 0; - LPCTSTR keyPath; LPCTSTR valueName; - TCHAR newKey[MAX_NEW_KEY_LEN]; DWORD valueType; int curIndex; BOOL firstItem = TRUE; - keyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hKeyRoot); - if (LOWORD(wParam) >= ID_FAVORITE_FIRST && LOWORD(wParam) <= ID_FAVORITE_LAST) { HKEY hKey; if (RegOpenKeyExW(HKEY_CURRENT_USER, favoritesKey, @@ -683,15 +679,15 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) } case ID_EDIT_DELETE: if (GetFocus() == g_pChildWnd->hTreeWnd) { - WCHAR* keyPathW = GetWideString(keyPath); + WCHAR* keyPath = GetItemPathW(g_pChildWnd->hTreeWnd, 0, &hKeyRoot); if (keyPath == 0 || *keyPath == 0) { - MessageBeep(MB_ICONHAND); - } else if (DeleteKey(hWnd, hKeyRoot, keyPathW)) { + MessageBeep(MB_ICONHAND); + } else if (DeleteKey(hWnd, hKeyRoot, keyPath)) { DeleteNode(g_pChildWnd->hTreeWnd, 0); } - HeapFree(GetProcessHeap(), 0, keyPathW); + HeapFree(GetProcessHeap(), 0, keyPath); } else if (GetFocus() == g_pChildWnd->hListWnd) { - WCHAR* keyPathW = GetItemPathW(g_pChildWnd->hTreeWnd, 0, &hKeyRoot); + WCHAR* keyPath = GetItemPathW(g_pChildWnd->hTreeWnd, 0, &hKeyRoot); curIndex = ListView_GetNextItem(g_pChildWnd->hListWnd, -1, LVNI_SELECTED); while(curIndex != -1) { WCHAR* valueNameW; @@ -705,7 +701,7 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) break; } valueNameW = GetWideString(valueName); - if (!DeleteValue(hWnd, hKeyRoot, keyPathW, valueNameW, curIndex==-1 && firstItem)) + if (!DeleteValue(hWnd, hKeyRoot, keyPath, valueNameW, curIndex==-1 && firstItem)) { HeapFree(GetProcessHeap(), 0, valueNameW); break; @@ -713,8 +709,8 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) firstItem = FALSE; HeapFree(GetProcessHeap(), 0, valueNameW); } - RefreshListView(g_pChildWnd->hListWnd, hKeyRoot, keyPathW, NULL); - HeapFree(GetProcessHeap(), 0, keyPathW); + RefreshListView(g_pChildWnd->hListWnd, hKeyRoot, keyPath, NULL); + HeapFree(GetProcessHeap(), 0, keyPath); } break; case ID_EDIT_MODIFY: @@ -722,10 +718,12 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) LPCWSTR valueNameW = GetValueName(g_pChildWnd->hListWnd); CHAR* valueNameA = GetMultiByteString(valueNameW); WCHAR* keyPathW = GetItemPathW(g_pChildWnd->hTreeWnd, 0, &hKeyRoot); - if (ModifyValue(hWnd, hKeyRoot, keyPath, valueNameA)) + CHAR* keyPathA = GetMultiByteString(keyPathW); + if (ModifyValue(hWnd, hKeyRoot, keyPathA, valueNameA)) RefreshListView(g_pChildWnd->hListWnd, hKeyRoot, keyPathW, valueNameW); HeapFree(GetProcessHeap(), 0, valueNameA); HeapFree(GetProcessHeap(), 0, keyPathW); + HeapFree(GetProcessHeap(), 0, keyPathA); break; } case ID_EDIT_FIND: @@ -774,12 +772,12 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) case ID_EDIT_NEW_KEY: { WCHAR newKeyW[MAX_NEW_KEY_LEN]; - WCHAR* keyPathW = GetWideString(keyPath); - if (CreateKey(hWnd, hKeyRoot, keyPathW, newKeyW)) { + WCHAR* keyPath = GetItemPathW(g_pChildWnd->hTreeWnd, 0, &hKeyRoot); + if (CreateKey(hWnd, hKeyRoot, keyPath, newKeyW)) { if (InsertNode(g_pChildWnd->hTreeWnd, 0, newKeyW)) StartKeyRename(g_pChildWnd->hTreeWnd); } - HeapFree(GetProcessHeap(), 0, keyPathW); + HeapFree(GetProcessHeap(), 0, keyPath); } break; case ID_EDIT_NEW_STRINGVALUE: @@ -795,24 +793,29 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) valueType = REG_DWORD; /* fall through */ create_value: - if (CreateValue(hWnd, hKeyRoot, keyPath, valueType, newKey)) { - WCHAR* keyPathW = GetItemPathW(g_pChildWnd->hTreeWnd, 0, &hKeyRoot); - WCHAR* newKeyW = GetWideString(newKey); - RefreshListView(g_pChildWnd->hListWnd, hKeyRoot, keyPathW, newKeyW); - HeapFree(GetProcessHeap(), 0, keyPathW); - HeapFree(GetProcessHeap(), 0, newKeyW); + { + WCHAR* keyPath = GetItemPathW(g_pChildWnd->hTreeWnd, 0, &hKeyRoot); + WCHAR newKey[MAX_NEW_KEY_LEN]; + if (CreateValue(hWnd, hKeyRoot, keyPath, valueType, newKey)) { + RefreshListView(g_pChildWnd->hListWnd, hKeyRoot, keyPath, newKey); StartValueRename(g_pChildWnd->hListWnd); - /* FIXME: start rename */ - } + /* FIXME: start rename */ + } + HeapFree(GetProcessHeap(), 0, keyPath); + } break; case ID_EDIT_RENAME: - if (keyPath == 0 || *keyPath == 0) { - MessageBeep(MB_ICONHAND); - } else if (GetFocus() == g_pChildWnd->hTreeWnd) { - StartKeyRename(g_pChildWnd->hTreeWnd); - } else if (GetFocus() == g_pChildWnd->hListWnd) { - StartValueRename(g_pChildWnd->hListWnd); - } + { + WCHAR* keyPath = GetItemPathW(g_pChildWnd->hTreeWnd, 0, &hKeyRoot); + if (keyPath == 0 || *keyPath == 0) { + MessageBeep(MB_ICONHAND); + } else if (GetFocus() == g_pChildWnd->hTreeWnd) { + StartKeyRename(g_pChildWnd->hTreeWnd); + } else if (GetFocus() == g_pChildWnd->hListWnd) { + StartValueRename(g_pChildWnd->hListWnd); + } + HeapFree(GetProcessHeap(), 0, keyPath); + } break; case ID_REGISTRY_PRINTERSETUP: /*PRINTDLG pd;*/ @@ -856,10 +859,10 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) } case ID_VIEW_REFRESH: { - WCHAR* keyPathW = GetItemPathW(g_pChildWnd->hTreeWnd, 0, &hKeyRoot); + WCHAR* keyPath = GetItemPathW(g_pChildWnd->hTreeWnd, 0, &hKeyRoot); RefreshTreeView(g_pChildWnd->hTreeWnd); - RefreshListView(g_pChildWnd->hListWnd, hKeyRoot, keyPathW, NULL); - HeapFree(GetProcessHeap(), 0, keyPathW); + RefreshListView(g_pChildWnd->hListWnd, hKeyRoot, keyPath, NULL); + HeapFree(GetProcessHeap(), 0, keyPath); } break; /*case ID_OPTIONS_TOOLBAR:*/ diff --git a/programs/regedit/main.h b/programs/regedit/main.h index af1e9bb..aacacc6 100644 --- a/programs/regedit/main.h +++ b/programs/regedit/main.h @@ -141,7 +141,7 @@ extern HTREEITEM FindNext(HWND hwndTV, HTREEITEM hItem, LPCWSTR sstring, int mod /* edit.c */ extern BOOL CreateKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPWSTR newKeyName); -extern BOOL CreateValue(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath, DWORD valueType, LPTSTR valueName); +extern BOOL CreateValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, DWORD valueType, LPWSTR valueName); extern BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath, LPCTSTR valueName); extern BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath); extern BOOL DeleteValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName, BOOL showMessageBox);
1
0
0
0
Juan Lang : cryptuiapi: Add a stub for CryptUIDlgCertMgr.
by Alexandre Julliard
29 Aug '08
29 Aug '08
Module: wine Branch: master Commit: 6c4d39bcaf2ae817612b876e46d365d13e2b06b1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6c4d39bcaf2ae817612b876e4…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Aug 28 08:41:59 2008 -0700 cryptuiapi: Add a stub for CryptUIDlgCertMgr. --- dlls/cryptui/cryptui.spec | 2 +- dlls/cryptui/main.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletions(-) diff --git a/dlls/cryptui/cryptui.spec b/dlls/cryptui/cryptui.spec index aa4b00a..b023ed2 100644 --- a/dlls/cryptui/cryptui.spec +++ b/dlls/cryptui/cryptui.spec @@ -1,5 +1,5 @@ 1 stub ACUIProviderInvokeUI -2 stub CryptUIDlgCertMgr +2 stdcall CryptUIDlgCertMgr(ptr) 3 stub CryptUIDlgFreeCAContext 4 stub CryptUIDlgSelectCA 5 stub CryptUIDlgSelectCertificateA diff --git a/dlls/cryptui/main.c b/dlls/cryptui/main.c index a951f01..8784915 100644 --- a/dlls/cryptui/main.c +++ b/dlls/cryptui/main.c @@ -22,6 +22,8 @@ #include "windef.h" #include "winbase.h" +#include "winuser.h" +#include "cryptuiapi.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(cryptui); @@ -44,3 +46,12 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) } return TRUE; } + +/*********************************************************************** + * CryptUIDlgCertMgr (CRYPTUI.@) + */ +BOOL WINAPI CryptUIDlgCertMgr(PCCRYPTUI_CERT_MGR_STRUCT pCryptUICertMgr) +{ + FIXME("(%p): stub\n", pCryptUICertMgr); + return FALSE; +}
1
0
0
0
Juan Lang : crypt32: Add tests showing signed CTLs aren' t decoded by CryptDecodeObject.
by Alexandre Julliard
29 Aug '08
29 Aug '08
Module: wine Branch: master Commit: 7ddb29f6fdbb18258e50bdc5f31e764cad8020d4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7ddb29f6fdbb18258e50bdc5f…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Aug 28 08:55:39 2008 -0700 crypt32: Add tests showing signed CTLs aren't decoded by CryptDecodeObject. --- dlls/crypt32/tests/encode.c | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 48 insertions(+), 0 deletions(-) diff --git a/dlls/crypt32/tests/encode.c b/dlls/crypt32/tests/encode.c index 3f5b763..107ed3d 100644 --- a/dlls/crypt32/tests/encode.c +++ b/dlls/crypt32/tests/encode.c @@ -5285,6 +5285,42 @@ static void compareCTLInfo(LPCSTR header, const CTL_INFO *expected, } } +static const BYTE signedCTL[] = { +0x30,0x81,0xc7,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0, +0x81,0xb9,0x30,0x81,0xb6,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a, +0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x28,0x06,0x09,0x2a,0x86, +0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x1b,0x04,0x19,0x30,0x17,0x30,0x00, +0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, +0x30,0x5a,0x30,0x02,0x06,0x00,0x31,0x77,0x30,0x75,0x02,0x01,0x01,0x30,0x1a, +0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75, +0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08, +0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x04,0x06,0x00,0x05, +0x00,0x04,0x40,0xca,0xd8,0x32,0xd1,0xbd,0x97,0x61,0x54,0xd6,0x80,0xcf,0x0d, +0xbd,0xa2,0x42,0xc7,0xca,0x37,0x91,0x7d,0x9d,0xac,0x8c,0xdf,0x05,0x8a,0x39, +0xc6,0x07,0xc1,0x37,0xe6,0xb9,0xd1,0x0d,0x26,0xec,0xa5,0xb0,0x8a,0x51,0x26, +0x2b,0x4f,0x73,0x44,0x86,0x83,0x5e,0x2b,0x6e,0xcc,0xf8,0x1b,0x85,0x53,0xe9, +0x7a,0x80,0x8f,0x6b,0x42,0x19,0x93 }; +static const BYTE signedCTLWithCTLInnerContent[] = { +0x30,0x82,0x01,0x0f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02, +0xa0,0x82,0x01,0x00,0x30,0x81,0xfd,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06, +0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x30,0x06,0x09, +0x2b,0x06,0x01,0x04,0x01,0x82,0x37,0x0a,0x01,0xa0,0x23,0x30,0x21,0x30,0x00, +0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, +0x30,0x5a,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05, +0x00,0x31,0x81,0xb5,0x30,0x81,0xb2,0x02,0x01,0x01,0x30,0x1a,0x30,0x15,0x31, +0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20, +0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48, +0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0xa0,0x3b,0x30,0x18,0x06,0x09,0x2a,0x86, +0x48,0x86,0xf7,0x0d,0x01,0x09,0x03,0x31,0x0b,0x06,0x09,0x2b,0x06,0x01,0x04, +0x01,0x82,0x37,0x0a,0x01,0x30,0x1f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d, +0x01,0x09,0x04,0x31,0x12,0x04,0x10,0x54,0x71,0xbc,0xe1,0x56,0x31,0xa2,0xf9, +0x65,0x70,0x34,0xf8,0xe2,0xe9,0xb4,0xf4,0x30,0x04,0x06,0x00,0x05,0x00,0x04, +0x40,0x2f,0x1b,0x9f,0x5a,0x4a,0x15,0x73,0xfa,0xb1,0x93,0x3d,0x09,0x52,0xdf, +0x6b,0x98,0x4b,0x13,0x5e,0xe7,0xbf,0x65,0xf4,0x9c,0xc2,0xb1,0x77,0x09,0xb1, +0x66,0x4d,0x72,0x0d,0xb1,0x1a,0x50,0x20,0xe0,0x57,0xa2,0x39,0xc7,0xcd,0x7f, +0x8e,0xe7,0x5f,0x76,0x2b,0xd1,0x6a,0x82,0xb3,0x30,0x25,0x61,0xf6,0x25,0x23, +0x57,0x6c,0x0b,0x47,0xb8 }; + static void test_decodeCTL(DWORD dwEncoding) { static char oid1[] = "1.2.3"; @@ -5452,6 +5488,18 @@ static void test_decodeCTL(DWORD dwEncoding) LocalFree(buf); buf = NULL; } + /* A signed CTL isn't decodable, even if the inner content is a CTL */ + SetLastError(0xdeadbeef); + ret = CryptDecodeObjectEx(dwEncoding, PKCS_CTL, signedCTL, + sizeof(signedCTL), CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); + ok(!ret && GetLastError() == CRYPT_E_ASN1_BADTAG, + "expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = CryptDecodeObjectEx(dwEncoding, PKCS_CTL, + signedCTLWithCTLInnerContent, sizeof(signedCTLWithCTLInnerContent), + CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); + ok(!ret && GetLastError() == CRYPT_E_ASN1_BADTAG, + "expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError()); } static const BYTE emptyPKCSContentInfo[] = { 0x30,0x04,0x06,0x02,0x2a,0x03 };
1
0
0
0
Juan Lang : crypt32: Fix typo.
by Alexandre Julliard
29 Aug '08
29 Aug '08
Module: wine Branch: master Commit: 0ab7781d99146c20c889b41a4414805c0dcd2f9d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0ab7781d99146c20c889b41a4…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Aug 28 10:05:30 2008 -0700 crypt32: Fix typo. --- dlls/crypt32/crl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/crypt32/crl.c b/dlls/crypt32/crl.c index 9caf46d..23c623f 100644 --- a/dlls/crypt32/crl.c +++ b/dlls/crypt32/crl.c @@ -386,7 +386,7 @@ static BOOL CRLContext_SetProperty(PCCRL_CONTEXT context, DWORD dwPropId, DWORD dwFlags, const void *pvData) { PCONTEXT_PROPERTY_LIST properties = - Context_GetProperties(context, sizeof(CERT_CONTEXT)); + Context_GetProperties(context, sizeof(CRL_CONTEXT)); BOOL ret; TRACE("(%p, %d, %08x, %p)\n", context, dwPropId, dwFlags, pvData);
1
0
0
0
Juan Lang : crypt32: Fix typo.
by Alexandre Julliard
29 Aug '08
29 Aug '08
Module: wine Branch: master Commit: fc1f9b9157a7913138f44e4969731d35adc06982 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fc1f9b9157a7913138f44e496…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Aug 28 10:05:13 2008 -0700 crypt32: Fix typo. --- dlls/crypt32/provstore.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/crypt32/provstore.c b/dlls/crypt32/provstore.c index b1053ae..33f765d 100644 --- a/dlls/crypt32/provstore.c +++ b/dlls/crypt32/provstore.c @@ -240,13 +240,13 @@ PWINECRYPT_CERTSTORE CRYPT_ProvCreateStore(DWORD dwFlags, ret->provWriteCrl = pProvInfo->rgpvStoreProvFunc[ CERT_STORE_PROV_WRITE_CRL_FUNC]; else - ret->provWriteCert = NULL; + ret->provWriteCrl = NULL; if (pProvInfo->cStoreProvFunc > CERT_STORE_PROV_DELETE_CRL_FUNC) ret->provDeleteCrl = pProvInfo->rgpvStoreProvFunc[ CERT_STORE_PROV_DELETE_CRL_FUNC]; else - ret->provDeleteCert = NULL; + ret->provDeleteCrl = NULL; if (pProvInfo->cStoreProvFunc > CERT_STORE_PROV_CONTROL_FUNC) ret->provControl = pProvInfo->rgpvStoreProvFunc[
1
0
0
0
Juan Lang : wincrypt.h: Add missing definitions.
by Alexandre Julliard
29 Aug '08
29 Aug '08
Module: wine Branch: master Commit: ece736209b2bc6f692282f311f0c82e214b30be1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ece736209b2bc6f692282f311…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Aug 28 10:23:38 2008 -0700 wincrypt.h: Add missing definitions. --- include/wincrypt.h | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/include/wincrypt.h b/include/wincrypt.h index f7d2620..ba16cd5 100644 --- a/include/wincrypt.h +++ b/include/wincrypt.h @@ -2685,6 +2685,33 @@ typedef struct _CRL_FIND_ISSUED_FOR_PARA PCCERT_CONTEXT pIssuerCert; } CRL_FIND_ISSUED_FOR_PARA, *PCRL_FIND_ISSUED_FOR_PARA; +#define CTL_FIND_ANY 0 +#define CTL_FIND_SHA1_HASH 1 +#define CTL_FIND_MD5_HASH 2 +#define CTL_FIND_USAGE 3 +#define CTL_FIND_SUBJECT 4 +#define CTL_FIND_EXISTING 5 + +typedef struct _CTL_FIND_USAGE_PARA +{ + DWORD cbSize; + CTL_USAGE SubjectUsage; + CRYPT_DATA_BLOB ListIdentifier; + PCERT_INFO pSigner; +} CTL_FIND_USAGE_PARA, *PCTL_FIND_USAGE_PARA; + +#define CTL_FIND_NO_LIST_ID_CBDATA 0xffffffff +#define CTL_FIND_NO_SIGNER_PTR ((PCERT_INFO)-1) +#define CTL_FIND_SAME_USAGE_FLAG 0x00000001 + +typedef struct _CTL_FIND_SUBJECT_PARA +{ + DWORD cbSize; + PCTL_FIND_USAGE_PARA pUsagePara; + DWORD dwSubjectType; + void *pvSubject; +} CTL_FIND_SUBJECT_PARA, *PCTL_FIND_SUBJECT_PARA; + /* PFN_CERT_STORE_PROV_WRITE_CERT dwFlags values */ #define CERT_STORE_PROV_WRITE_ADD_FLAG 0x1
1
0
0
0
Juan Lang : wincrypt.h: Fix typos.
by Alexandre Julliard
29 Aug '08
29 Aug '08
Module: wine Branch: master Commit: c950c8d28f906521c386a62ae17c29c092824057 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c950c8d28f906521c386a62ae…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Aug 28 09:34:28 2008 -0700 wincrypt.h: Fix typos. --- include/wincrypt.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/wincrypt.h b/include/wincrypt.h index 0f0cec6..f7d2620 100644 --- a/include/wincrypt.h +++ b/include/wincrypt.h @@ -2947,8 +2947,8 @@ typedef struct _CRL_FIND_ISSUED_FOR_PARA #endif #define szOID_REMOVE_CERTIFICATE "1.3.6.1.4.1.311.10.8.1" #define szOID_CROSS_CERT_DIST_POINTS "1.3.6.1.4.1.311.10.9.1" -#define szOID_CTL "1.3.6.1.4.1.311.10.10.1" -#define szOID_SORTED_CTL "1.3.6.1.4.1.311.10.10.1.1" +#define szOID_CTL "1.3.6.1.4.1.311.10.1" +#define szOID_SORTED_CTL "1.3.6.1.4.1.311.10.1.1" #define szOID_ANY_APPLICATION_POLICY "1.3.6.1.4.1.311.10.12.1" #define szOID_RENEWAL_CERTIFICATE "1.3.6.1.4.1.311.13.1" #define szOID_ENROLLMENT_NAME_VALUE_PAIR "1.3.6.1.4.1.311.13.2.1"
1
0
0
0
Huw Davies : crypt32: Fix streamed, detached updates.
by Alexandre Julliard
29 Aug '08
29 Aug '08
Module: wine Branch: master Commit: e8d834e02d0ee0d1b7fcc96f4dff1697457217a6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e8d834e02d0ee0d1b7fcc96f4…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Aug 28 15:28:26 2008 +0100 crypt32: Fix streamed, detached updates. Thanks to Juan for confirming this is the correct fix. --- dlls/crypt32/msg.c | 2 +- dlls/crypt32/tests/msg.c | 1 - 2 files changed, 1 insertions(+), 2 deletions(-) diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c index 82bed31..449b944 100644 --- a/dlls/crypt32/msg.c +++ b/dlls/crypt32/msg.c @@ -1880,7 +1880,7 @@ static BOOL CDecodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData, } } } - if (ret && + if (ret && fFinal && ((msg->base.open_flags & CMSG_DETACHED_FLAG && msg->base.state == MsgStateDataFinalized) || (!(msg->base.open_flags & CMSG_DETACHED_FLAG) && msg->base.state == diff --git a/dlls/crypt32/tests/msg.c b/dlls/crypt32/tests/msg.c index e9e2018..aa969e1 100644 --- a/dlls/crypt32/tests/msg.c +++ b/dlls/crypt32/tests/msg.c @@ -2248,7 +2248,6 @@ static void test_decode_msg_update(void) ret = CryptMsgUpdate(msg, NULL, 0, TRUE); ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); ret = CryptMsgUpdate(msg, detachedSignedContent, sizeof(detachedSignedContent), FALSE); - todo_wine ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); ret = CryptMsgUpdate(msg, NULL, 0, TRUE); ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError());
1
0
0
0
Huw Davies : crypt32/tests: Add a test for streamed, detached updates.
by Alexandre Julliard
29 Aug '08
29 Aug '08
Module: wine Branch: master Commit: 152a55eef2a45b30ec14abca36833ab2a18fc2c9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=152a55eef2a45b30ec14abca3…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Aug 28 14:54:24 2008 +0100 crypt32/tests: Add a test for streamed, detached updates. --- dlls/crypt32/tests/msg.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/dlls/crypt32/tests/msg.c b/dlls/crypt32/tests/msg.c index c734e6f..e9e2018 100644 --- a/dlls/crypt32/tests/msg.c +++ b/dlls/crypt32/tests/msg.c @@ -2241,6 +2241,22 @@ static void test_decode_msg_update(void) ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, "expected CRYPT_E_MSG_ERROR, got %08x\n", GetLastError()); CryptMsgClose(msg); + + msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, 0, 0, NULL, &streamInfo); + ret = CryptMsgUpdate(msg, detachedSignedContent, sizeof(detachedSignedContent), FALSE); + ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ret = CryptMsgUpdate(msg, NULL, 0, TRUE); + ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ret = CryptMsgUpdate(msg, detachedSignedContent, sizeof(detachedSignedContent), FALSE); + todo_wine + ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ret = CryptMsgUpdate(msg, NULL, 0, TRUE); + ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + + ret = CryptMsgUpdate(msg, detachedSignedContent, sizeof(detachedSignedContent), TRUE); + ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, + "expected CRYPT_E_MSG_ERROR, got %08x\n", GetLastError()); + CryptMsgClose(msg); } static const BYTE hashParam[] = { 0x08,0xd6,0xc0,0x5a,0x21,0x51,0x2a,0x79,0xa1,
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
84
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
Results per page:
10
25
50
100
200