winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 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
3 participants
757 discussions
Start a n
N
ew thread
Rob Shearman : ole32: Add tests for CoGetObjectContext.
by Alexandre Julliard
02 Nov '07
02 Nov '07
Module: wine Branch: master Commit: 1d0993341cd5194cd903cbb9b11ce41361e24901 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1d0993341cd5194cd903cbb9b…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Thu Nov 1 13:26:56 2007 +0000 ole32: Add tests for CoGetObjectContext. --- dlls/ole32/tests/compobj.c | 57 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 57 insertions(+), 0 deletions(-) diff --git a/dlls/ole32/tests/compobj.c b/dlls/ole32/tests/compobj.c index 12fe4f6..d7a88f7 100644 --- a/dlls/ole32/tests/compobj.c +++ b/dlls/ole32/tests/compobj.c @@ -33,6 +33,7 @@ /* functions that are not present on all versions of Windows */ HRESULT (WINAPI * pCoInitializeEx)(LPVOID lpReserved, DWORD dwCoInit); +HRESULT (WINAPI * pCoGetObjectContext)(REFIID riid, LPVOID *ppv); #define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr) #define ok_more_than_one_lock() ok(cLocks > 0, "Number of locks should be > 0, but actually is %d\n", cLocks) @@ -938,10 +939,65 @@ static void test_CoFreeUnusedLibraries(void) CoUninitialize(); } +static void test_CoGetObjectContext(void) +{ + HRESULT hr; + ULONG refs; + IComThreadingInfo *pComThreadingInfo; + APTTYPE apttype; + THDTYPE thdtype; + + if (!pCoGetObjectContext) + { + skip("CoGetObjectContext not present\n"); + return; + } + + hr = pCoGetObjectContext(&IID_IComThreadingInfo, (void **)&pComThreadingInfo); + ok(hr == CO_E_NOTINITIALIZED, "CoGetObjectContext should have returned CO_E_NOTINITIALIZED instead of 0x%08x\n", hr); + ok(pComThreadingInfo == NULL, "pComThreadingInfo should have been set to NULL\n"); + + pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); + + hr = pCoGetObjectContext(&IID_IComThreadingInfo, (void **)&pComThreadingInfo); + ok_ole_success(hr, "CoGetObjectContext"); + + hr = IComThreadingInfo_GetCurrentApartmentType(pComThreadingInfo, &apttype); + ok_ole_success(hr, "IComThreadingInfo_GetCurrentApartmentType"); + ok(apttype == APTTYPE_MAINSTA, "apartment type should be APTTYPE_MAINSTA instead of %d\n", apttype); + + hr = IComThreadingInfo_GetCurrentThreadType(pComThreadingInfo, &thdtype); + ok_ole_success(hr, "IComThreadingInfo_GetCurrentThreadType"); + ok(thdtype == THDTYPE_PROCESSMESSAGES, "thread type should be THDTYPE_PROCESSMESSAGES instead of %d\n", thdtype); + + refs = IComThreadingInfo_Release(pComThreadingInfo); + ok(refs == 0, "pComThreadingInfo should have 0 refs instead of %d refs\n", refs); + + CoUninitialize(); + + pCoInitializeEx(NULL, COINIT_MULTITHREADED); + + hr = pCoGetObjectContext(&IID_IComThreadingInfo, (void **)&pComThreadingInfo); + ok_ole_success(hr, "CoGetObjectContext"); + + hr = IComThreadingInfo_GetCurrentApartmentType(pComThreadingInfo, &apttype); + ok_ole_success(hr, "IComThreadingInfo_GetCurrentApartmentType"); + ok(apttype == APTTYPE_MTA, "apartment type should be APTTYPE_MTA instead of %d\n", apttype); + + hr = IComThreadingInfo_GetCurrentThreadType(pComThreadingInfo, &thdtype); + ok_ole_success(hr, "IComThreadingInfo_GetCurrentThreadType"); + ok(thdtype == THDTYPE_BLOCKMESSAGES, "thread type should be THDTYPE_BLOCKMESSAGES instead of %d\n", thdtype); + + refs = IComThreadingInfo_Release(pComThreadingInfo); + ok(refs == 0, "pComThreadingInfo should have 0 refs instead of %d refs\n", refs); + + CoUninitialize(); +} START_TEST(compobj) { HMODULE hOle32 = GetModuleHandle("ole32"); + pCoGetObjectContext = (void*)GetProcAddress(hOle32, "CoGetObjectContext"); if (!(pCoInitializeEx = (void*)GetProcAddress(hOle32, "CoInitializeEx"))) { trace("You need DCOM95 installed to run this test\n"); @@ -964,4 +1020,5 @@ START_TEST(compobj) test_CoRegisterClassObject(); test_registered_object_thread_affinity(); test_CoFreeUnusedLibraries(); + test_CoGetObjectContext(); }
1
0
0
0
Rob Shearman : ole32: Improve the error reporting in the marshal test when CreateProcess fails.
by Alexandre Julliard
02 Nov '07
02 Nov '07
Module: wine Branch: master Commit: 2eb10c2e22b6930b00ccb8e1aa4203e6eb3b32be URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2eb10c2e22b6930b00ccb8e1a…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Thu Nov 1 13:26:33 2007 +0000 ole32: Improve the error reporting in the marshal test when CreateProcess fails. --- dlls/ole32/tests/marshal.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c index ba7793a..d15b879 100644 --- a/dlls/ole32/tests/marshal.c +++ b/dlls/ole32/tests/marshal.c @@ -2469,11 +2469,13 @@ static HANDLE create_target_process(const char *arg) STARTUPINFO si = { 0 }; si.cb = sizeof(si); + pi.hThread = NULL; + pi.hProcess = NULL; winetest_get_mainargs( &argv ); sprintf(cmdline, "%s %s %s", argv[0], argv[1], arg); ok(CreateProcess(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, - &si, &pi) != 0, "error: %u\n", GetLastError()); - ok(CloseHandle(pi.hThread) != 0, "error %u\n", GetLastError()); + &si, &pi) != 0, "CreateProcess failed with error: %u\n", GetLastError()); + if (pi.hThread) CloseHandle(pi.hThread); return pi.hProcess; }
1
0
0
0
Alexandre Julliard : user32: Cache the window class name on the client side .
by Alexandre Julliard
02 Nov '07
02 Nov '07
Module: wine Branch: master Commit: 8b42238b5b420d4ae13f863b3a8db70ccf143cca URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8b42238b5b420d4ae13f863b3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Nov 2 11:57:35 2007 +0100 user32: Cache the window class name on the client side. --- dlls/user32/class.c | 98 +++++++++++++++++++++++++++++++++----------------- 1 files changed, 65 insertions(+), 33 deletions(-) diff --git a/dlls/user32/class.c b/dlls/user32/class.c index e3a2951..9a1dd2f 100644 --- a/dlls/user32/class.c +++ b/dlls/user32/class.c @@ -41,6 +41,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(class); +#define MAX_ATOM_LEN 255 /* from dlls/kernel32/atom.c */ + typedef struct tagCLASS { struct list entry; /* Entry in class list */ @@ -56,12 +58,12 @@ typedef struct tagCLASS HCURSOR hCursor; /* Default cursor */ HBRUSH hbrBackground; /* Default background */ ATOM atomName; /* Name of the class */ + WCHAR name[MAX_ATOM_LEN + 1]; } CLASS; static struct list class_list = LIST_INIT( class_list ); #define CLASS_OTHER_PROCESS ((CLASS *)1) -#define MAX_ATOM_LEN 255 /* from dlls/kernel32/atom.c */ /*********************************************************************** * get_class_ptr @@ -283,29 +285,37 @@ void CLASS_FreeModuleClasses( HMODULE16 hModule ) /*********************************************************************** - * CLASS_FindClassByAtom + * CLASS_FindClass * * Return a pointer to the class. * hinstance has been normalized by the caller. */ -static CLASS *CLASS_FindClassByAtom( ATOM atom, HINSTANCE hinstance ) +static CLASS *CLASS_FindClass( LPCWSTR name, HINSTANCE hinstance ) { struct list *ptr; + ATOM atom = get_int_atom_value( name ); USER_Lock(); LIST_FOR_EACH( ptr, &class_list ) { CLASS *class = LIST_ENTRY( ptr, CLASS, entry ); - if (class->atomName != atom) continue; + if (atom) + { + if (class->atomName != atom) continue; + } + else + { + if (!name || strcmpiW( class->name, name )) continue; + } if (!hinstance || !class->local || class->hInstance == hinstance) { - TRACE("0x%04x %p -> %p\n", atom, hinstance, class); + TRACE("%s %p -> %p\n", debugstr_w(name), hinstance, class); return class; } } USER_Unlock(); - TRACE("0x%04x %p -> not found\n", atom, hinstance); + TRACE("%s %p -> not found\n", debugstr_w(name), hinstance); return NULL; } @@ -339,6 +349,10 @@ static CLASS *CLASS_RegisterClass( LPCWSTR name, HINSTANCE hInstance, BOOL local classPtr = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CLASS) + classExtra ); if (!classPtr) return NULL; + classPtr->atomName = get_int_atom_value( name ); + if (!classPtr->atomName && name) strcpyW( classPtr->name, name ); + else GlobalGetAtomNameW( classPtr->atomName, classPtr->name, sizeof(classPtr->name)/sizeof(WCHAR) ); + SERVER_START_REQ( create_class ) { req->local = local; @@ -347,8 +361,8 @@ static CLASS *CLASS_RegisterClass( LPCWSTR name, HINSTANCE hInstance, BOOL local req->extra = classExtra; req->win_extra = winExtra; req->client_ptr = classPtr; - if (!(req->atom = get_int_atom_value(name)) && name) - wine_server_add_data( req, name, strlenW(name) * sizeof(WCHAR) ); + req->atom = classPtr->atomName; + if (!req->atom && name) wine_server_add_data( req, name, strlenW(name) * sizeof(WCHAR) ); ret = !wine_server_call_err( req ); classPtr->atomName = reply->atom; } @@ -942,6 +956,7 @@ static ULONG_PTR CLASS_SetClassLong( HWND hwnd, INT offset, LONG_PTR newval, if (!set_server_info( hwnd, offset, newval, size )) break; retval = class->atomName; class->atomName = newval; + GlobalGetAtomNameW( newval, class->name, sizeof(class->name)/sizeof(WCHAR) ); break; case GCL_CBCLSEXTRA: /* cannot change this one */ SetLastError( ERROR_INVALID_PARAMETER ); @@ -982,21 +997,14 @@ DWORD WINAPI SetClassLongA( HWND hwnd, INT offset, LONG newval ) */ INT WINAPI GetClassNameA( HWND hwnd, LPSTR buffer, INT count ) { - char tmpbuf[MAX_ATOM_LEN + 1]; - INT ret; - - TRACE("%p %p %d\n", hwnd, buffer, count); + WCHAR tmpbuf[MAX_ATOM_LEN + 1]; + DWORD len; if (count <= 0) return 0; - - ret = GlobalGetAtomNameA( GetClassLongW( hwnd, GCW_ATOM ), tmpbuf, MAX_ATOM_LEN + 1 ); - if (ret) - { - ret = min(count - 1, ret); - memcpy(buffer, tmpbuf, ret); - buffer[ret] = 0; - } - return ret; + if (!GetClassNameW( hwnd, tmpbuf, sizeof(tmpbuf)/sizeof(WCHAR) )) return 0; + RtlUnicodeToMultiByteN( buffer, count - 1, &len, tmpbuf, strlenW(tmpbuf) * sizeof(WCHAR) ); + buffer[len] = 0; + return len; } @@ -1005,19 +1013,32 @@ INT WINAPI GetClassNameA( HWND hwnd, LPSTR buffer, INT count ) */ INT WINAPI GetClassNameW( HWND hwnd, LPWSTR buffer, INT count ) { - WCHAR tmpbuf[MAX_ATOM_LEN + 1]; + CLASS *class; INT ret; TRACE("%p %p %d\n", hwnd, buffer, count); if (count <= 0) return 0; - ret = GlobalGetAtomNameW( GetClassLongW( hwnd, GCW_ATOM ), tmpbuf, MAX_ATOM_LEN + 1 ); - if (ret) + if (!(class = get_class_ptr( hwnd, FALSE ))) return 0; + + if (class == CLASS_OTHER_PROCESS) { - ret = min(count - 1, ret); - memcpy(buffer, tmpbuf, ret * sizeof(WCHAR)); - buffer[ret] = 0; + WCHAR tmpbuf[MAX_ATOM_LEN + 1]; + + ret = GlobalGetAtomNameW( GetClassLongW( hwnd, GCW_ATOM ), tmpbuf, MAX_ATOM_LEN + 1 ); + if (ret) + { + ret = min(count - 1, ret); + memcpy(buffer, tmpbuf, ret * sizeof(WCHAR)); + buffer[ret] = 0; + } + } + else + { + lstrcpynW( buffer, class->name, count ); + release_class_ptr( class ); + ret = strlenW( buffer ); } return ret; } @@ -1096,14 +1117,23 @@ BOOL WINAPI GetClassInfoW( HINSTANCE hInstance, LPCWSTR name, WNDCLASSW *wc ) */ BOOL WINAPI GetClassInfoExA( HINSTANCE hInstance, LPCSTR name, WNDCLASSEXA *wc ) { - ATOM atom = HIWORD(name) ? GlobalFindAtomA( name ) : LOWORD(name); + ATOM atom; CLASS *classPtr; - TRACE("%p %s %x %p\n", hInstance, debugstr_a(name), atom, wc); + TRACE("%p %s %p\n", hInstance, debugstr_a(name), wc); if (!hInstance) hInstance = user32_module; - if (!atom || !(classPtr = CLASS_FindClassByAtom( atom, hInstance ))) + if (!IS_INTRESOURCE(name)) + { + WCHAR nameW[MAX_ATOM_LEN + 1]; + if (!MultiByteToWideChar( CP_ACP, 0, name, -1, nameW, sizeof(nameW)/sizeof(WCHAR) )) + return FALSE; + classPtr = CLASS_FindClass( nameW, hInstance ); + } + else classPtr = CLASS_FindClass( (LPCWSTR)name, hInstance ); + + if (!classPtr) { SetLastError( ERROR_CLASS_DOES_NOT_EXIST ); return FALSE; @@ -1119,6 +1149,7 @@ BOOL WINAPI GetClassInfoExA( HINSTANCE hInstance, LPCSTR name, WNDCLASSEXA *wc ) wc->hbrBackground = (HBRUSH)classPtr->hbrBackground; wc->lpszMenuName = CLASS_GetMenuNameA( classPtr ); wc->lpszClassName = name; + atom = classPtr->atomName; release_class_ptr( classPtr ); /* We must return the atom of the class here instead of just TRUE. */ @@ -1131,14 +1162,14 @@ BOOL WINAPI GetClassInfoExA( HINSTANCE hInstance, LPCSTR name, WNDCLASSEXA *wc ) */ BOOL WINAPI GetClassInfoExW( HINSTANCE hInstance, LPCWSTR name, WNDCLASSEXW *wc ) { - ATOM atom = HIWORD(name) ? GlobalFindAtomW( name ) : LOWORD(name); + ATOM atom; CLASS *classPtr; - TRACE("%p %s %x %p\n", hInstance, debugstr_w(name), atom, wc); + TRACE("%p %s %p\n", hInstance, debugstr_w(name), wc); if (!hInstance) hInstance = user32_module; - if (!atom || !(classPtr = CLASS_FindClassByAtom( atom, hInstance ))) + if (!(classPtr = CLASS_FindClass( name, hInstance ))) { SetLastError( ERROR_CLASS_DOES_NOT_EXIST ); return FALSE; @@ -1154,6 +1185,7 @@ BOOL WINAPI GetClassInfoExW( HINSTANCE hInstance, LPCWSTR name, WNDCLASSEXW *wc wc->hbrBackground = (HBRUSH)classPtr->hbrBackground; wc->lpszMenuName = CLASS_GetMenuNameW( classPtr ); wc->lpszClassName = name; + atom = classPtr->atomName; release_class_ptr( classPtr ); /* We must return the atom of the class here instead of just TRUE. */
1
0
0
0
Alexandre Julliard : user32: Properly handle integer atoms specified as strings in class names.
by Alexandre Julliard
02 Nov '07
02 Nov '07
Module: wine Branch: master Commit: 1ee62a8d7240b6b738f989c1c370ece7a9a882e9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1ee62a8d7240b6b738f989c1c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Nov 2 11:42:53 2007 +0100 user32: Properly handle integer atoms specified as strings in class names. --- dlls/user32/class.c | 27 +++++++++++++++++++++++---- 1 files changed, 23 insertions(+), 4 deletions(-) diff --git a/dlls/user32/class.c b/dlls/user32/class.c index dec82b5..e3a2951 100644 --- a/dlls/user32/class.c +++ b/dlls/user32/class.c @@ -97,6 +97,25 @@ static inline void release_class_ptr( CLASS *ptr ) /*********************************************************************** + * get_int_atom_value + */ +static ATOM get_int_atom_value( LPCWSTR name ) +{ + UINT ret = 0; + + if (IS_INTRESOURCE(name)) return LOWORD(name); + if (*name++ != '#') return 0; + while (*name) + { + if (*name < '0' || *name > '9') return 0; + ret = ret * 10 + *name++ - '0'; + if (ret > 0xffff) return 0; + } + return ret; +} + + +/*********************************************************************** * set_server_info * * Set class info with the wine server. @@ -328,8 +347,8 @@ static CLASS *CLASS_RegisterClass( LPCWSTR name, HINSTANCE hInstance, BOOL local req->extra = classExtra; req->win_extra = winExtra; req->client_ptr = classPtr; - if (IS_INTRESOURCE(name)) req->atom = LOWORD(name); - else wine_server_add_data( req, name, strlenW(name) * sizeof(WCHAR) ); + if (!(req->atom = get_int_atom_value(name)) && name) + wine_server_add_data( req, name, strlenW(name) * sizeof(WCHAR) ); ret = !wine_server_call_err( req ); classPtr->atomName = reply->atom; } @@ -596,8 +615,8 @@ BOOL WINAPI UnregisterClassW( LPCWSTR className, HINSTANCE hInstance ) SERVER_START_REQ( destroy_class ) { req->instance = hInstance; - if (IS_INTRESOURCE(className)) req->atom = LOWORD(className); - else wine_server_add_data( req, className, strlenW(className)*sizeof(WCHAR) ); + if (!(req->atom = get_int_atom_value(className)) && className) + wine_server_add_data( req, className, strlenW(className) * sizeof(WCHAR) ); if (!wine_server_call_err( req )) classPtr = reply->client_ptr; } SERVER_END_REQ;
1
0
0
0
Alexandre Julliard : server: Support using a name to destroy a window class too.
by Alexandre Julliard
02 Nov '07
02 Nov '07
Module: wine Branch: master Commit: b9b940fab97e0afe906f37936b5cafe2f8b7b92d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b9b940fab97e0afe906f37936…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 1 15:28:30 2007 +0100 server: Support using a name to destroy a window class too. --- dlls/user32/class.c | 23 ++++++++++++----------- include/wine/server_protocol.h | 3 ++- server/class.c | 8 ++++++-- server/protocol.def | 1 + server/trace.c | 4 +++- 5 files changed, 24 insertions(+), 15 deletions(-) diff --git a/dlls/user32/class.c b/dlls/user32/class.c index 5d97823..dec82b5 100644 --- a/dlls/user32/class.c +++ b/dlls/user32/class.c @@ -573,8 +573,15 @@ ATOM WINAPI RegisterClassExW( const WNDCLASSEXW* wc ) */ BOOL WINAPI UnregisterClassA( LPCSTR className, HINSTANCE hInstance ) { - ATOM atom = HIWORD(className) ? GlobalFindAtomA( className ) : LOWORD(className); - return UnregisterClassW( (LPCWSTR)MAKEINTATOM(atom), hInstance ); + if (!IS_INTRESOURCE(className)) + { + WCHAR name[MAX_ATOM_LEN + 1]; + + if (!MultiByteToWideChar( CP_ACP, 0, className, -1, name, MAX_ATOM_LEN + 1 )) + return FALSE; + return UnregisterClassW( name, hInstance ); + } + return UnregisterClassW( (LPCWSTR)className, hInstance ); } /*********************************************************************** @@ -583,20 +590,14 @@ BOOL WINAPI UnregisterClassA( LPCSTR className, HINSTANCE hInstance ) BOOL WINAPI UnregisterClassW( LPCWSTR className, HINSTANCE hInstance ) { CLASS *classPtr = NULL; - ATOM atom = HIWORD(className) ? GlobalFindAtomW( className ) : LOWORD(className); - - TRACE("%s %p %x\n",debugstr_w(className), hInstance, atom); - if (!atom) - { - SetLastError( ERROR_CLASS_DOES_NOT_EXIST ); - return FALSE; - } + TRACE("%s %p\n",debugstr_w(className), hInstance); SERVER_START_REQ( destroy_class ) { - req->atom = atom; req->instance = hInstance; + if (IS_INTRESOURCE(className)) req->atom = LOWORD(className); + else wine_server_add_data( req, className, strlenW(className)*sizeof(WCHAR) ); if (!wine_server_call_err( req )) classPtr = reply->client_ptr; } SERVER_END_REQ; diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index da3c45b..8d1485e 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -3609,6 +3609,7 @@ struct destroy_class_request struct request_header __header; atom_t atom; void* instance; + /* VARARG(name,unicode_str); */ }; struct destroy_class_reply { @@ -4882,6 +4883,6 @@ union generic_reply struct set_completion_info_reply set_completion_info_reply; }; -#define SERVER_PROTOCOL_VERSION 325 +#define SERVER_PROTOCOL_VERSION 326 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/server/class.c b/server/class.c index ff39dc0..334542e 100644 --- a/server/class.c +++ b/server/class.c @@ -186,9 +186,13 @@ DECL_HANDLER(create_class) /* destroy a window class */ DECL_HANDLER(destroy_class) { - struct window_class *class = find_class( current->process, req->atom, req->instance ); + struct window_class *class; + atom_t atom = req->atom; + + if (get_req_data_size()) + atom = find_global_atom( NULL, get_req_data(), get_req_data_size() / sizeof(WCHAR) ); - if (!class) + if (!(class = find_class( current->process, atom, req->instance ))) set_win32_error( ERROR_CLASS_DOES_NOT_EXIST ); else if (class->count) set_win32_error( ERROR_CLASS_HAS_WINDOWS ); diff --git a/server/protocol.def b/server/protocol.def index aa06bd5..f2e33ef 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -2610,6 +2610,7 @@ enum message_type @REQ(destroy_class) atom_t atom; /* class atom */ void* instance; /* module instance */ + VARARG(name,unicode_str); /* class name */ @REPLY void* client_ptr; /* pointer to class in client address space */ @END diff --git a/server/trace.c b/server/trace.c index 3d5a3c5..a6d3ee5 100644 --- a/server/trace.c +++ b/server/trace.c @@ -3205,7 +3205,9 @@ static void dump_create_class_reply( const struct create_class_reply *req ) static void dump_destroy_class_request( const struct destroy_class_request *req ) { fprintf( stderr, " atom=%04x,", req->atom ); - fprintf( stderr, " instance=%p", req->instance ); + fprintf( stderr, " instance=%p,", req->instance ); + fprintf( stderr, " name=" ); + dump_varargs_unicode_str( cur_size ); } static void dump_destroy_class_reply( const struct destroy_class_reply *req )
1
0
0
0
Alexandre Julliard : server: Allow to send a name instead of an atom when creating a window class.
by Alexandre Julliard
01 Nov '07
01 Nov '07
Module: wine Branch: master Commit: 0762d98f7c16cca89882b20e72211b0d6df5331c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0762d98f7c16cca89882b20e7…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 1 13:02:01 2007 +0100 server: Allow to send a name instead of an atom when creating a window class. --- dlls/user32/class.c | 57 +++++++++++++++++++++------------------- include/wine/server_protocol.h | 4 ++- server/class.c | 23 ++++++++++++--- server/protocol.def | 3 ++ server/trace.c | 11 ++++++- 5 files changed, 63 insertions(+), 35 deletions(-) diff --git a/dlls/user32/class.c b/dlls/user32/class.c index 0f2e8a8..5d97823 100644 --- a/dlls/user32/class.c +++ b/dlls/user32/class.c @@ -295,16 +295,15 @@ static CLASS *CLASS_FindClassByAtom( ATOM atom, HINSTANCE hinstance ) * CLASS_RegisterClass * * The real RegisterClass() functionality. - * The atom is deleted no matter what. */ -static CLASS *CLASS_RegisterClass( ATOM atom, HINSTANCE hInstance, BOOL local, +static CLASS *CLASS_RegisterClass( LPCWSTR name, HINSTANCE hInstance, BOOL local, DWORD style, INT classExtra, INT winExtra ) { CLASS *classPtr; BOOL ret; - TRACE("atom=0x%x hinst=%p style=0x%x clExtr=0x%x winExtr=0x%x\n", - atom, hInstance, style, classExtra, winExtra ); + TRACE("name=%s hinst=%p style=0x%x clExtr=0x%x winExtr=0x%x\n", + debugstr_w(name), hInstance, style, classExtra, winExtra ); /* Fix the extra bytes value */ @@ -319,25 +318,22 @@ static CLASS *CLASS_RegisterClass( ATOM atom, HINSTANCE hInstance, BOOL local, WARN("Win extra bytes %d is > 40\n", winExtra ); classPtr = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CLASS) + classExtra ); - if (!classPtr) - { - GlobalDeleteAtom( atom ); - return NULL; - } + if (!classPtr) return NULL; SERVER_START_REQ( create_class ) { req->local = local; - req->atom = atom; req->style = style; req->instance = hInstance; req->extra = classExtra; req->win_extra = winExtra; req->client_ptr = classPtr; + if (IS_INTRESOURCE(name)) req->atom = LOWORD(name); + else wine_server_add_data( req, name, strlenW(name) * sizeof(WCHAR) ); ret = !wine_server_call_err( req ); + classPtr->atomName = reply->atom; } SERVER_END_REQ; - GlobalDeleteAtom( atom ); /* the server increased the atom ref count */ if (!ret) { HeapFree( GetProcessHeap(), 0, classPtr ); @@ -349,7 +345,6 @@ static CLASS *CLASS_RegisterClass( ATOM atom, HINSTANCE hInstance, BOOL local, classPtr->cbWndExtra = winExtra; classPtr->cbClsExtra = classExtra; classPtr->hInstance = hInstance; - classPtr->atomName = atom; /* Other non-null values must be set by caller */ @@ -368,12 +363,9 @@ static CLASS *CLASS_RegisterClass( ATOM atom, HINSTANCE hInstance, BOOL local, */ static WNDPROC register_builtin( const struct builtin_class_descr *descr ) { - ATOM atom; CLASS *classPtr; - if (!(atom = GlobalAddAtomW( descr->name ))) return 0; - - if (!(classPtr = CLASS_RegisterClass( atom, user32_module, FALSE, + if (!(classPtr = CLASS_RegisterClass( descr->name, user32_module, FALSE, descr->style, 0, descr->extra ))) return 0; classPtr->hCursor = LoadCursorA( 0, (LPSTR)descr->cursor ); @@ -506,14 +498,25 @@ ATOM WINAPI RegisterClassExA( const WNDCLASSEXA* wc ) } if (!(instance = wc->hInstance)) instance = GetModuleHandleW( NULL ); - if (!(atom = GlobalAddAtomA( wc->lpszClassName ))) return 0; + if (!IS_INTRESOURCE(wc->lpszClassName)) + { + WCHAR name[MAX_ATOM_LEN + 1]; - if (!(classPtr = CLASS_RegisterClass( atom, instance, !(wc->style & CS_GLOBALCLASS), - wc->style, wc->cbClsExtra, wc->cbWndExtra ))) - return 0; + if (!MultiByteToWideChar( CP_ACP, 0, wc->lpszClassName, -1, name, MAX_ATOM_LEN + 1 )) return 0; + classPtr = CLASS_RegisterClass( name, instance, !(wc->style & CS_GLOBALCLASS), + wc->style, wc->cbClsExtra, wc->cbWndExtra ); + } + else + { + classPtr = CLASS_RegisterClass( (LPCWSTR)wc->lpszClassName, instance, + !(wc->style & CS_GLOBALCLASS), wc->style, + wc->cbClsExtra, wc->cbWndExtra ); + } + if (!classPtr) return 0; + atom = classPtr->atomName; - TRACE("atom=%04x wndproc=%p hinst=%p bg=%p style=%08x clsExt=%d winExt=%d class=%p\n", - atom, wc->lpfnWndProc, instance, wc->hbrBackground, + TRACE("name=%s atom=%04x wndproc=%p hinst=%p bg=%p style=%08x clsExt=%d winExt=%d class=%p\n", + debugstr_a(wc->lpszClassName), atom, wc->lpfnWndProc, instance, wc->hbrBackground, wc->style, wc->cbClsExtra, wc->cbWndExtra, classPtr ); classPtr->hIcon = wc->hIcon; @@ -544,14 +547,14 @@ ATOM WINAPI RegisterClassExW( const WNDCLASSEXW* wc ) } if (!(instance = wc->hInstance)) instance = GetModuleHandleW( NULL ); - if (!(atom = GlobalAddAtomW( wc->lpszClassName ))) return 0; - - if (!(classPtr = CLASS_RegisterClass( atom, instance, !(wc->style & CS_GLOBALCLASS), + if (!(classPtr = CLASS_RegisterClass( wc->lpszClassName, instance, !(wc->style & CS_GLOBALCLASS), wc->style, wc->cbClsExtra, wc->cbWndExtra ))) return 0; - TRACE("atom=%04x wndproc=%p hinst=%p bg=%p style=%08x clsExt=%d winExt=%d class=%p\n", - atom, wc->lpfnWndProc, instance, wc->hbrBackground, + atom = classPtr->atomName; + + TRACE("name=%s atom=%04x wndproc=%p hinst=%p bg=%p style=%08x clsExt=%d winExt=%d class=%p\n", + debugstr_w(wc->lpszClassName), atom, wc->lpfnWndProc, instance, wc->hbrBackground, wc->style, wc->cbClsExtra, wc->cbWndExtra, classPtr ); classPtr->hIcon = wc->hIcon; diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 606e814..da3c45b 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -3594,10 +3594,12 @@ struct create_class_request int extra; int win_extra; void* client_ptr; + /* VARARG(name,unicode_str); */ }; struct create_class_reply { struct reply_header __header; + atom_t atom; }; @@ -4880,6 +4882,6 @@ union generic_reply struct set_completion_info_reply set_completion_info_reply; }; -#define SERVER_PROTOCOL_VERSION 324 +#define SERVER_PROTOCOL_VERSION 325 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/server/class.c b/server/class.c index e0cfbbd..ff39dc0 100644 --- a/server/class.c +++ b/server/class.c @@ -142,32 +142,45 @@ void *get_class_client_ptr( struct window_class *class ) DECL_HANDLER(create_class) { struct window_class *class; + atom_t atom; - class = find_class( current->process, req->atom, req->instance ); + if (get_req_data_size()) + { + atom = add_global_atom( NULL, get_req_data(), get_req_data_size() / sizeof(WCHAR) ); + if (!atom) return; + } + else + { + atom = req->atom; + if (!grab_global_atom( NULL, atom )) return; + } + + class = find_class( current->process, atom, req->instance ); if (class && !class->local == !req->local) { set_win32_error( ERROR_CLASS_ALREADY_EXISTS ); + release_global_atom( NULL, atom ); return; } if (req->extra < 0 || req->extra > 4096 || req->win_extra < 0 || req->win_extra > 4096) { /* don't allow stupid values here */ set_error( STATUS_INVALID_PARAMETER ); + release_global_atom( NULL, atom ); return; } - if (!grab_global_atom( NULL, req->atom )) return; - if (!(class = create_class( current->process, req->extra, req->local ))) { - release_global_atom( NULL, req->atom ); + release_global_atom( NULL, atom ); return; } - class->atom = req->atom; + class->atom = atom; class->instance = req->instance; class->style = req->style; class->win_extra = req->win_extra; class->client_ptr = req->client_ptr; + reply->atom = atom; } /* destroy a window class */ diff --git a/server/protocol.def b/server/protocol.def index c91e8db..aa06bd5 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -2600,6 +2600,9 @@ enum message_type int extra; /* number of extra class bytes */ int win_extra; /* number of window extra bytes */ void* client_ptr; /* pointer to class in client address space */ + VARARG(name,unicode_str); /* class name */ +@REPLY + atom_t atom; /* resulting class atom */ @END diff --git a/server/trace.c b/server/trace.c index e63cad9..3d5a3c5 100644 --- a/server/trace.c +++ b/server/trace.c @@ -3192,7 +3192,14 @@ static void dump_create_class_request( const struct create_class_request *req ) fprintf( stderr, " instance=%p,", req->instance ); fprintf( stderr, " extra=%d,", req->extra ); fprintf( stderr, " win_extra=%d,", req->win_extra ); - fprintf( stderr, " client_ptr=%p", req->client_ptr ); + fprintf( stderr, " client_ptr=%p,", req->client_ptr ); + fprintf( stderr, " name=" ); + dump_varargs_unicode_str( cur_size ); +} + +static void dump_create_class_reply( const struct create_class_reply *req ) +{ + fprintf( stderr, " atom=%04x", req->atom ); } static void dump_destroy_class_request( const struct destroy_class_request *req ) @@ -4106,7 +4113,7 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = { (dump_func)dump_start_hook_chain_reply, (dump_func)0, (dump_func)dump_get_hook_info_reply, - (dump_func)0, + (dump_func)dump_create_class_reply, (dump_func)dump_destroy_class_reply, (dump_func)dump_set_class_info_reply, (dump_func)dump_set_clipboard_info_reply,
1
0
0
0
Alexandre Julliard : user32: Store the builtin class names in Unicode.
by Alexandre Julliard
01 Nov '07
01 Nov '07
Module: wine Branch: master Commit: bfe88a00f8300a301acc291d50f1894dec47a6ef URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bfe88a00f8300a301acc291d5…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 1 12:55:00 2007 +0100 user32: Store the builtin class names in Unicode. --- dlls/user32/button.c | 3 ++- dlls/user32/class.c | 2 +- dlls/user32/combo.c | 3 ++- dlls/user32/controls.h | 2 +- dlls/user32/desktop.c | 2 +- dlls/user32/dialog.c | 2 +- dlls/user32/edit.c | 3 ++- dlls/user32/icontitle.c | 2 +- dlls/user32/listbox.c | 6 ++++-- dlls/user32/mdi.c | 3 ++- dlls/user32/menu.c | 2 +- dlls/user32/scroll.c | 3 ++- dlls/user32/static.c | 3 ++- 13 files changed, 22 insertions(+), 14 deletions(-) diff --git a/dlls/user32/button.c b/dlls/user32/button.c index b80d78a..46940f0 100644 --- a/dlls/user32/button.c +++ b/dlls/user32/button.c @@ -159,9 +159,10 @@ static WORD checkBoxWidth = 0, checkBoxHeight = 0; /********************************************************************* * button class descriptor */ +static const WCHAR buttonW[] = {'B','u','t','t','o','n',0}; const struct builtin_class_descr BUTTON_builtin_class = { - "Button", /* name */ + buttonW, /* name */ CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC, /* style */ ButtonWndProcA, /* procA */ ButtonWndProcW, /* procW */ diff --git a/dlls/user32/class.c b/dlls/user32/class.c index a0be005..0f2e8a8 100644 --- a/dlls/user32/class.c +++ b/dlls/user32/class.c @@ -371,7 +371,7 @@ static WNDPROC register_builtin( const struct builtin_class_descr *descr ) ATOM atom; CLASS *classPtr; - if (!(atom = GlobalAddAtomA( descr->name ))) return 0; + if (!(atom = GlobalAddAtomW( descr->name ))) return 0; if (!(classPtr = CLASS_RegisterClass( atom, user32_module, FALSE, descr->style, 0, descr->extra ))) return 0; diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c index 1e801a3..4279297 100644 --- a/dlls/user32/combo.c +++ b/dlls/user32/combo.c @@ -93,9 +93,10 @@ static LRESULT WINAPI ComboWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM /********************************************************************* * combo class descriptor */ +static const WCHAR comboboxW[] = {'C','o','m','b','o','B','o','x',0}; const struct builtin_class_descr COMBO_builtin_class = { - "ComboBox", /* name */ + comboboxW, /* name */ CS_PARENTDC | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW, /* style */ ComboWndProcA, /* procA */ ComboWndProcW, /* procW */ diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h index 594b665..d52c914 100644 --- a/dlls/user32/controls.h +++ b/dlls/user32/controls.h @@ -34,7 +34,7 @@ /* Built-in class descriptor */ struct builtin_class_descr { - LPCSTR name; /* class name */ + LPCWSTR name; /* class name */ UINT style; /* class style */ WNDPROC procA; /* ASCII window procedure */ WNDPROC procW; /* Unicode window procedure */ diff --git a/dlls/user32/desktop.c b/dlls/user32/desktop.c index 37774b8..ad4740b 100644 --- a/dlls/user32/desktop.c +++ b/dlls/user32/desktop.c @@ -46,7 +46,7 @@ static LRESULT WINAPI DesktopWndProc( HWND hwnd, UINT message, WPARAM wParam, LP */ const struct builtin_class_descr DESKTOP_builtin_class = { - (LPCSTR)DESKTOP_CLASS_ATOM, /* name */ + (LPCWSTR)DESKTOP_CLASS_ATOM, /* name */ CS_DBLCLKS, /* style */ NULL, /* procA (winproc is Unicode only) */ DesktopWndProc, /* procW */ diff --git a/dlls/user32/dialog.c b/dlls/user32/dialog.c index d8cf63b..40ac35b 100644 --- a/dlls/user32/dialog.c +++ b/dlls/user32/dialog.c @@ -95,7 +95,7 @@ typedef struct */ const struct builtin_class_descr DIALOG_builtin_class = { - (LPCSTR)DIALOG_CLASS_ATOM, /* name */ + (LPCWSTR)DIALOG_CLASS_ATOM, /* name */ CS_SAVEBITS | CS_DBLCLKS, /* style */ DefDlgProcA, /* procA */ DefDlgProcW, /* procW */ diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index ee7e7a4..958f4fe 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -294,9 +294,10 @@ LRESULT WINAPI EditWndProcW(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); /********************************************************************* * edit class descriptor */ +static const WCHAR editW[] = {'E','d','i','t',0}; const struct builtin_class_descr EDIT_builtin_class = { - "Edit", /* name */ + editW, /* name */ CS_DBLCLKS | CS_PARENTDC, /* style */ EditWndProcA, /* procA */ EditWndProcW, /* procW */ diff --git a/dlls/user32/icontitle.c b/dlls/user32/icontitle.c index 7a185c0..d6995ba 100644 --- a/dlls/user32/icontitle.c +++ b/dlls/user32/icontitle.c @@ -45,7 +45,7 @@ static LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPAR */ const struct builtin_class_descr ICONTITLE_builtin_class = { - (LPCSTR)ICONTITLE_CLASS_ATOM, /* name */ + (LPCWSTR)ICONTITLE_CLASS_ATOM, /* name */ 0, /* style */ NULL, /* procA (winproc is Unicode only) */ IconTitleWndProc, /* procW */ diff --git a/dlls/user32/listbox.c b/dlls/user32/listbox.c index 0a39582..7ec97dd 100644 --- a/dlls/user32/listbox.c +++ b/dlls/user32/listbox.c @@ -136,9 +136,10 @@ static LRESULT LISTBOX_GetItemRect( LB_DESCR *descr, INT index, RECT *rect ); /********************************************************************* * listbox class descriptor */ +static const WCHAR listboxW[] = {'L','i','s','t','B','o','x',0}; const struct builtin_class_descr LISTBOX_builtin_class = { - "ListBox", /* name */ + listboxW, /* name */ CS_DBLCLKS /*| CS_PARENTDC*/, /* style */ ListBoxWndProcA, /* procA */ ListBoxWndProcW, /* procW */ @@ -151,9 +152,10 @@ const struct builtin_class_descr LISTBOX_builtin_class = /********************************************************************* * combolbox class descriptor */ +static const WCHAR combolboxW[] = {'C','o','m','b','o','L','B','o','x',0}; const struct builtin_class_descr COMBOLBOX_builtin_class = { - "ComboLBox", /* name */ + combolboxW, /* name */ CS_DBLCLKS | CS_SAVEBITS, /* style */ ListBoxWndProcA, /* procA */ ListBoxWndProcW, /* procW */ diff --git a/dlls/user32/mdi.c b/dlls/user32/mdi.c index 1fc2fbd..bad5519 100644 --- a/dlls/user32/mdi.c +++ b/dlls/user32/mdi.c @@ -184,9 +184,10 @@ static void MDI_PostUpdate(HWND hwnd, MDICLIENTINFO* ci, WORD recalc) /********************************************************************* * MDIClient class descriptor */ +static const WCHAR mdiclientW[] = {'M','D','I','C','l','i','e','n','t',0}; const struct builtin_class_descr MDICLIENT_builtin_class = { - "MDIClient", /* name */ + mdiclientW, /* name */ 0, /* style */ MDIClientWndProcA, /* procA */ MDIClientWndProcW, /* procW */ diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c index 3a75005..8e9a631 100644 --- a/dlls/user32/menu.c +++ b/dlls/user32/menu.c @@ -189,7 +189,7 @@ DWORD WINAPI DrawMenuBarTemp(HWND hwnd, HDC hDC, LPRECT lprect, HMENU hMenu, HFO */ const struct builtin_class_descr MENU_builtin_class = { - (LPCSTR)POPUPMENU_CLASS_ATOM, /* name */ + (LPCWSTR)POPUPMENU_CLASS_ATOM, /* name */ CS_DROPSHADOW | CS_SAVEBITS | CS_DBLCLKS, /* style */ NULL, /* procA (winproc is Unicode only) */ PopupMenuWndProc, /* procW */ diff --git a/dlls/user32/scroll.c b/dlls/user32/scroll.c index afd961e..ec2fe13 100644 --- a/dlls/user32/scroll.c +++ b/dlls/user32/scroll.c @@ -114,9 +114,10 @@ static LRESULT WINAPI ScrollBarWndProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPA /********************************************************************* * scrollbar class descriptor */ +static const WCHAR scrollbarW[] = {'S','c','r','o','l','l','B','a','r',0}; const struct builtin_class_descr SCROLL_builtin_class = { - "ScrollBar", /* name */ + scrollbarW, /* name */ CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC, /* style */ NULL, /* procA (winproc is Unicode only) */ ScrollBarWndProc, /* procW */ diff --git a/dlls/user32/static.c b/dlls/user32/static.c index bb6abfb..df19875 100644 --- a/dlls/user32/static.c +++ b/dlls/user32/static.c @@ -100,9 +100,10 @@ static const pfPaint staticPaintFunc[SS_TYPEMASK+1] = /********************************************************************* * static class descriptor */ +static const WCHAR staticW[] = {'S','t','a','t','i','c',0}; const struct builtin_class_descr STATIC_builtin_class = { - "Static", /* name */ + staticW, /* name */ CS_DBLCLKS | CS_PARENTDC, /* style */ StaticWndProcA, /* procA */ StaticWndProcW, /* procW */
1
0
0
0
Chris Robinson : mshtml: Set IE version when installing wine gecko.
by Alexandre Julliard
01 Nov '07
01 Nov '07
Module: wine Branch: master Commit: c23ce884f782aaae1c91fb6b238e05a7657bba81 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c23ce884f782aaae1c91fb6b2…
Author: Chris Robinson <chris.kcat(a)gmail.com> Date: Wed Oct 31 08:03:27 2007 -0700 mshtml: Set IE version when installing wine gecko. --- dlls/mshtml/install.c | 26 +++++++++++++++++++++++++- 1 files changed, 25 insertions(+), 1 deletions(-) diff --git a/dlls/mshtml/install.c b/dlls/mshtml/install.c index 4acef19..a131da6 100644 --- a/dlls/mshtml/install.c +++ b/dlls/mshtml/install.c @@ -54,6 +54,14 @@ static const WCHAR mshtml_keyW[] = '\\','W','i','n','e', '\\','M','S','H','T','M','L',0}; +static const WCHAR wszMSIE[] = + {'S','o','f','t','w','a','r','e','\\', + 'M','i','c','r','o','s','o','f','t','\\', + 'I','n','t','e','r','n','e','t',' ','E','x','p','l','o','r','e','r',0}; +static const WCHAR wszIEVersion[] = + {'6','.','0','.','2','9','0','0','.','2','1','8','0',0}; + + static HWND install_dialog = NULL; static LPWSTR tmp_file_name = NULL; static HANDLE tmp_file = INVALID_HANDLE_VALUE; @@ -97,6 +105,7 @@ static void set_registry(LPCSTR install_dir) static const WCHAR wszGeckoPath[] = {'G','e','c','k','o','P','a','t','h',0}; static const WCHAR wszWineGecko[] = {'w','i','n','e','_','g','e','c','k','o',0}; + static const WCHAR wszVersion[] = {'V','e','r','s','i','o','n',0}; memcpy(mshtml_key, mshtml_keyW, sizeof(mshtml_keyW)); mshtml_key[sizeof(mshtml_keyW)/sizeof(WCHAR)-1] = '\\'; @@ -125,8 +134,23 @@ static void set_registry(LPCSTR install_dir) len*sizeof(WCHAR)+sizeof(wszWineGecko)); mshtml_free(gecko_path); RegCloseKey(hkey); - if(res != ERROR_SUCCESS) + if(res != ERROR_SUCCESS) { ERR("Failed to set GeckoPath value: %08x\n", res); + return; + } + + res = RegCreateKeyW(HKEY_LOCAL_MACHINE, wszMSIE, &hkey); + if(res != ERROR_SUCCESS) { + ERR("Failed to create Internet Explorer key: %d\n", res); + return; + } + + res = RegSetValueExW(hkey, wszVersion, 0, REG_SZ, (LPVOID)wszIEVersion, + sizeof(wszIEVersion)); + if(res != ERROR_SUCCESS) { + ERR("Failed to set Version value: %d\n", res); + return; + } } static BOOL install_cab(LPCWSTR file_name)
1
0
0
0
Rob Shearman : server: Make sure to always initialise req_sd. owner_len and req_sd. group_len in the handler for the get_security_object call.
by Alexandre Julliard
01 Nov '07
01 Nov '07
Module: wine Branch: master Commit: 9980f478e2b359b419535a77a66a3de099c77565 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9980f478e2b359b419535a77a…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Wed Oct 31 16:53:37 2007 +0000 server: Make sure to always initialise req_sd.owner_len and req_sd.group_len in the handler for the get_security_object call. --- server/handle.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/server/handle.c b/server/handle.c index 763870e..30facbe 100644 --- a/server/handle.c +++ b/server/handle.c @@ -641,10 +641,14 @@ DECL_HANDLER(get_security_object) owner = sd_get_owner( sd ); if (req->security_info & OWNER_SECURITY_INFORMATION) req_sd.owner_len = sd->owner_len; + else + req_sd.owner_len = 0; group = sd_get_group( sd ); if (req->security_info & GROUP_SECURITY_INFORMATION) req_sd.group_len = sd->group_len; + else + req_sd.group_len = 0; req_sd.control |= SE_SACL_PRESENT; sacl = sd_get_sacl( sd, &present );
1
0
0
0
James Hawkins : msi: A feature' s requested action does not depend on its installed state.
by Alexandre Julliard
01 Nov '07
01 Nov '07
Module: wine Branch: master Commit: 07c3f4411e5e1658c579e8bb36cf2b90160011ba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=07c3f4411e5e1658c579e8bb3…
Author: James Hawkins <truiken(a)gmail.com> Date: Thu Nov 1 03:15:22 2007 -0500 msi: A feature's requested action does not depend on its installed state. --- dlls/msi/helpers.c | 3 --- dlls/msi/tests/install.c | 10 ++-------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/dlls/msi/helpers.c b/dlls/msi/helpers.c index d314699..172f516 100644 --- a/dlls/msi/helpers.c +++ b/dlls/msi/helpers.c @@ -831,9 +831,6 @@ BOOL ACTION_VerifyFeatureForAction( const MSIFEATURE* feature, INSTALLSTATE chec if (!feature) return FALSE; - if (feature->Installed == check) - return FALSE; - if (feature->ActionRequest == check) return TRUE; else diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 6ac44f1..a9c9a0f 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -2189,16 +2189,10 @@ static void test_publish(void) ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature"); - todo_wine - { - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - } + ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); - todo_wine - { - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - } + ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
1
0
0
0
← Newer
1
...
70
71
72
73
74
75
76
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
Results per page:
10
25
50
100
200