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
September 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
3 participants
1215 discussions
Start a n
N
ew thread
Alexander Nicolaysen Sørnes : regedit: Convert listview init to unicode.
by Alexandre Julliard
02 Sep '08
02 Sep '08
Module: wine Branch: master Commit: d0991c92d77d2cb1e9dbf6e97c2d4540c43c74d2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d0991c92d77d2cb1e9dbf6e97…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Sun Aug 31 14:53:30 2008 +0200 regedit: Convert listview init to unicode. --- programs/regedit/listview.c | 21 +++++++++++---------- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/programs/regedit/listview.c b/programs/regedit/listview.c index 69b7865..f4a239f 100644 --- a/programs/regedit/listview.c +++ b/programs/regedit/listview.c @@ -240,15 +240,15 @@ static BOOL InitListViewImageList(HWND hWndListView) if (!himl) return FALSE; - hicon = LoadImage(hInst, MAKEINTRESOURCE(IDI_STRING), + hicon = LoadImageW(hInst, MAKEINTRESOURCEW(IDI_STRING), IMAGE_ICON, cx, cy, LR_DEFAULTCOLOR); Image_String = ImageList_AddIcon(himl, hicon); - hicon = LoadImage(hInst, MAKEINTRESOURCE(IDI_BIN), + hicon = LoadImageW(hInst, MAKEINTRESOURCEW(IDI_BIN), IMAGE_ICON, cx, cy, LR_DEFAULTCOLOR); Image_Binary = ImageList_AddIcon(himl, hicon); - SendMessage( hWndListView, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM) himl ); + SendMessageW( hWndListView, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM) himl ); /* fail if some of the icons failed to load */ if (ImageList_GetImageCount(himl) < 2) @@ -259,9 +259,9 @@ static BOOL InitListViewImageList(HWND hWndListView) static BOOL CreateListColumns(HWND hWndListView) { - TCHAR szText[50]; + WCHAR szText[50]; int index; - LV_COLUMN lvC; + LVCOLUMNW lvC; /* Create columns. */ lvC.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM; @@ -272,8 +272,8 @@ static BOOL CreateListColumns(HWND hWndListView) lvC.iSubItem = index; lvC.cx = default_column_widths[index]; lvC.fmt = column_alignment[index]; - LoadString(hInst, IDS_LIST_COLUMN_FIRST + index, szText, sizeof(szText)/sizeof(TCHAR)); - if (ListView_InsertColumn(hWndListView, index, &lvC) == -1) return FALSE; + LoadStringW(hInst, IDS_LIST_COLUMN_FIRST + index, szText, sizeof(szText)/sizeof(WCHAR)); + if (ListView_InsertColumnW(hWndListView, index, &lvC) == -1) return FALSE; } return TRUE; } @@ -493,6 +493,7 @@ HWND CreateListView(HWND hwndParent, UINT id) { RECT rcClient; HWND hwndLV; + WCHAR ListView[] = {'L','i','s','t',' ','V','i','e','w',0}; /* prepare strings */ LoadString(hInst, IDS_REGISTRY_VALUE_NOT_SET, g_szValueNotSet, COUNT_OF(g_szValueNotSet)); @@ -500,17 +501,17 @@ HWND CreateListView(HWND hwndParent, UINT id) /* Get the dimensions of the parent window's client area, and create the list view control. */ GetClientRect(hwndParent, &rcClient); - hwndLV = CreateWindowEx(WS_EX_CLIENTEDGE, WC_LISTVIEW, _T("List View"), + hwndLV = CreateWindowExW(WS_EX_CLIENTEDGE, WC_LISTVIEWW, ListView, WS_VISIBLE | WS_CHILD | WS_TABSTOP | LVS_REPORT | LVS_EDITLABELS, 0, 0, rcClient.right, rcClient.bottom, hwndParent, (HMENU)ULongToHandle(id), hInst, NULL); if (!hwndLV) return NULL; - SendMessage(hwndLV, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT); + SendMessageW(hwndLV, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT); /* Initialize the image list */ if (!InitListViewImageList(hwndLV)) goto fail; if (!CreateListColumns(hwndLV)) goto fail; - g_orgListWndProc = (WNDPROC) SetWindowLongPtr(hwndLV, GWLP_WNDPROC, (LPARAM)ListWndProc); + g_orgListWndProc = (WNDPROC) SetWindowLongPtrW(hwndLV, GWLP_WNDPROC, (LPARAM)ListWndProc); return hwndLV; fail: DestroyWindow(hwndLV);
1
0
0
0
Alexander Nicolaysen Sørnes : regedit: Fix a memory leak.
by Alexandre Julliard
02 Sep '08
02 Sep '08
Module: wine Branch: master Commit: fef36600242fd603bbc03633d747595d01ef660c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fef36600242fd603bbc03633d…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Sun Aug 31 01:23:17 2008 +0200 regedit: Fix a memory leak. --- programs/regedit/childwnd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/programs/regedit/childwnd.c b/programs/regedit/childwnd.c index bb8cf6f..9e6e9e0 100644 --- a/programs/regedit/childwnd.c +++ b/programs/regedit/childwnd.c @@ -138,7 +138,7 @@ static LPWSTR GetPathRoot(HWND hwndTV, HTREEITEM hItem, BOOL bFull) { HKEY hRootKey = NULL; if (!hItem) hItem = TreeView_GetSelection(hwndTV); - GetItemPath(hwndTV, hItem, &hRootKey); + HeapFree(GetProcessHeap(), 0, GetItemPath(hwndTV, hItem, &hRootKey)); if (!bFull && !hRootKey) return NULL; if (hRootKey)
1
0
0
0
Alexander Nicolaysen Sørnes : regedit: Remove some ANSI functions.
by Alexandre Julliard
02 Sep '08
02 Sep '08
Module: wine Branch: master Commit: e26b563ee1e27e18b19844044ab014eb65730cb8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e26b563ee1e27e18b19844044…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Sun Aug 31 00:57:41 2008 +0200 regedit: Remove some ANSI functions. --- programs/regedit/childwnd.c | 80 ++++++------------------------------------ programs/regedit/framewnd.c | 37 +++++++++++--------- programs/regedit/main.h | 6 +-- programs/regedit/treeview.c | 74 ++++----------------------------------- 4 files changed, 42 insertions(+), 155 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=e26b563ee1e27e18b1984…
1
0
0
0
Alexander Nicolaysen Sørnes : regedit: Convert key renaming to unicode.
by Alexandre Julliard
02 Sep '08
02 Sep '08
Module: wine Branch: master Commit: 6b7ebf08812bde7dceaadeccf5cea11db4b0244f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6b7ebf08812bde7dceaadeccf…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Sat Aug 30 23:50:24 2008 +0200 regedit: Convert key renaming to unicode. --- programs/regedit/childwnd.c | 30 +++++++++++++++++------------- programs/regedit/edit.c | 30 ++++++++++++++++-------------- programs/regedit/main.h | 2 +- 3 files changed, 34 insertions(+), 28 deletions(-) diff --git a/programs/regedit/childwnd.c b/programs/regedit/childwnd.c index 565c90d..a80235a 100644 --- a/programs/regedit/childwnd.c +++ b/programs/regedit/childwnd.c @@ -25,6 +25,7 @@ #include <stdio.h> #include "main.h" +#include "regproc.h" #include "wine/debug.h" #include "wine/unicode.h" @@ -219,13 +220,13 @@ LPWSTR GetItemFullPathW(HWND hwndTV, HTREEITEM hItem, BOOL bFull) { return ret; } -static LPTSTR GetPathFullPath(HWND hwndTV, LPTSTR path) { - LPTSTR parts[2]; - LPTSTR ret; +static LPWSTR GetPathFullPath(HWND hwndTV, LPWSTR path) { + LPWSTR parts[2]; + LPWSTR ret; - parts[0] = GetPathRoot(hwndTV, 0, TRUE); + parts[0] = GetPathRootW(hwndTV, 0, TRUE); parts[1] = path; - ret = CombinePaths((LPCTSTR *)parts, 2); + ret = CombinePathsW((LPCWSTR*)parts, 2); HeapFree(GetProcessHeap(), 0, parts[0]); return ret; } @@ -424,19 +425,22 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa case TVN_ENDLABELEDIT: { HKEY hRootKey; LPNMTVDISPINFO dispInfo = (LPNMTVDISPINFO)lParam; - LPCTSTR path = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hRootKey); - BOOL res = RenameKey(hWnd, hRootKey, path, dispInfo->item.pszText); + WCHAR* itemText = GetWideString(dispInfo->item.pszText); + LPWSTR path = GetItemPathW(g_pChildWnd->hTreeWnd, 0, &hRootKey); + BOOL res = RenameKey(hWnd, hRootKey, path, itemText); if (res) { - TVITEMEX item; - LPTSTR fullPath = GetPathFullPath(g_pChildWnd->hTreeWnd, - dispInfo->item.pszText); + TVITEMEXW item; + LPWSTR fullPath = GetPathFullPath(g_pChildWnd->hTreeWnd, + itemText); item.mask = TVIF_HANDLE | TVIF_TEXT; item.hItem = TreeView_GetSelection(g_pChildWnd->hTreeWnd); - item.pszText = dispInfo->item.pszText; - SendMessage( g_pChildWnd->hTreeWnd, TVM_SETITEMW, 0, (LPARAM)&item ); - SendMessage(hStatusBar, SB_SETTEXT, 0, (LPARAM)fullPath); + item.pszText = itemText; + SendMessageW( g_pChildWnd->hTreeWnd, TVM_SETITEMW, 0, (LPARAM)&item ); + SendMessageW(hStatusBar, SB_SETTEXTW, 0, (LPARAM)fullPath); HeapFree(GetProcessHeap(), 0, fullPath); } + HeapFree(GetProcessHeap(), 0, path); + HeapFree(GetProcessHeap(), 0, itemText); return res; } default: diff --git a/programs/regedit/edit.c b/programs/regedit/edit.c index 3164eb1..0b0c6eb 100644 --- a/programs/regedit/edit.c +++ b/programs/regedit/edit.c @@ -30,6 +30,7 @@ #include <shellapi.h> #include <shlwapi.h> +#include "wine/unicode.h" #include "main.h" #include "regproc.h" #include "resource.h" @@ -536,10 +537,10 @@ done: } -BOOL RenameKey(HWND hwnd, HKEY hRootKey, LPCTSTR keyPath, LPCTSTR newName) +BOOL RenameKey(HWND hwnd, HKEY hRootKey, LPCWSTR keyPath, LPCWSTR newName) { - LPTSTR parentPath = 0; - LPCTSTR srcSubKey = 0; + LPWSTR parentPath = 0; + LPCWSTR srcSubKey = 0; HKEY parentKey = 0; HKEY destKey = 0; BOOL result = FALSE; @@ -548,17 +549,18 @@ BOOL RenameKey(HWND hwnd, HKEY hRootKey, LPCTSTR keyPath, LPCTSTR newName) if (!keyPath || !newName) return FALSE; - if (!strrchr(keyPath, '\\')) { + if (!strrchrW(keyPath, '\\')) { parentKey = hRootKey; srcSubKey = keyPath; } else { - LPTSTR srcSubKey_copy; + LPWSTR srcSubKey_copy; - parentPath = strdup(keyPath); - srcSubKey_copy = strrchr(parentPath, '\\'); + parentPath = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(keyPath)+1)*sizeof(WCHAR)); + lstrcpyW(parentPath, keyPath); + srcSubKey_copy = strrchrW(parentPath, '\\'); *srcSubKey_copy = 0; srcSubKey = srcSubKey_copy + 1; - lRet = RegOpenKeyEx(hRootKey, parentPath, 0, KEY_READ | KEY_CREATE_SUB_KEY, &parentKey); + lRet = RegOpenKeyExW(hRootKey, parentPath, 0, KEY_READ | KEY_CREATE_SUB_KEY, &parentKey); if (lRet != ERROR_SUCCESS) { error_code_messagebox(hwnd, lRet); goto done; @@ -566,9 +568,9 @@ BOOL RenameKey(HWND hwnd, HKEY hRootKey, LPCTSTR keyPath, LPCTSTR newName) } /* The following fails if the old name is the same as the new name. */ - if (!strcmp(srcSubKey, newName)) goto done; + if (!lstrcmpW(srcSubKey, newName)) goto done; - lRet = RegCreateKeyEx(parentKey, newName, 0, NULL, REG_OPTION_NON_VOLATILE, + lRet = RegCreateKeyExW(parentKey, newName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL /* FIXME */, &destKey, &disposition); if (disposition == REG_OPENED_EXISTING_KEY) lRet = ERROR_FILE_EXISTS; /* FIXME: we might want a better error message than this */ @@ -578,15 +580,15 @@ BOOL RenameKey(HWND hwnd, HKEY hRootKey, LPCTSTR keyPath, LPCTSTR newName) } /* FIXME: SHCopyKey does not copy the security attributes */ - lRet = SHCopyKey(parentKey, srcSubKey, destKey, 0); + lRet = SHCopyKeyW(parentKey, srcSubKey, destKey, 0); if (lRet != ERROR_SUCCESS) { RegCloseKey(destKey); - RegDeleteKey(parentKey, newName); + RegDeleteKeyW(parentKey, newName); error_code_messagebox(hwnd, lRet); goto done; } - lRet = SHDeleteKey(hRootKey, keyPath); + lRet = SHDeleteKeyW(hRootKey, keyPath); if (lRet != ERROR_SUCCESS) { error_code_messagebox(hwnd, lRet); goto done; @@ -598,7 +600,7 @@ done: RegCloseKey(destKey); if (parentKey) { RegCloseKey(parentKey); - free(parentPath); + HeapFree(GetProcessHeap(), 0, parentPath); } return result; } diff --git a/programs/regedit/main.h b/programs/regedit/main.h index c9db636..aec4d2f 100644 --- a/programs/regedit/main.h +++ b/programs/regedit/main.h @@ -146,7 +146,7 @@ extern BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR value extern BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath); extern BOOL DeleteValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName, BOOL showMessageBox); extern BOOL RenameValue(HWND hwnd, HKEY hRootKey, LPCWSTR keyPath, LPCWSTR oldName, LPCWSTR newName); -extern BOOL RenameKey(HWND hwnd, HKEY hRootKey, LPCTSTR keyPath, LPCTSTR newName); +extern BOOL RenameKey(HWND hwnd, HKEY hRootKey, LPCWSTR keyPath, LPCWSTR newName); extern void error(HWND hwnd, INT resId, ...); /* hexedit.c */
1
0
0
0
Alexander Nicolaysen Sørnes : regedit: Convert value renaming to unicode.
by Alexandre Julliard
02 Sep '08
02 Sep '08
Module: wine Branch: master Commit: 4a3d8d8cb01ad50bf9276e71876fd7dc2c333752 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4a3d8d8cb01ad50bf9276e718…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Fri Aug 29 22:20:26 2008 +0200 regedit: Convert value renaming to unicode. --- programs/regedit/edit.c | 58 ++++++++---------------------------------- programs/regedit/listview.c | 17 +++++------- programs/regedit/main.h | 2 +- 3 files changed, 19 insertions(+), 58 deletions(-) diff --git a/programs/regedit/edit.c b/programs/regedit/edit.c index c44da85..3164eb1 100644 --- a/programs/regedit/edit.c +++ b/programs/regedit/edit.c @@ -198,51 +198,15 @@ static INT_PTR CALLBACK bin_modify_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wPara return FALSE; } -static BOOL check_value(HWND hwnd, HKEY hKey, LPCTSTR valueName) +static BOOL check_value(HWND hwnd, HKEY hKey, LPCWSTR valueName) { - LONG lRet = RegQueryValueEx(hKey, valueName ? valueName : _T(""), 0, NULL, 0, NULL); + WCHAR empty = 0; + LONG lRet = RegQueryValueExW(hKey, valueName ? valueName : &empty, 0, NULL, 0, NULL); if(lRet != ERROR_SUCCESS) return FALSE; return TRUE; } -static LPTSTR read_value(HWND hwnd, HKEY hKey, LPCTSTR valueName, DWORD *lpType, LONG *len) -{ - DWORD valueDataLen; - LPTSTR buffer = NULL; - LONG lRet; - - lRet = RegQueryValueEx(hKey, valueName ? valueName : _T(""), 0, lpType, 0, &valueDataLen); - if (lRet != ERROR_SUCCESS) { - if (lRet == ERROR_FILE_NOT_FOUND && !valueName) { /* no default value here, make it up */ - if (len) *len = 1; - if (lpType) *lpType = REG_SZ; - buffer = HeapAlloc(GetProcessHeap(), 0, 1); - *buffer = '\0'; - return buffer; - } - error(hwnd, IDS_BAD_VALUE, valueName); - goto done; - } - if ( *lpType == REG_DWORD ) valueDataLen = sizeof(DWORD); - if (!(buffer = HeapAlloc(GetProcessHeap(), 0, valueDataLen+1))) { - error(hwnd, IDS_TOO_BIG_VALUE, valueDataLen); - goto done; - } - lRet = RegQueryValueEx(hKey, valueName, 0, 0, (LPBYTE)buffer, &valueDataLen); - if (lRet != ERROR_SUCCESS) { - error(hwnd, IDS_BAD_VALUE, valueName); - goto done; - } - buffer[valueDataLen] = 0; - if(len) *len = valueDataLen; - return buffer; - -done: - HeapFree(GetProcessHeap(), 0, buffer); - return NULL; -} - -static LPWSTR read_valueW(HWND hwnd, HKEY hKey, LPCWSTR valueName, DWORD *lpType, LONG *len) +static LPWSTR read_value(HWND hwnd, HKEY hKey, LPCWSTR valueName, DWORD *lpType, LONG *len) { DWORD valueDataLen; LPWSTR buffer = NULL; @@ -335,7 +299,7 @@ BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName) } editValueName = valueName ? valueName : g_pszDefaultValueNameW; - if(!(stringValueData = read_valueW(hwnd, hKey, valueName, &type, &len))) goto done; + if(!(stringValueData = read_value(hwnd, hKey, valueName, &type, &len))) goto done; if ( (type == REG_SZ) || (type == REG_EXPAND_SZ) ) { if (DialogBoxW(0, MAKEINTRESOURCEW(IDD_EDIT_STRING), hwnd, modify_dlgproc) == IDOK) { @@ -532,9 +496,9 @@ done: return result; } -BOOL RenameValue(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath, LPCTSTR oldName, LPCTSTR newName) +BOOL RenameValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR oldName, LPCWSTR newName) { - LPTSTR value = NULL; + LPWSTR value = NULL; DWORD type; LONG len, lRet; BOOL result = FALSE; @@ -543,7 +507,7 @@ BOOL RenameValue(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath, LPCTSTR oldName, LPC if (!oldName) return FALSE; if (!newName) return FALSE; - 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; @@ -552,14 +516,14 @@ BOOL RenameValue(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath, LPCTSTR oldName, LPC if (check_value(hwnd, hKey, newName)) goto done; value = read_value(hwnd, hKey, oldName, &type, &len); if(!value) goto done; - lRet = RegSetValueEx(hKey, newName, 0, type, (BYTE*)value, len); + lRet = RegSetValueExW(hKey, newName, 0, type, (BYTE*)value, len); if (lRet != ERROR_SUCCESS) { error_code_messagebox(hwnd, lRet); goto done; } - lRet = RegDeleteValue(hKey, oldName); + lRet = RegDeleteValueW(hKey, oldName); if (lRet != ERROR_SUCCESS) { - RegDeleteValue(hKey, newName); + RegDeleteValueW(hKey, newName); error_code_messagebox(hwnd, lRet); goto done; } diff --git a/programs/regedit/listview.c b/programs/regedit/listview.c index 0a919a0..69b7865 100644 --- a/programs/regedit/listview.c +++ b/programs/regedit/listview.c @@ -422,20 +422,17 @@ static LRESULT CALLBACK ListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPAR break; case LVN_ENDLABELEDIT: { LPNMLVDISPINFO dispInfo = (LPNMLVDISPINFO)lParam; - LPTSTR valueName = GetItemText(hWnd, dispInfo->item.iItem); - LPSTR pathA; + LPWSTR oldName = GetItemTextW(hWnd, dispInfo->item.iItem); + WCHAR* newName = GetWideString(dispInfo->item.pszText); LONG ret; - if (!valueName) return -1; /* cannot rename a default value */ - pathA = GetMultiByteString(g_currentPath); - ret = RenameValue(hWnd, g_currentRootKey, pathA, valueName, dispInfo->item.pszText); - HeapFree(GetProcessHeap(), 0, pathA); + if (!oldName) return -1; /* cannot rename a default value */ + ret = RenameValue(hWnd, g_currentRootKey, g_currentPath, oldName, newName); if (ret) { - WCHAR* itemTextW = GetWideString(dispInfo->item.pszText); - RefreshListView(hWnd, g_currentRootKey, g_currentPath, itemTextW); - HeapFree(GetProcessHeap(), 0, itemTextW); + RefreshListView(hWnd, g_currentRootKey, g_currentPath, newName); } - HeapFree(GetProcessHeap(), 0, valueName); + HeapFree(GetProcessHeap(), 0, newName); + HeapFree(GetProcessHeap(), 0, oldName); return 0; } case NM_RETURN: { diff --git a/programs/regedit/main.h b/programs/regedit/main.h index df1dbf5..c9db636 100644 --- a/programs/regedit/main.h +++ b/programs/regedit/main.h @@ -145,7 +145,7 @@ extern BOOL CreateValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, DWORD valueTy extern BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName); extern BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath); extern BOOL DeleteValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName, BOOL showMessageBox); -extern BOOL RenameValue(HWND hwnd, HKEY hRootKey, LPCTSTR keyPath, LPCTSTR oldName, LPCTSTR newName); +extern BOOL RenameValue(HWND hwnd, HKEY hRootKey, LPCWSTR keyPath, LPCWSTR oldName, LPCWSTR newName); extern BOOL RenameKey(HWND hwnd, HKEY hRootKey, LPCTSTR keyPath, LPCTSTR newName); extern void error(HWND hwnd, INT resId, ...);
1
0
0
0
Alexander Nicolaysen Sørnes : regedit: Don't try to convert NULL pointers.
by Alexandre Julliard
02 Sep '08
02 Sep '08
Module: wine Branch: master Commit: 7aa56d249a4faf7d4ded68a817889979977ad366 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7aa56d249a4faf7d4ded68a81…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Sat Aug 30 01:23:09 2008 +0200 regedit: Don't try to convert NULL pointers. --- programs/regedit/regproc.c | 36 ++++++++++++++++++++++-------------- 1 files changed, 22 insertions(+), 14 deletions(-) diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c index eb724be..a085ae4 100644 --- a/programs/regedit/regproc.c +++ b/programs/regedit/regproc.c @@ -70,13 +70,17 @@ if (!(p)) \ */ WCHAR* GetWideString(const char* strA) { - WCHAR* strW = NULL; - int len = MultiByteToWideChar(CP_ACP, 0, strA, -1, NULL, 0); + if(strA) + { + WCHAR* strW = NULL; + int len = MultiByteToWideChar(CP_ACP, 0, strA, -1, NULL, 0); - strW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); - CHECK_ENOUGH_MEMORY(strW); - MultiByteToWideChar(CP_ACP, 0, strA, -1, strW, len); - return strW; + strW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + CHECK_ENOUGH_MEMORY(strW); + MultiByteToWideChar(CP_ACP, 0, strA, -1, strW, len); + return strW; + } + return NULL; } /****************************************************************************** @@ -85,13 +89,17 @@ WCHAR* GetWideString(const char* strA) */ char* GetMultiByteString(const WCHAR* strW) { - char* strA = NULL; - int len = WideCharToMultiByte(CP_ACP, 0, strW, -1, NULL, 0, NULL, NULL); + if(strW) + { + char* strA = NULL; + int len = WideCharToMultiByte(CP_ACP, 0, strW, -1, NULL, 0, NULL, NULL); - strA = HeapAlloc(GetProcessHeap(), 0, len); - CHECK_ENOUGH_MEMORY(strA); - WideCharToMultiByte(CP_ACP, 0, strW, -1, strA, len, NULL, NULL); - return strA; + strA = HeapAlloc(GetProcessHeap(), 0, len); + CHECK_ENOUGH_MEMORY(strA); + WideCharToMultiByte(CP_ACP, 0, strW, -1, strA, len, NULL, NULL); + return strA; + } + return NULL; } /******************************************************************************
1
0
0
0
Alexander Nicolaysen Sørnes : regedit: Remove old fixme.
by Alexandre Julliard
02 Sep '08
02 Sep '08
Module: wine Branch: master Commit: df84eb514c4d6b22473b0ec6b9713559737c7f44 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=df84eb514c4d6b22473b0ec6b…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Fri Aug 29 22:11:11 2008 +0200 regedit: Remove old fixme. --- programs/regedit/framewnd.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/programs/regedit/framewnd.c b/programs/regedit/framewnd.c index ed97092..c083f06 100644 --- a/programs/regedit/framewnd.c +++ b/programs/regedit/framewnd.c @@ -795,7 +795,6 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) if (CreateValue(hWnd, hKeyRoot, keyPath, valueType, newKey)) { RefreshListView(g_pChildWnd->hListWnd, hKeyRoot, keyPath, newKey); StartValueRename(g_pChildWnd->hListWnd); - /* FIXME: start rename */ } HeapFree(GetProcessHeap(), 0, keyPath); }
1
0
0
0
Alexander Nicolaysen Sørnes : regedit: Convert value editing to unicode.
by Alexandre Julliard
02 Sep '08
02 Sep '08
Module: wine Branch: master Commit: 1e56f94945a2418fdf5db914e88838585437e25e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1e56f94945a2418fdf5db914e…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Fri Aug 29 21:37:43 2008 +0200 regedit: Convert value editing to unicode. --- programs/regedit/edit.c | 103 ++++++++++++++++++++++++++++++------------ programs/regedit/framewnd.c | 14 ++---- programs/regedit/main.h | 2 +- 3 files changed, 79 insertions(+), 40 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=1e56f94945a2418fdf5db…
1
0
0
0
Gerald Pfeifer : winenas: Add return statement to wodPlayer().
by Alexandre Julliard
02 Sep '08
02 Sep '08
Module: wine Branch: master Commit: 377f14c7e356d7e1ab4ce7b8b8bed606b381b74c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=377f14c7e356d7e1ab4ce7b8b…
Author: Gerald Pfeifer <gerald(a)pfeifer.com> Date: Sat Aug 30 12:51:37 2008 +0200 winenas: Add return statement to wodPlayer(). --- dlls/winenas.drv/audio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/winenas.drv/audio.c b/dlls/winenas.drv/audio.c index 3efe3b4..51092a8 100644 --- a/dlls/winenas.drv/audio.c +++ b/dlls/winenas.drv/audio.c @@ -867,7 +867,7 @@ static DWORD CALLBACK wodPlayer(LPVOID pmt) nas_add_buffer(wwo); wodPlayer_PlayPtrNext(wwo); } - + return 0; } }
1
0
0
0
Gerald Pfeifer : quartz: Add return statement to PullPin_Thread_Main().
by Alexandre Julliard
02 Sep '08
02 Sep '08
Module: wine Branch: master Commit: dc302b7c1dfb3154e04fbbae11255985783a33f0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dc302b7c1dfb3154e04fbbae1…
Author: Gerald Pfeifer <gerald(a)pfeifer.com> Date: Sat Aug 30 12:38:57 2008 +0200 quartz: Add return statement to PullPin_Thread_Main(). --- dlls/quartz/pin.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/quartz/pin.c b/dlls/quartz/pin.c index e2b868e..bcf09a5 100644 --- a/dlls/quartz/pin.c +++ b/dlls/quartz/pin.c @@ -1611,6 +1611,7 @@ static DWORD WINAPI PullPin_Thread_Main(LPVOID pv) default: ERR("Unknown state request: %d\n", This->state); break; } } + return 0; } static HRESULT PullPin_InitProcessing(PullPin * This)
1
0
0
0
← Newer
1
...
115
116
117
118
119
120
121
122
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
Results per page:
10
25
50
100
200