winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
February 2007
----- 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
4 participants
839 discussions
Start a n
N
ew thread
Felix Nawothnig : comctl32: Add listview WM_PAINT message sequence tests.
by Alexandre Julliard
28 Feb '07
28 Feb '07
Module: wine Branch: master Commit: f671aed503708316b7f428c4b4c2f1bb27245d4e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f671aed503708316b7f428c4b…
Author: Felix Nawothnig <flexo(a)holycrap.org> Date: Wed Feb 28 18:06:43 2007 +0100 comctl32: Add listview WM_PAINT message sequence tests. --- dlls/comctl32/tests/listview.c | 213 +++++++++++++++++++++++++++++++++++++++- 1 files changed, 210 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 8850091..4ec1d1d 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -23,10 +23,193 @@ #include <commctrl.h> #include "wine/test.h" +#include "msg.h" + +#define PARENT_SEQ_INDEX 0 +#define LISTVIEW_SEQ_INDEX 1 +#define NUM_MSG_SEQUENCES 2 + +#define LISTVIEW_ID 0 +#define HEADER_ID 1 + +HWND hwndparent; + +static struct msg_sequence *sequences[NUM_MSG_SEQUENCES]; + +static const struct message redraw_listview_seq[] = { + { WM_PAINT, sent|id, 0, 0, LISTVIEW_ID }, + { WM_PAINT, sent|id, 0, 0, HEADER_ID }, + { WM_NCPAINT, sent|id|defwinproc, 0, 0, HEADER_ID }, + { WM_ERASEBKGND, sent|id|defwinproc, 0, 0, HEADER_ID }, + { WM_NOTIFY, sent|id|defwinproc, 0, 0, LISTVIEW_ID }, + { WM_NCPAINT, sent|id|defwinproc, 0, 0, LISTVIEW_ID }, + { WM_ERASEBKGND, sent|id|defwinproc, 0, 0, LISTVIEW_ID }, + { 0 } +}; + +struct subclass_info +{ + WNDPROC oldproc; +}; + +static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + static long defwndproc_counter = 0; + LRESULT ret; + struct message msg; + + /* do not log painting messages */ + if (message != WM_PAINT && + message != WM_ERASEBKGND && + message != WM_NCPAINT && + message != WM_NCHITTEST && + message != WM_GETTEXT && + message != WM_GETICON && + message != WM_DEVICECHANGE) + { + trace("parent: %p, %04x, %08x, %08lx\n", hwnd, message, wParam, lParam); + + msg.message = message; + msg.flags = sent|wparam|lparam; + if (defwndproc_counter) msg.flags |= defwinproc; + msg.wParam = wParam; + msg.lParam = lParam; + add_message(sequences, PARENT_SEQ_INDEX, &msg); + } + + defwndproc_counter++; + ret = DefWindowProcA(hwnd, message, wParam, lParam); + defwndproc_counter--; + + return ret; +} + +static BOOL register_parent_wnd_class(void) +{ + WNDCLASSA cls; + + cls.style = 0; + cls.lpfnWndProc = parent_wnd_proc; + cls.cbClsExtra = 0; + cls.cbWndExtra = 0; + cls.hInstance = GetModuleHandleA(NULL); + cls.hIcon = 0; + cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hbrBackground = GetStockObject(WHITE_BRUSH); + cls.lpszMenuName = NULL; + cls.lpszClassName = "Listview test parent class"; + return RegisterClassA(&cls); +} + +static HWND create_parent_window(void) +{ + if (!register_parent_wnd_class()) + return NULL; + + return CreateWindowEx(0, "Listview test parent class", + "Listview test parent window", + WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | + WS_MAXIMIZEBOX | WS_VISIBLE, + 0, 0, 100, 100, + GetDesktopWindow(), NULL, GetModuleHandleA(NULL), NULL); +} + +static LRESULT WINAPI listview_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + struct subclass_info *info = (struct subclass_info *)GetWindowLongA(hwnd, GWL_USERDATA); + static long defwndproc_counter = 0; + LRESULT ret; + struct message msg; + + trace("listview: %p, %04x, %08x, %08lx\n", hwnd, message, wParam, lParam); + + msg.message = message; + msg.flags = sent|wparam|lparam; + if (defwndproc_counter) msg.flags |= defwinproc; + msg.wParam = wParam; + msg.lParam = lParam; + msg.id = LISTVIEW_ID; + add_message(sequences, LISTVIEW_SEQ_INDEX, &msg); + + defwndproc_counter++; + ret = CallWindowProcA(info->oldproc, hwnd, message, wParam, lParam); + defwndproc_counter--; + return ret; +} + +static HWND create_listview_control() +{ + struct subclass_info *info; + HWND hwnd; + RECT rect; + + info = HeapAlloc(GetProcessHeap(), 0, sizeof(struct subclass_info)); + if (!info) + return NULL; + + GetClientRect(hwndparent, &rect); + hwnd = CreateWindowExA(0, WC_LISTVIEW, "foo", + WS_CHILD | WS_BORDER | WS_VISIBLE | LVS_REPORT, + 0, 0, rect.right, rect.bottom, + hwndparent, NULL, GetModuleHandleA(NULL), NULL); + ok(hwnd != NULL, "gle=%d\n", GetLastError()); + + if (!hwnd) + { + HeapFree(GetProcessHeap(), 0, info); + return NULL; + } + + info->oldproc = (WNDPROC)SetWindowLongA(hwnd, GWL_WNDPROC, + (LONG)listview_subclass_proc); + SetWindowLongA(hwnd, GWL_USERDATA, (LONG)info); + + return hwnd; +} + +static LRESULT WINAPI header_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + struct subclass_info *info = (struct subclass_info *)GetWindowLongA(hwnd, GWL_USERDATA); + static long defwndproc_counter = 0; + LRESULT ret; + struct message msg; + + trace("header: %p, %04x, %08x, %08lx\n", hwnd, message, wParam, lParam); + + msg.message = message; + msg.flags = sent|wparam|lparam; + if (defwndproc_counter) msg.flags |= defwinproc; + msg.wParam = wParam; + msg.lParam = lParam; + msg.id = HEADER_ID; + add_message(sequences, LISTVIEW_SEQ_INDEX, &msg); + + defwndproc_counter++; + ret = CallWindowProcA(info->oldproc, hwnd, message, wParam, lParam); + defwndproc_counter--; + return ret; +} + +static HWND subclass_header(HWND hwndListview) +{ + struct subclass_info *info; + HWND hwnd; + + info = HeapAlloc(GetProcessHeap(), 0, sizeof(struct subclass_info)); + if (!info) + return NULL; + + hwnd = ListView_GetHeader(hwndListview); + info->oldproc = (WNDPROC)SetWindowLongA(hwnd, GWL_WNDPROC, + (LONG)header_subclass_proc); + SetWindowLongA(hwnd, GWL_USERDATA, (LONG)info); + + return hwnd; +} static void test_images(void) { - HWND hwnd, hwndparent = 0; + HWND hwnd; DWORD r; LVITEM item; HIMAGELIST himl; @@ -95,7 +278,7 @@ static void test_images(void) static void test_checkboxes(void) { - HWND hwnd, hwndparent = 0; + HWND hwnd; LVITEMA item; DWORD r; static CHAR text[] = "Text", @@ -236,7 +419,7 @@ static void test_checkboxes(void) static void test_items(void) { const LPARAM lparamTest = 0x42; - HWND hwnd, hwndparent = 0; + HWND hwnd; LVITEMA item; LVCOLUMNA column; DWORD r; @@ -378,6 +561,25 @@ static void test_create() DestroyWindow(hList); } +static void test_redraw(void) +{ + HWND hwnd, hwndheader; + + hwnd = create_listview_control(); + hwndheader = subclass_header(hwnd); + + flush_sequences(sequences, NUM_MSG_SEQUENCES); + + trace("invalidate & update\n"); + InvalidateRect(hwnd, NULL, TRUE); + UpdateWindow(hwnd); + ok_sequence(sequences, LISTVIEW_SEQ_INDEX, redraw_listview_seq, "redraw listview", TRUE); + + flush_sequences(sequences, NUM_MSG_SEQUENCES); + + DestroyWindow(hwnd); +} + START_TEST(listview) { INITCOMMONCONTROLSEX icc; @@ -386,8 +588,13 @@ START_TEST(listview) icc.dwSize = sizeof icc; InitCommonControlsEx(&icc); + init_msg_sequences(sequences, NUM_MSG_SEQUENCES); + + hwndparent = create_parent_window(); + test_images(); test_checkboxes(); test_items(); test_create(); + test_redraw(); }
1
0
0
0
James Hawkins : comctl32: Add message ids to allow multi-window test sequences.
by Alexandre Julliard
28 Feb '07
28 Feb '07
Module: wine Branch: master Commit: 2b5f79c9a851961024a2dbffbf2160f698baa6b3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2b5f79c9a851961024a2dbffb…
Author: James Hawkins <truiken(a)gmail.com> Date: Wed Feb 28 18:05:32 2007 +0100 comctl32: Add message ids to allow multi-window test sequences. --- dlls/comctl32/tests/msg.c | 21 +++++++++++++++++++++ dlls/comctl32/tests/msg.h | 4 +++- 2 files changed, 24 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/tests/msg.c b/dlls/comctl32/tests/msg.c index f4dbaef..6d84a76 100644 --- a/dlls/comctl32/tests/msg.c +++ b/dlls/comctl32/tests/msg.c @@ -46,6 +46,7 @@ void add_message(struct msg_sequence **seq, int sequence_index, msg_seq->sequence[msg_seq->count].flags = msg->flags; msg_seq->sequence[msg_seq->count].wParam = msg->wParam; msg_seq->sequence[msg_seq->count].lParam = msg->lParam; + msg_seq->sequence[msg_seq->count].id = msg->id; msg_seq->count++; } @@ -126,6 +127,26 @@ void ok_sequence_(struct msg_sequence **seq, int sequence_index, } } + if (expected->flags & id) + { + if (expected->id != actual->id && todo) + { + todo_wine + { + failcount++; + ok_(file, line) (FALSE, + "%s: in msg 0x%04x expecting id 0x%x got 0x%x\n", + context, expected->message, expected->id, actual->id); + } + } + else + { + ok_(file, line) (expected->id == actual->id, + "%s: in msg 0x%04x expecting id 0x%x got 0x%x\n", + context, expected->message, expected->id, actual->id); + } + } + if ((expected->flags & defwinproc) != (actual->flags & defwinproc) && todo) { todo_wine diff --git a/dlls/comctl32/tests/msg.h b/dlls/comctl32/tests/msg.h index 2be8d25..2ec3ea1 100644 --- a/dlls/comctl32/tests/msg.h +++ b/dlls/comctl32/tests/msg.h @@ -37,7 +37,8 @@ typedef enum beginpaint = 0x40, optional = 0x80, hook = 0x100, - winevent_hook =0x200 + winevent_hook =0x200, + id = 0x400 } msg_flags_t; struct message @@ -46,6 +47,7 @@ struct message msg_flags_t flags; /* message props */ WPARAM wParam; /* expected value of wParam */ LPARAM lParam; /* expected value of lParam */ + UINT id; /* id of the window */ }; struct msg_sequence
1
0
0
0
Alexandre Julliard : advapi32: Create the service manager registry key if needed.
by Alexandre Julliard
28 Feb '07
28 Feb '07
Module: wine Branch: master Commit: 53d838a1bfd8ad1afaf1b47f0717ca4c2963a2a0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=53d838a1bfd8ad1afaf1b47f0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Feb 28 20:51:25 2007 +0100 advapi32: Create the service manager registry key if needed. --- dlls/advapi32/service.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/advapi32/service.c b/dlls/advapi32/service.c index 9e482df..1cd643f 100644 --- a/dlls/advapi32/service.c +++ b/dlls/advapi32/service.c @@ -39,7 +39,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(advapi); static const WCHAR szServiceManagerKey[] = { 'S','y','s','t','e','m','\\', 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', - 'S','e','r','v','i','c','e','s','\\',0 }; + 'S','e','r','v','i','c','e','s',0 }; static const WCHAR szSCMLock[] = {'A','D','V','A','P','I','_','S','C','M', 'L','O','C','K',0}; @@ -1010,8 +1010,7 @@ SC_HANDLE WINAPI OpenSCManagerW( LPCWSTR lpMachineName, LPCWSTR lpDatabaseName, if (r!=ERROR_SUCCESS) goto error; - r = RegOpenKeyExW(hReg, szServiceManagerKey, - 0, KEY_ALL_ACCESS, &manager->hkey); + r = RegCreateKeyW(hReg, szServiceManagerKey, &manager->hkey); RegCloseKey( hReg ); if (r!=ERROR_SUCCESS) goto error;
1
0
0
0
Alexandre Julliard : advapi32: Reimplement QueryServiceConfigA on top of QueryServiceConfigW.
by Alexandre Julliard
28 Feb '07
28 Feb '07
Module: wine Branch: master Commit: ee1706035aea9764efd80eef6ef764396c450439 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ee1706035aea9764efd80eef6…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Feb 28 20:47:51 2007 +0100 advapi32: Reimplement QueryServiceConfigA on top of QueryServiceConfigW. --- dlls/advapi32/service.c | 186 +++++++++++++---------------------------------- 1 files changed, 52 insertions(+), 134 deletions(-) diff --git a/dlls/advapi32/service.c b/dlls/advapi32/service.c index 24b209e..9e482df 100644 --- a/dlls/advapi32/service.c +++ b/dlls/advapi32/service.c @@ -1644,146 +1644,64 @@ BOOL WINAPI QueryServiceStatusEx(SC_HANDLE hService, SC_STATUS_TYPE InfoLevel, /****************************************************************************** * QueryServiceConfigA [ADVAPI32.@] */ -BOOL WINAPI -QueryServiceConfigA( SC_HANDLE hService, - LPQUERY_SERVICE_CONFIGA lpServiceConfig, - DWORD cbBufSize, LPDWORD pcbBytesNeeded) +BOOL WINAPI QueryServiceConfigA( SC_HANDLE hService, LPQUERY_SERVICE_CONFIGA config, + DWORD size, LPDWORD needed ) { - static const CHAR szDisplayName[] = "DisplayName"; - static const CHAR szType[] = "Type"; - static const CHAR szStart[] = "Start"; - static const CHAR szError[] = "ErrorControl"; - static const CHAR szImagePath[] = "ImagePath"; - static const CHAR szGroup[] = "Group"; - static const CHAR szDependencies[] = "Dependencies"; - struct sc_service *hsvc; - HKEY hKey; - CHAR str_buffer[ MAX_PATH ]; - LONG r; - DWORD type, val, sz, total, n; - LPSTR p; - - TRACE("%p %p %d %p\n", hService, lpServiceConfig, - cbBufSize, pcbBytesNeeded); - - hsvc = sc_handle_get_handle_data(hService, SC_HTYPE_SERVICE); - if (!hsvc) - { - SetLastError( ERROR_INVALID_HANDLE ); - return FALSE; - } - hKey = hsvc->hkey; + DWORD n; + LPSTR p, buffer; + BOOL ret; + QUERY_SERVICE_CONFIGW *configW; - /* calculate the size required first */ - total = sizeof (QUERY_SERVICE_CONFIGA); + TRACE("%p %p %d %p\n", hService, config, size, needed); - sz = sizeof(str_buffer); - r = RegQueryValueExA( hKey, szImagePath, 0, &type, (LPBYTE)str_buffer, &sz ); - if( ( r == ERROR_SUCCESS ) && ( type == REG_SZ || type == REG_EXPAND_SZ ) ) - { - sz = ExpandEnvironmentStringsA(str_buffer,NULL,0); - if( 0 == sz ) return FALSE; - - total += sz; - } - else + if (!(buffer = HeapAlloc( GetProcessHeap(), 0, 2 * size ))) { - /* FIXME: set last error */ - return FALSE; - } - - sz = 0; - r = RegQueryValueExA( hKey, szGroup, 0, &type, NULL, &sz ); - if( ( r == ERROR_SUCCESS ) && ( type == REG_SZ ) ) - total += sz; - - sz = 0; - r = RegQueryValueExA( hKey, szDependencies, 0, &type, NULL, &sz ); - if( ( r == ERROR_SUCCESS ) && ( type == REG_MULTI_SZ ) ) - total += sz; - - sz = 0; - r = RegQueryValueExA( hKey, szStart, 0, &type, NULL, &sz ); - if( ( r == ERROR_SUCCESS ) && ( type == REG_SZ ) ) - total += sz; - - sz = 0; - r = RegQueryValueExA( hKey, szDisplayName, 0, &type, NULL, &sz ); - if( ( r == ERROR_SUCCESS ) && ( type == REG_SZ ) ) - total += sz; - - *pcbBytesNeeded = total; - - /* if there's not enough memory, return an error */ - if( total > cbBufSize ) - { - SetLastError( ERROR_INSUFFICIENT_BUFFER ); + SetLastError( ERROR_NOT_ENOUGH_MEMORY ); return FALSE; } - - ZeroMemory( lpServiceConfig, total ); - - sz = sizeof val; - r = RegQueryValueExA( hKey, szType, 0, &type, (LPBYTE)&val, &sz ); - if( ( r == ERROR_SUCCESS ) || ( type == REG_DWORD ) ) - lpServiceConfig->dwServiceType = val; - - sz = sizeof val; - r = RegQueryValueExA( hKey, szStart, 0, &type, (LPBYTE)&val, &sz ); - if( ( r == ERROR_SUCCESS ) || ( type == REG_DWORD ) ) - lpServiceConfig->dwStartType = val; - - sz = sizeof val; - r = RegQueryValueExA( hKey, szError, 0, &type, (LPBYTE)&val, &sz ); - if( ( r == ERROR_SUCCESS ) || ( type == REG_DWORD ) ) - lpServiceConfig->dwErrorControl = val; - - /* now do the strings */ - p = (LPSTR) &lpServiceConfig[1]; - n = total - sizeof (QUERY_SERVICE_CONFIGA); - - sz = sizeof(str_buffer); - r = RegQueryValueExA( hKey, szImagePath, 0, &type, (LPBYTE)str_buffer, &sz ); - if( ( r == ERROR_SUCCESS ) && ( type == REG_SZ || type == REG_EXPAND_SZ ) ) - { - sz = ExpandEnvironmentStringsA(str_buffer, p, n); - if( 0 == sz || sz > n ) return FALSE; - - lpServiceConfig->lpBinaryPathName = p; - p += sz; - n -= sz; - } - else - { - /* FIXME: set last error */ - return FALSE; - } - - sz = n; - r = RegQueryValueExA( hKey, szGroup, 0, &type, (LPBYTE)p, &sz ); - if( ( r == ERROR_SUCCESS ) || ( type == REG_SZ ) ) - { - lpServiceConfig->lpLoadOrderGroup = p; - p += sz; - n -= sz; - } - - sz = n; - r = RegQueryValueExA( hKey, szDependencies, 0, &type, (LPBYTE)p, &sz ); - if( ( r == ERROR_SUCCESS ) || ( type == REG_SZ ) ) - { - lpServiceConfig->lpDependencies = p; - p += sz; - n -= sz; - } - - if( n < 0 ) - ERR("Buffer overflow!\n"); - - TRACE("Image path = %s\n", lpServiceConfig->lpBinaryPathName ); - TRACE("Group = %s\n", lpServiceConfig->lpLoadOrderGroup ); - - return TRUE; + configW = (QUERY_SERVICE_CONFIGW *)buffer; + ret = QueryServiceConfigW( hService, configW, 2 * size, needed ); + if (!ret) goto done; + + config->dwServiceType = configW->dwServiceType; + config->dwStartType = configW->dwStartType; + config->dwErrorControl = configW->dwErrorControl; + config->lpBinaryPathName = NULL; + config->lpLoadOrderGroup = NULL; + config->dwTagId = configW->dwTagId; + config->lpDependencies = NULL; + config->lpServiceStartName = NULL; + config->lpDisplayName = NULL; + + p = (LPSTR)(config + 1); + n = size - sizeof(*config); + ret = FALSE; + +#define MAP_STR(str) \ + do { \ + if (configW->str) \ + { \ + DWORD sz = WideCharToMultiByte( CP_ACP, 0, configW->str, -1, p, n, NULL, NULL ); \ + if (!sz) goto done; \ + config->str = p; \ + p += sz; \ + n -= sz; \ + } \ + } while (0) + + MAP_STR( lpBinaryPathName ); + MAP_STR( lpLoadOrderGroup ); + MAP_STR( lpDependencies ); + MAP_STR( lpServiceStartName ); + MAP_STR( lpDisplayName ); +#undef MAP_STR + + *needed = p - buffer; + ret = TRUE; + +done: + HeapFree( GetProcessHeap(), 0, buffer ); + return ret; } /******************************************************************************
1
0
0
0
Alexandre Julliard : widl: Add missing '\n' on error message.
by Alexandre Julliard
28 Feb '07
28 Feb '07
Module: wine Branch: master Commit: defc1d873ec7e2ef4f5cffc002602347201a4e58 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=defc1d873ec7e2ef4f5cffc00…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Feb 28 20:44:24 2007 +0100 widl: Add missing '\n' on error message. --- tools/widl/typegen.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 9d13a2d..f169f82 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -1428,8 +1428,7 @@ static size_t write_typeformatstring_var(FILE *file, int indent, const func_t *f if (pointer_attr) { if (! ptr_level) - error("'%s': pointer attribute applied to non-pointer type", - var->name); + error("'%s': pointer attribute applied to non-pointer type\n", var->name); pointer_type = pointer_attr; } else
1
0
0
0
Alexandre Julliard : advapi32: Avoid slashes and backslashes in user names.
by Alexandre Julliard
28 Feb '07
28 Feb '07
Module: wine Branch: master Commit: ec636f151b78c3d5bc8e8d0b33fcca1465574a3a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ec636f151b78c3d5bc8e8d0b3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Feb 28 14:51:04 2007 +0100 advapi32: Avoid slashes and backslashes in user names. --- dlls/advapi32/advapi.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/dlls/advapi32/advapi.c b/dlls/advapi32/advapi.c index fbcb1a6..126f8d1 100644 --- a/dlls/advapi32/advapi.c +++ b/dlls/advapi32/advapi.c @@ -84,7 +84,7 @@ BOOL WINAPI GetUserNameW( LPWSTR lpszName, LPDWORD lpSize ) { const char *name = wine_get_user_name(); - DWORD len = MultiByteToWideChar( CP_UNIXCP, 0, name, -1, NULL, 0 ); + DWORD i, len = MultiByteToWideChar( CP_UNIXCP, 0, name, -1, NULL, 0 ); if (len > *lpSize) { @@ -95,6 +95,12 @@ GetUserNameW( LPWSTR lpszName, LPDWORD lpSize ) *lpSize = len; MultiByteToWideChar( CP_UNIXCP, 0, name, -1, lpszName, len ); + + /* Word uses the user name to create named mutexes and file mappings, + * and backslashes in the name cause the creation to fail. + */ + for (i = 0; lpszName[i]; i++) + if (lpszName[i] == '\\' || lpszName[i] == '/') lpszName[i] = '_'; return TRUE; }
1
0
0
0
Dmitry Timoshkov : user32: Fix a test failure when running under Windows 2003.
by Alexandre Julliard
28 Feb '07
28 Feb '07
Module: wine Branch: master Commit: 2d87a7bb7b939630061090cfc1db0ba5e72f52f1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2d87a7bb7b939630061090cfc…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Wed Feb 28 19:13:34 2007 +0800 user32: Fix a test failure when running under Windows 2003. --- dlls/user32/tests/msg.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 7b4505d..53c076f 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -2004,7 +2004,7 @@ static const struct message WmCreateMDIchildInvisibleMaxSeq4[] = { { WM_NCCALCSIZE, sent|wparam, 1 }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */ - { WM_NCCALCSIZE, sent|wparam, 1 }, /* MDI child */ + { WM_NCCALCSIZE, sent|wparam|optional, 1 }, /* MDI child */ { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ /* Win2k sends wparam set to
1
0
0
0
Dmitry Timoshkov : winetest: Set correct WINETEST_PLATFORM when running under Wine.
by Alexandre Julliard
28 Feb '07
28 Feb '07
Module: wine Branch: master Commit: 3c639603e1d5a2e78db74064947b909322cd568b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3c639603e1d5a2e78db740649…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Wed Feb 28 19:13:08 2007 +0800 winetest: Set correct WINETEST_PLATFORM when running under Wine. --- programs/winetest/main.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/programs/winetest/main.c b/programs/winetest/main.c index 2488e30..b7ff003 100644 --- a/programs/winetest/main.c +++ b/programs/winetest/main.c @@ -629,16 +629,20 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst, } if (!submit) { static CHAR platform_windows[] = "WINETEST_PLATFORM=windows", + platform_wine[] = "WINETEST_PLATFORM=wine", debug_yes[] = "WINETEST_DEBUG=1", interactive_no[] = "WINETEST_INTERACTIVE=0", report_success_no[] = "WINETEST_REPORT_SUCCESS=0"; + CHAR *platform; report (R_STATUS, "Starting up"); if (!running_on_visible_desktop ()) report (R_FATAL, "Tests must be run on a visible desktop"); - if (reset_env && (putenv (platform_windows) || + platform = running_under_wine () ? platform_wine : platform_windows; + + if (reset_env && (putenv (platform) || putenv (debug_yes) || putenv (interactive_no) || putenv (report_success_no)))
1
0
0
0
Jason Edmeades : cmd.exe: Fix parameter parsing returns.
by Alexandre Julliard
28 Feb '07
28 Feb '07
Module: wine Branch: master Commit: a7c5906b626fd17de661dc8e12fab71e79c6e1ad URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a7c5906b626fd17de661dc8e1…
Author: Jason Edmeades <us(a)edmeades.me.uk> Date: Tue Feb 27 23:21:59 2007 +0000 cmd.exe: Fix parameter parsing returns. Only return valid values for the location of the parameter if it is the one requested. Currently returns address when ANY quoted or bracketed parameter found. --- programs/cmd/batch.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/programs/cmd/batch.c b/programs/cmd/batch.c index 5a854f7..bbc3f83 100644 --- a/programs/cmd/batch.c +++ b/programs/cmd/batch.c @@ -147,6 +147,7 @@ int i = 0; static char param[MAX_PATH]; char *p; + if (where != NULL) *where = NULL; p = param; while (TRUE) { switch (*s) { @@ -154,7 +155,7 @@ char *p; s++; break; case '"': - if (where != NULL) *where = s; + if (where != NULL && i==n) *where = s; s++; while ((*s != '\0') && (*s != '"')) { *p++ = *s++; @@ -169,7 +170,7 @@ char *p; p = param; break; case '(': - if (where != NULL) *where = s; + if (where != NULL && i==n) *where = s; s++; while ((*s != '\0') && (*s != ')')) { *p++ = *s++;
1
0
0
0
Jason Edmeades : cmd.exe: Support del /a[:].
by Alexandre Julliard
28 Feb '07
28 Feb '07
Module: wine Branch: master Commit: b822e73263c0f9ed3c6c8588b4dd6dc093aea27d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b822e73263c0f9ed3c6c8588b…
Author: Jason Edmeades <us(a)edmeades.me.uk> Date: Tue Feb 27 23:20:55 2007 +0000 cmd.exe: Support del /a[:]. --- programs/cmd/builtins.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 64 insertions(+), 1 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 6b214e1..3c93231 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -224,6 +224,12 @@ void WCMD_create_dir (void) { * * Delete a file or wildcarded set. * + * Note on /A: + * - Testing shows /A is repeatable, eg. /a-r /ar matches all files + * - Each set is a pattern, eg /ahr /as-r means + * readonly+hidden OR nonreadonly system files + * - The '-' applies to a single field, ie /a:-hr means read only + * non-hidden files */ void WCMD_delete (int recurse) { @@ -292,9 +298,66 @@ char *p; else strcpy (fpath, fd.cFileName); if (!(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { BOOL ok = TRUE; + char *nextA = strstr (quals, "/A"); + + /* Handle attribute matching (/A) */ + if (nextA != NULL) { + ok = FALSE; + while (nextA != NULL && !ok) { + + char *thisA = (nextA+2); + BOOL stillOK = TRUE; + + /* Skip optional : */ + if (*thisA == ':') thisA++; + + /* Parse each of the /A[:]xxx in turn */ + while (*thisA && *thisA != '/') { + BOOL negate = FALSE; + BOOL attribute = FALSE; + + /* Match negation of attribute first */ + if (*thisA == '-') { + negate=TRUE; + thisA++; + } + + /* Match attribute */ + switch (*thisA) { + case 'R': attribute = (fd.dwFileAttributes & FILE_ATTRIBUTE_READONLY); + break; + case 'H': attribute = (fd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN); + break; + case 'S': attribute = (fd.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM); + break; + case 'A': attribute = (fd.dwFileAttributes & FILE_ATTRIBUTE_ARCHIVE); + break; + default: + WCMD_output ("Syntax error\n"); + } + + /* Now check result, keeping a running boolean about whether it + matches all parsed attribues so far */ + if (attribute && !negate) { + stillOK = stillOK; + } else if (!attribute && negate) { + stillOK = stillOK; + } else { + stillOK = FALSE; + } + thisA++; + } + + /* Save the running total as the final result */ + ok = stillOK; + + /* Step on to next /A set */ + nextA = strstr (nextA+1, "/A"); + } + } /* /P means prompt for each file */ - if (strstr (quals, "/P") != NULL) { + if (ok && strstr (quals, "/P") != NULL) { char question[MAXSTRING]; /* Ask for confirmation */
1
0
0
0
← Newer
1
2
3
4
5
...
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