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
September 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
7 participants
787 discussions
Start a n
N
ew thread
Juan Lang : setupapi: Implement SetupDiCreateDeviceInterfaceA on top of SetupDiCreateInterfaceW.
by Alexandre Julliard
24 Sep '07
24 Sep '07
Module: wine Branch: master Commit: aa2b23cab5aeabc893d9d635848f7357064614e0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aa2b23cab5aeabc893d9d6358…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Fri Sep 21 11:34:30 2007 -0700 setupapi: Implement SetupDiCreateDeviceInterfaceA on top of SetupDiCreateInterfaceW. --- dlls/setupapi/devinst.c | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index 35d2b78..2129296 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -1767,12 +1767,26 @@ BOOL WINAPI SetupDiCreateDeviceInterfaceA( DWORD CreationFlags, PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData) { + BOOL ret; + LPWSTR ReferenceStringW = NULL; + TRACE("%p %p %s %s %08x %p\n", DeviceInfoSet, DeviceInfoData, debugstr_guid(InterfaceClassGuid), debugstr_a(ReferenceString), CreationFlags, DeviceInterfaceData); - FIXME("stub\n"); - return FALSE; + if (ReferenceString) + { + ReferenceStringW = MultiByteToUnicode(ReferenceString, CP_ACP); + if (ReferenceStringW == NULL) return FALSE; + } + + ret = SetupDiCreateDeviceInterfaceW(DeviceInfoSet, DeviceInfoData, + InterfaceClassGuid, ReferenceStringW, CreationFlags, + DeviceInterfaceData); + + MyFree(ReferenceStringW); + + return ret; } /***********************************************************************
1
0
0
0
Juan Lang : setupapi: Add tests for SetupDiCreateDeviceInterface.
by Alexandre Julliard
24 Sep '07
24 Sep '07
Module: wine Branch: master Commit: 8069619b907564345ea8fa07d63d92856cff09bc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8069619b907564345ea8fa07d…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Fri Sep 21 11:34:03 2007 -0700 setupapi: Add tests for SetupDiCreateDeviceInterface. --- dlls/setupapi/tests/devinst.c | 79 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 79 insertions(+), 0 deletions(-) diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c index 0ef9047..cdeb429 100644 --- a/dlls/setupapi/tests/devinst.c +++ b/dlls/setupapi/tests/devinst.c @@ -35,8 +35,10 @@ static HMODULE hSetupAPI; static HDEVINFO (WINAPI *pSetupDiCreateDeviceInfoList)(GUID*,HWND); static HDEVINFO (WINAPI *pSetupDiCreateDeviceInfoListExW)(GUID*,HWND,PCWSTR,PVOID); +static BOOL (WINAPI *pSetupDiCreateDeviceInterfaceA)(HDEVINFO, PSP_DEVINFO_DATA, const GUID *, PCSTR, DWORD, PSP_DEVICE_INTERFACE_DATA); static BOOL (WINAPI *pSetupDiDestroyDeviceInfoList)(HDEVINFO); static BOOL (WINAPI *pSetupDiEnumDeviceInfo)(HDEVINFO, DWORD, PSP_DEVINFO_DATA); +static BOOL (WINAPI *pSetupDiEnumDeviceInterfaces)(HDEVINFO, PSP_DEVINFO_DATA, const GUID *, DWORD, PSP_DEVICE_INTERFACE_DATA); static HKEY (WINAPI *pSetupDiOpenClassRegKeyExA)(GUID*,REGSAM,DWORD,PCSTR,PVOID); static BOOL (WINAPI *pSetupDiCreateDeviceInfoA)(HDEVINFO, PCSTR, GUID *, PCSTR, HWND, DWORD, PSP_DEVINFO_DATA); static BOOL (WINAPI *pSetupDiGetDeviceInstanceIdA)(HDEVINFO, PSP_DEVINFO_DATA, PSTR, DWORD, PDWORD); @@ -49,8 +51,10 @@ static void init_function_pointers(void) pSetupDiCreateDeviceInfoA = (void *)GetProcAddress(hSetupAPI, "SetupDiCreateDeviceInfoA"); pSetupDiCreateDeviceInfoList = (void *)GetProcAddress(hSetupAPI, "SetupDiCreateDeviceInfoList"); pSetupDiCreateDeviceInfoListExW = (void *)GetProcAddress(hSetupAPI, "SetupDiCreateDeviceInfoListExW"); + pSetupDiCreateDeviceInterfaceA = (void *)GetProcAddress(hSetupAPI, "SetupDiCreateDeviceInterfaceA"); pSetupDiDestroyDeviceInfoList = (void *)GetProcAddress(hSetupAPI, "SetupDiDestroyDeviceInfoList"); pSetupDiEnumDeviceInfo = (void *)GetProcAddress(hSetupAPI, "SetupDiEnumDeviceInfo"); + pSetupDiEnumDeviceInterfaces = (void *)GetProcAddress(hSetupAPI, "SetupDiEnumDeviceInterfaces"); pSetupDiGetDeviceInstanceIdA = (void *)GetProcAddress(hSetupAPI, "SetupDiGetDeviceInstanceIdA"); pSetupDiOpenClassRegKeyExA = (void *)GetProcAddress(hSetupAPI, "SetupDiOpenClassRegKeyExA"); pSetupDiRegisterDeviceInfo = (void *)GetProcAddress(hSetupAPI, "SetupDiRegisterDeviceInfo"); @@ -331,6 +335,80 @@ static void testRegisterDeviceInfo(void) } } +static void testCreateDeviceInterface(void) +{ + BOOL ret; + GUID guid = {0x6a55b5a4, 0x3f65, 0x11db, {0xb7,0x04, + 0x00,0x11,0x95,0x5c,0x2b,0xdb}}; + HDEVINFO set; + + if (!pSetupDiCreateDeviceInfoList || !pSetupDiDestroyDeviceInfoList || + !pSetupDiCreateDeviceInfoA || !pSetupDiCreateDeviceInterfaceA || + !pSetupDiEnumDeviceInterfaces) + { + skip("No SetupDiCreateDeviceInterfaceA\n"); + return; + } + SetLastError(0xdeadbeef); + ret = pSetupDiCreateDeviceInterfaceA(NULL, NULL, NULL, NULL, 0, NULL); + todo_wine + ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, + "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiCreateDeviceInterfaceA(NULL, NULL, &guid, NULL, 0, NULL); + todo_wine + ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, + "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + set = pSetupDiCreateDeviceInfoList(&guid, NULL); + ok(set != NULL, "SetupDiCreateDeviceInfoList failed: %d\n", GetLastError()); + if (set) + { + SP_DEVINFO_DATA devInfo = { 0 }; + SP_DEVICE_INTERFACE_DATA interfaceData = { sizeof(interfaceData), + { 0 } }; + + SetLastError(0xdeadbeef); + ret = pSetupDiCreateDeviceInterfaceA(set, NULL, NULL, NULL, 0, NULL); + todo_wine + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiCreateDeviceInterfaceA(set, &devInfo, NULL, NULL, 0, + NULL); + todo_wine + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + devInfo.cbSize = sizeof(devInfo); + ret = pSetupDiCreateDeviceInfoA(set, "ROOT\\LEGACY_BOGUS\\0000", &guid, + NULL, NULL, 0, &devInfo); + ok(ret, "SetupDiCreateDeviceInfoA failed: %08x\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiCreateDeviceInterfaceA(set, &devInfo, NULL, NULL, 0, + NULL); + todo_wine + ok(!ret && GetLastError() == ERROR_INVALID_USER_BUFFER, + "Expected ERROR_INVALID_USER_BUFFER, got %08x\n", GetLastError()); + ret = pSetupDiCreateDeviceInterfaceA(set, &devInfo, &guid, NULL, 0, + NULL); + todo_wine + ok(ret, "SetupDiCreateDeviceInterfaceA failed: %08x\n", GetLastError()); + /* Creating the same interface a second time succeeds */ + ret = pSetupDiCreateDeviceInterfaceA(set, &devInfo, &guid, NULL, 0, + NULL); + todo_wine + ok(ret, "SetupDiCreateDeviceInterfaceA failed: %08x\n", GetLastError()); + ret = pSetupDiCreateDeviceInterfaceA(set, &devInfo, &guid, "Oogah", 0, + NULL); + todo_wine + ok(ret, "SetupDiCreateDeviceInterfaceA failed: %08x\n", GetLastError()); + ret = pSetupDiEnumDeviceInterfaces(set, &devInfo, &guid, 0, + &interfaceData); + todo_wine + ok(ret, "SetupDiEnumDeviceInterfaces failed: %d\n", GetLastError()); + pSetupDiDestroyDeviceInfoList(set); + } +} + START_TEST(devinst) { init_function_pointers(); @@ -347,4 +425,5 @@ START_TEST(devinst) testCreateDeviceInfo(); testGetDeviceInstanceId(); testRegisterDeviceInfo(); + testCreateDeviceInterface(); }
1
0
0
0
Juan Lang : setupapi: Add stubs for SetupDiCreateDeviceInterfaceA/W.
by Alexandre Julliard
24 Sep '07
24 Sep '07
Module: wine Branch: master Commit: d1878ab8fd9aab52d0d1763cc99e61b5ec4134fb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d1878ab8fd9aab52d0d1763cc…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Fri Sep 21 11:33:43 2007 -0700 setupapi: Add stubs for SetupDiCreateDeviceInterfaceA/W. --- dlls/setupapi/devinst.c | 38 ++++++++++++++++++++++++++++++++++++++ dlls/setupapi/setupapi.spec | 2 ++ 2 files changed, 40 insertions(+), 0 deletions(-) diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index c2644e2..35d2b78 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -1757,6 +1757,44 @@ HDEVINFO WINAPI SetupDiGetClassDevsExW( } /*********************************************************************** + * SetupDiCreateDeviceInterfaceA (SETUPAPI.@) + */ +BOOL WINAPI SetupDiCreateDeviceInterfaceA( + HDEVINFO DeviceInfoSet, + PSP_DEVINFO_DATA DeviceInfoData, + const GUID *InterfaceClassGuid, + PCSTR ReferenceString, + DWORD CreationFlags, + PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData) +{ + TRACE("%p %p %s %s %08x %p\n", DeviceInfoSet, DeviceInfoData, + debugstr_guid(InterfaceClassGuid), debugstr_a(ReferenceString), + CreationFlags, DeviceInterfaceData); + + FIXME("stub\n"); + return FALSE; +} + +/*********************************************************************** + * SetupDiCreateDeviceInterfaceW (SETUPAPI.@) + */ +BOOL WINAPI SetupDiCreateDeviceInterfaceW( + HDEVINFO DeviceInfoSet, + PSP_DEVINFO_DATA DeviceInfoData, + const GUID *InterfaceClassGuid, + PCWSTR ReferenceString, + DWORD CreationFlags, + PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData) +{ + TRACE("%p %p %s %s %08x %p\n", DeviceInfoSet, DeviceInfoData, + debugstr_guid(InterfaceClassGuid), debugstr_w(ReferenceString), + CreationFlags, DeviceInterfaceData); + + FIXME("stub\n"); + return FALSE; +} + +/*********************************************************************** * SetupDiEnumDeviceInterfaces (SETUPAPI.@) */ BOOL WINAPI SetupDiEnumDeviceInterfaces( diff --git a/dlls/setupapi/setupapi.spec b/dlls/setupapi/setupapi.spec index 7f8b3dd..439c95c 100644 --- a/dlls/setupapi/setupapi.spec +++ b/dlls/setupapi/setupapi.spec @@ -288,6 +288,8 @@ @ stdcall SetupDiCreateDeviceInfoListExA(ptr long str ptr) @ stdcall SetupDiCreateDeviceInfoListExW(ptr long str ptr) @ stdcall SetupDiCreateDeviceInfoW(long wstr ptr wstr long long ptr) +@ stdcall SetupDiCreateDeviceInterfaceA(ptr ptr ptr str long ptr) +@ stdcall SetupDiCreateDeviceInterfaceW(ptr ptr ptr wstr long ptr) @ stub SetupDiDeleteDevRegKey @ stub SetupDiDeleteDeviceInfo @ stub SetupDiDeleteDeviceInterfaceData
1
0
0
0
Juan Lang : setupapi: Set last error on failure in SetupDiOpenClassRegKeyExW.
by Alexandre Julliard
24 Sep '07
24 Sep '07
Module: wine Branch: master Commit: 9b1e1b2aadcdebf09ef306677844701d6177cf82 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9b1e1b2aadcdebf09ef306677…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Fri Sep 21 11:33:05 2007 -0700 setupapi: Set last error on failure in SetupDiOpenClassRegKeyExW. --- dlls/setupapi/devinst.c | 42 +++++++++++++++++++++++------------------- 1 files changed, 23 insertions(+), 19 deletions(-) diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index a91b120..c2644e2 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -2338,8 +2338,9 @@ HKEY WINAPI SetupDiOpenClassRegKeyExW( PVOID Reserved) { HKEY hClassesKey; - HKEY hClassKey; + HKEY key; LPCWSTR lpKeyName; + LONG l; if (MachineName != NULL) { @@ -2364,15 +2365,16 @@ HKEY WINAPI SetupDiOpenClassRegKeyExW( if (!ClassGuid) { - if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, + if ((l = RegOpenKeyExW(HKEY_LOCAL_MACHINE, lpKeyName, 0, samDesired, - &hClassesKey)) + &hClassesKey))) { - return INVALID_HANDLE_VALUE; + SetLastError(l); + hClassesKey = INVALID_HANDLE_VALUE; } - return hClassesKey; + key = hClassesKey; } else { @@ -2380,28 +2382,30 @@ HKEY WINAPI SetupDiOpenClassRegKeyExW( SETUPDI_GuidToString(ClassGuid, bracedGuidString); - if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, + if (!(l = RegOpenKeyExW(HKEY_LOCAL_MACHINE, lpKeyName, 0, samDesired, - &hClassesKey)) + &hClassesKey))) { - return INVALID_HANDLE_VALUE; + if ((l = RegOpenKeyExW(hClassesKey, + bracedGuidString, + 0, + samDesired, + &key))) + { + SetLastError(l); + key = INVALID_HANDLE_VALUE; + } + RegCloseKey(hClassesKey); } - if (RegOpenKeyExW(hClassesKey, - bracedGuidString, - 0, - samDesired, - &hClassKey)) + else { - RegCloseKey(hClassesKey); - return INVALID_HANDLE_VALUE; + SetLastError(l); + key = INVALID_HANDLE_VALUE; } - - RegCloseKey(hClassesKey); - - return hClassKey; } + return key; } /***********************************************************************
1
0
0
0
Juan Lang : setupapi: Respect samDesired in SetupDiOpenClassRegKeyExW.
by Alexandre Julliard
24 Sep '07
24 Sep '07
Module: wine Branch: master Commit: a9d74cf994d0a3853373799e9a1456a0b7a47bb8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a9d74cf994d0a3853373799e9…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Fri Sep 21 11:32:24 2007 -0700 setupapi: Respect samDesired in SetupDiOpenClassRegKeyExW. --- dlls/setupapi/devinst.c | 56 ++++++++++++++++++++++++++++------------------ 1 files changed, 34 insertions(+), 22 deletions(-) diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index bc51c2a..a91b120 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -2337,7 +2337,6 @@ HKEY WINAPI SetupDiOpenClassRegKeyExW( PCWSTR MachineName, PVOID Reserved) { - WCHAR bracedGuidString[39]; HKEY hClassesKey; HKEY hClassKey; LPCWSTR lpKeyName; @@ -2363,33 +2362,46 @@ HKEY WINAPI SetupDiOpenClassRegKeyExW( return INVALID_HANDLE_VALUE; } - if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, - lpKeyName, - 0, - KEY_ALL_ACCESS, - &hClassesKey)) + if (!ClassGuid) { - return INVALID_HANDLE_VALUE; - } - - if (ClassGuid == NULL) + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, + lpKeyName, + 0, + samDesired, + &hClassesKey)) + { + return INVALID_HANDLE_VALUE; + } return hClassesKey; + } + else + { + WCHAR bracedGuidString[39]; - SETUPDI_GuidToString(ClassGuid, bracedGuidString); + SETUPDI_GuidToString(ClassGuid, bracedGuidString); - if (RegOpenKeyExW(hClassesKey, - bracedGuidString, - 0, - KEY_ALL_ACCESS, - &hClassKey)) - { - RegCloseKey(hClassesKey); - return INVALID_HANDLE_VALUE; - } + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, + lpKeyName, + 0, + samDesired, + &hClassesKey)) + { + return INVALID_HANDLE_VALUE; + } + if (RegOpenKeyExW(hClassesKey, + bracedGuidString, + 0, + samDesired, + &hClassKey)) + { + RegCloseKey(hClassesKey); + return INVALID_HANDLE_VALUE; + } - RegCloseKey(hClassesKey); + RegCloseKey(hClassesKey); - return hClassKey; + return hClassKey; + } } /***********************************************************************
1
0
0
0
Roderick Colenbrander : wined3d: Move video memory tracking to the adapter.
by Alexandre Julliard
24 Sep '07
24 Sep '07
Module: wine Branch: master Commit: 243ac3ed75e3ee2ac570dba6f72398320327ab5a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=243ac3ed75e3ee2ac570dba6f…
Author: Roderick Colenbrander <thunderbird2k(a)gmx.net> Date: Sun Sep 23 00:46:21 2007 +0200 wined3d: Move video memory tracking to the adapter. --- dlls/wined3d/device.c | 21 +++++---------------- dlls/wined3d/directx.c | 31 +++++++++++++++++++++---------- dlls/wined3d/resource.c | 2 +- dlls/wined3d/wined3d_main.c | 20 -------------------- dlls/wined3d/wined3d_private.h | 20 +++----------------- include/wine/wined3d_gl.h | 1 + 6 files changed, 31 insertions(+), 64 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index b93bb33..9cf8ab1 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -99,7 +99,7 @@ static void WINAPI IWineD3DDeviceImpl_AddResource(IWineD3DDevice *iface, IWineD3 *pp##type = NULL; \ return WINED3DERR_OUTOFVIDEOMEMORY; \ } \ - globalChangeGlRam(_size); \ + WineD3DAdapterChangeGLRam(This, _size); \ } \ object->resource.allocatedMemory = (0 == _size ? NULL : Pool == WINED3DPOOL_DEFAULT ? NULL : HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, _size)); \ if (object->resource.allocatedMemory == NULL && _size != 0 && Pool != WINED3DPOOL_DEFAULT) { \ @@ -2295,24 +2295,13 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetDirect3D(IWineD3DDevice *iface, IWin } static UINT WINAPI IWineD3DDeviceImpl_GetAvailableTextureMem(IWineD3DDevice *iface) { - /** NOTE: There's a probably a hack-around for this one by putting as many pbuffers, VBOs (or whatever) - * into the video ram as possible and seeing how many fit - * you can also get the correct initial value from nvidia and ATI's driver via X - * texture memory is video memory + AGP memory - *******************/ IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - static BOOL showfixmes = TRUE; - if (showfixmes) { - FIXME("(%p) : stub, simulating %dMB for now, returning %dMB left\n", This, - (wined3d_settings.emulated_textureram/(1024*1024)), - ((wined3d_settings.emulated_textureram - wineD3DGlobalStatistics->glsurfaceram) / (1024*1024))); - showfixmes = FALSE; - } + TRACE("(%p) : simulating %dMB, returning %dMB left\n", This, - (wined3d_settings.emulated_textureram/(1024*1024)), - ((wined3d_settings.emulated_textureram - wineD3DGlobalStatistics->glsurfaceram) / (1024*1024))); + (This->adapter->TextureRam/(1024*1024)), + ((This->adapter->TextureRam - This->adapter->UsedTextureRam) / (1024*1024))); /* return simulated texture memory left */ - return (wined3d_settings.emulated_textureram - wineD3DGlobalStatistics->glsurfaceram); + return (This->adapter->TextureRam - This->adapter->UsedTextureRam); } diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 747caae..ce72d88 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -277,6 +277,14 @@ static BOOL WineD3D_CreateFakeGLContext(void) { return FALSE; } +/* Adjust the amount of used texture memory */ +long WineD3DAdapterChangeGLRam(IWineD3DDeviceImpl *D3DDevice, long glram){ + UINT Adapter = D3DDevice->adapterNo; + + Adapters[Adapter].UsedTextureRam += glram; + TRACE("Adjusted gl ram by %ld to %d\n", glram, Adapters[Adapter].UsedTextureRam); + return Adapters[Adapter].UsedTextureRam; +} /********************************************************** * IUnknown parts follows @@ -1034,16 +1042,11 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) { } TRACE("FOUND (fake) card: 0x%x (vendor id), 0x%x (device id)\n", gl_info->gl_vendor, gl_info->gl_card); - /* Unless VideoMemorySize is set in the registry, the default is 0 - * TODO: put emulated_textureram in the device */ - if(wined3d_settings.emulated_textureram == 0) { - /* If we have an estimate use it, else default to 64MB */ - if(vidmem) - wined3d_settings.emulated_textureram = vidmem*1024*1024; /* convert from MBs to bytes */ - else - wined3d_settings.emulated_textureram = WINE_DEFAULT_VIDMEM; - TRACE("Emulating %d MB of texture memory\n", wined3d_settings.emulated_textureram); - } + /* If we have an estimate use it, else default to 64MB; */ + if(vidmem) + gl_info->vidmem = vidmem*1024*1024; /* convert from MBs to bytes */ + else + gl_info->vidmem = WINE_DEFAULT_VIDMEM; /* Load all the lookup tables TODO: It may be a good idea to make minLookup and maxLookup const and populate them in wined3d_private.h where they are declared */ @@ -2743,6 +2746,14 @@ BOOL InitAdapters(void) { Adapters[0].driver = "Display"; Adapters[0].description = "Direct3D HAL"; + /* Use the VideoRamSize registry setting when set */ + if(wined3d_settings.emulated_textureram) + Adapters[0].TextureRam = wined3d_settings.emulated_textureram; + else + Adapters[0].TextureRam = Adapters[0].gl_info.vidmem; + Adapters[0].UsedTextureRam = 0; + TRACE("Emulating %dMB of texture ram\n", Adapters[0].TextureRam); + /* Initialize the Adapter's DeviceName which is required for ChangeDisplaySettings and friends */ DisplayDevice.cb = sizeof(DisplayDevice); EnumDisplayDevicesW(NULL, 0 /* Adapter 0 = iDevNum 0 */, &DisplayDevice, 0); diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c index 6999f06..a75bcbd 100644 --- a/dlls/wined3d/resource.c +++ b/dlls/wined3d/resource.c @@ -71,7 +71,7 @@ void IWineD3DResourceImpl_CleanUp(IWineD3DResource *iface){ TRACE("(%p) Cleaning up resource\n", This); if (This->resource.pool == WINED3DPOOL_DEFAULT) { TRACE("Decrementing device memory pool by %u\n", This->resource.size); - globalChangeGlRam(-This->resource.size); + WineD3DAdapterChangeGLRam(This->resource.wineD3DDevice, -This->resource.size); } LIST_FOR_EACH_SAFE(e1, e2, &This->resource.privateData) { diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c index 5886df5..ebe09bd 100644 --- a/dlls/wined3d/wined3d_main.c +++ b/dlls/wined3d/wined3d_main.c @@ -46,19 +46,6 @@ wined3d_settings_t wined3d_settings = NULL /* No wine logo by default */ }; -WineD3DGlobalStatistics *wineD3DGlobalStatistics = NULL; - -long globalChangeGlRam(long glram){ - /* FIXME: replace this function with object tracking */ - int result; - - wineD3DGlobalStatistics->glsurfaceram += glram; - TRACE("Adjusted gl ram by %ld to %d\n", glram, wineD3DGlobalStatistics->glsurfaceram); - result = wineD3DGlobalStatistics->glsurfaceram; - return result; - -} - IWineD3D* WINAPI WineDirect3DCreate(UINT SDKVersion, UINT dxVersion, IUnknown *parent) { IWineD3DImpl* object; @@ -76,13 +63,6 @@ IWineD3D* WINAPI WineDirect3DCreate(UINT SDKVersion, UINT dxVersion, IUnknown *p object->ref = 1; object->parent = parent; - /*Create a structure for storing global data in*/ - if(wineD3DGlobalStatistics == NULL){ - TRACE("Creating global statistics store\n"); - wineD3DGlobalStatistics = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*wineD3DGlobalStatistics)); - - } - TRACE("Created WineD3D object @ %p for d3d%d support\n", object, dxVersion); return (IWineD3D *)object; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 286a61a..67edc0a 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -326,23 +326,6 @@ typedef struct IWineD3DSurfaceImpl IWineD3DSurfaceImpl; typedef struct IWineD3DPaletteImpl IWineD3DPaletteImpl; typedef struct IWineD3DDeviceImpl IWineD3DDeviceImpl; -/* Tracking */ - -/* TODO: Move some of this to the device */ -long globalChangeGlRam(long glram); - -/* Memory and object tracking */ - -/*Structure for holding information on all direct3d objects -useful for making sure tracking is ok and when release is called on a device! -and probably quite handy for debugging and dumping states out -*/ -typedef struct WineD3DGlobalStatistics { - int glsurfaceram; /* The aproximate amount of glTexture memory allocated for textures */ -} WineD3DGlobalStatistics; - -extern WineD3DGlobalStatistics* wineD3DGlobalStatistics; - /* Global variables */ extern const float identity[16]; @@ -597,10 +580,13 @@ struct WineD3DAdapter WCHAR DeviceName[CCHDEVICENAME]; /* DeviceName for use with e.g. ChangeDisplaySettings */ int nCfgs; WineD3D_PixelFormat *cfgs; + unsigned int TextureRam; /* Amount of texture memory both video ram + AGP/TurboCache/HyperMemory/.. */ + unsigned int UsedTextureRam; }; extern BOOL InitAdapters(void); extern BOOL initPixelFormats(WineD3D_GL_Info *gl_info); +extern long WineD3DAdapterChangeGLRam(IWineD3DDeviceImpl *D3DDevice, long glram); /***************************************************************************** * High order patch management diff --git a/include/wine/wined3d_gl.h b/include/wine/wined3d_gl.h index f2d9dab..3da14ef 100644 --- a/include/wine/wined3d_gl.h +++ b/include/wine/wined3d_gl.h @@ -3702,6 +3702,7 @@ typedef struct _WineD3D_GL_Info { GL_Vendors gl_vendor; GL_Cards gl_card; + UINT vidmem; DWORD gl_driver_version; CHAR gl_renderer[255]; /**
1
0
0
0
Andrew Talbot : dplayx: Fix some memory leaks.
by Alexandre Julliard
24 Sep '07
24 Sep '07
Module: wine Branch: master Commit: 5ab977e2aad3c5a28f1ad46b3928ca113f7c748c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5ab977e2aad3c5a28f1ad46b3…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Sat Sep 22 15:40:15 2007 +0100 dplayx: Fix some memory leaks. --- dlls/dplayx/dplay.c | 7 +++++++ dlls/dplayx/name_server.c | 1 + 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/dlls/dplayx/dplay.c b/dlls/dplayx/dplay.c index 1688614..27e17c2 100644 --- a/dlls/dplayx/dplay.c +++ b/dlls/dplayx/dplay.c @@ -3727,8 +3727,10 @@ static HRESULT WINAPI DirectPlay3AImpl_EnumConnections &sizeOfReturnBuffer ) != ERROR_SUCCESS ) { ERR(": missing GUID registry data members\n" ); + RegCloseKey(hkServiceProvider); continue; } + RegCloseKey(hkServiceProvider); /* FIXME: Check return types to ensure we're interpreting data right */ MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) ); @@ -3822,8 +3824,10 @@ static HRESULT WINAPI DirectPlay3AImpl_EnumConnections &sizeOfReturnBuffer ) != ERROR_SUCCESS ) { ERR(": missing GUID registry data members\n" ); + RegCloseKey(hkServiceProvider); continue; } + RegCloseKey(hkServiceProvider); /* FIXME: Check return types to ensure we're interpreting data right */ MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) ); @@ -3861,6 +3865,7 @@ static HRESULT WINAPI DirectPlay3AImpl_EnumConnections &dwAddressBufferSize, TRUE ) ) != DP_OK ) { ERR( "can't create address: %s\n", DPLAYX_HresultToString( hr ) ); + HeapFree( GetProcessHeap(), 0, lpAddressBuffer ); return hr; } @@ -3868,8 +3873,10 @@ static HRESULT WINAPI DirectPlay3AImpl_EnumConnections if( !lpEnumCallback( &serviceProviderGUID, lpAddressBuffer, dwAddressBufferSize, &dpName, DPCONNECTION_DIRECTPLAYLOBBY, lpContext ) ) { + HeapFree( GetProcessHeap(), 0, lpAddressBuffer ); return DP_OK; } + HeapFree( GetProcessHeap(), 0, lpAddressBuffer ); } } diff --git a/dlls/dplayx/name_server.c b/dlls/dplayx/name_server.c index e875c19..1fdfef6 100644 --- a/dlls/dplayx/name_server.c +++ b/dlls/dplayx/name_server.c @@ -136,6 +136,7 @@ void NS_AddRemoteComputerAsNameServer( LPCVOID lpcNSAddrHdr if( lpCacheNode->data == NULL ) { ERR( "no memory for SESSIONDESC2\n" ); + HeapFree( GetProcessHeap(), 0, lpCacheNode ); return; }
1
0
0
0
Anatoly Lyutin : user32/tests: Fix test for switch maximized MDI children.
by Alexandre Julliard
24 Sep '07
24 Sep '07
Module: wine Branch: master Commit: 6858ce73b6e8ef0432e62f2973d5c598fef2e8b1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6858ce73b6e8ef0432e62f297…
Author: Anatoly Lyutin <vostok(a)etersoft.ru> Date: Fri Sep 21 18:37:46 2007 +0400 user32/tests: Fix test for switch maximized MDI children. --- dlls/user32/tests/msg.c | 118 +++++++++++++++++++++++------------------------ 1 files changed, 57 insertions(+), 61 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 188551c..4a25204 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -253,25 +253,19 @@ static const struct message WmSwitchChild[] = { { WM_SIZE, sent|defwinproc|optional },/* in the 2nd MDI child */ /* Redraw 2nd MDI child */ { WM_SETREDRAW, sent|defwinproc|optional },/* in the 2nd MDI child */ - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc|optional, SWP_NOACTIVATE|SWP_NOSIZE|SWP_FRAMECHANGED|SWP_NOMOVE },/* in the 1st MDI child */ - { WM_NCCALCSIZE, sent|wparam|defwinproc|optional, 1 },/* in the 1st MDI child */ - { WM_WINDOWPOSCHANGED, sent|defwinproc|optional},/* in the 1st MDI child */ { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOACTIVATE|SWP_NOSIZE|SWP_FRAMECHANGED|SWP_NOMOVE },/* in the MDI frame */ { WM_NCCALCSIZE, sent|wparam, 1 },/* in the MDI frame */ { WM_WINDOWPOSCHANGED, sent},/* in the MDI frame */ { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc|optional, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE },/* in the 1st MDI child */ - { WM_NCACTIVATE, sent|defwinproc|optional },/* in the 1st MDI child */ + { WM_NCACTIVATE, sent|wparam|defwinproc|optional, 1 },/* in the 1st MDI child */ { WM_SETVISIBLE, hook }, - { WM_KILLFOCUS, sent|defwinproc|optional },/* in the 2nd MDI child */ + { WM_KILLFOCUS, sent|defwinproc|optional }, /* in the 2nd MDI child */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent },/* in the MDI client */ - { WM_SETVISIBLE, hook}, + { WM_SETVISIBLE, hook }, { WM_KILLFOCUS, sent },/* in the MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc|optional },/* in the 1st MDI child */ { WM_MDIACTIVATE, sent|defwinproc|optional },/* in the 1st MDI child */ { WM_WINDOWPOSCHANGED, sent },/* in the 1st MDI child */ @@ -3191,6 +3185,60 @@ static void test_mdi_messages(void) flush_sequence(); /* end of test for maximized MDI children */ + SetFocus(0); + flush_sequence(); + trace("creating maximized visible MDI child window 1(Switch test)\n"); + mdi_child = CreateWindowExA(WS_EX_MDICHILD, "MDI_child_class", "MDI child", + WS_CHILD | WS_VISIBLE | WS_MAXIMIZEBOX | WS_MAXIMIZE, + 0, 0, CW_USEDEFAULT, CW_USEDEFAULT, + mdi_client, 0, GetModuleHandleA(0), NULL); + assert(mdi_child); + ok_sequence(WmCreateMDIchildVisibleMaxSeq1, "Create maximized visible 1st MDI child window(Switch test)", TRUE); + ok(IsZoomed(mdi_child), "1st MDI child should be maximized(Switch test)\n"); + + ok(GetActiveWindow() == mdi_frame, "wrong active window %p(Switch test)\n", GetActiveWindow()); + ok(GetFocus() == mdi_child || /* win2k */ + GetFocus() == 0, /* win9x */ + "wrong focus window %p(Switch test)\n", GetFocus()); + + active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); + ok(active_child == mdi_child, "wrong active MDI child %p(Switch test)\n", active_child); + ok(zoomed, "wrong zoomed state %d(Switch test)\n", zoomed); + flush_sequence(); + + trace("creating maximized visible MDI child window 2(Switch test)\n"); + mdi_child2 = CreateWindowExA(WS_EX_MDICHILD, "MDI_child_class", "MDI child", + WS_CHILD | WS_VISIBLE | WS_MAXIMIZEBOX | WS_MAXIMIZE, + 0, 0, CW_USEDEFAULT, CW_USEDEFAULT, + mdi_client, 0, GetModuleHandleA(0), NULL); + assert(mdi_child2); + ok_sequence(WmCreateMDIchildVisibleMaxSeq2, "Create maximized visible 2nd MDI child window(Switch test)\n", TRUE); + + ok(IsZoomed(mdi_child2), "2nd MDI child should be maximized(Switch test)\n"); + ok(!IsZoomed(mdi_child), "1st MDI child should NOT be maximized(Switch test)\n"); + + ok(GetActiveWindow() == mdi_frame, "wrong active window %p(Switch test)\n", GetActiveWindow()); + ok(GetFocus() == mdi_child2, "wrong focus window %p(Switch test)\n", GetFocus()); + + active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); + ok(active_child == mdi_child2, "wrong active MDI child %p(Switch test)\n", active_child); + ok(zoomed, "wrong zoomed state %d(Switch test)\n", zoomed); + flush_sequence(); + + trace("Switch child window.\n"); + SendMessageA(mdi_client, WM_MDIACTIVATE, (WPARAM)mdi_child, 0); + ok_sequence(WmSwitchChild,"Child not switch correctly\n",TRUE); + trace("end of test for switch maximized MDI children\n"); + + SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); + flush_sequence(); + + SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child2, 0); + flush_sequence(); + + SetFocus(0); + flush_sequence(); + /* end of test for switch maximized MDI children */ mdi_cs.szClass = "MDI_child_Class"; mdi_cs.szTitle = "MDI child"; @@ -3263,58 +3311,6 @@ static void test_mdi_messages(void) /* end of test for maximization of MDI child with invisible parent */ - /* test for switch maximized MDI children */ - trace("creating maximized visible MDI child window 1(Switch test)\n"); - mdi_child = CreateWindowExA(WS_EX_MDICHILD, "MDI_child_class", "MDI child", - WS_CHILD | WS_VISIBLE | WS_MAXIMIZEBOX | WS_MAXIMIZE, - 0, 0, CW_USEDEFAULT, CW_USEDEFAULT, - mdi_client, 0, GetModuleHandleA(0), NULL); - assert(mdi_child); - ok_sequence(WmCreateMDIchildVisibleMaxSeq1, "Create maximized visible 1st MDI child window(Switch test)", TRUE); - ok(IsZoomed(mdi_child), "1st MDI child should be maximized(Switch test)\n"); - - ok(GetActiveWindow() == mdi_frame, "wrong active window %p(Switch test)\n", GetActiveWindow()); - ok(GetFocus() == mdi_child || /* win2k */ - GetFocus() == 0, /* win9x */ - "wrong focus window %p(Switch test)\n", GetFocus()); - - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); - ok(active_child == mdi_child, "wrong active MDI child %p(Switch test)\n", active_child); - ok(zoomed, "wrong zoomed state %d(Switch test)\n", zoomed); - flush_sequence(); - - trace("creating maximized visible MDI child window 2(Switch test)\n"); - mdi_child2 = CreateWindowExA(WS_EX_MDICHILD, "MDI_child_class", "MDI child", - WS_CHILD | WS_VISIBLE | WS_MAXIMIZEBOX | WS_MAXIMIZE, - 0, 0, CW_USEDEFAULT, CW_USEDEFAULT, - mdi_client, 0, GetModuleHandleA(0), NULL); - assert(mdi_child2); - ok_sequence(WmCreateMDIchildVisibleMaxSeq2, "Create maximized visible 2nd MDI child 2 window(Switch test)\n", TRUE); - ok(IsZoomed(mdi_child2), "2nd MDI child should be maximized(Switch test)\n"); - ok(!IsZoomed(mdi_child), "1st MDI child should NOT be maximized(Switch test)\n"); - - ok(GetActiveWindow() == mdi_frame, "wrong active window %p(Switch test)\n", GetActiveWindow()); - ok(GetFocus() == mdi_child2, "wrong focus window %p(Switch test)\n", GetFocus()); - - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); - ok(active_child == mdi_child2, "wrong active MDI child %p(Switch test)\n", active_child); - ok(zoomed, "wrong zoomed state %d(Switch test)\n", zoomed); - flush_sequence(); - - trace("Switch child window.\n"); - SendMessageA(mdi_client, WM_MDIACTIVATE, (WPARAM)mdi_child, 0); - ok_sequence(WmSwitchChild,"Child not switch correctly\n",TRUE); - - trace("end of test for switch maximized MDI children\n"); - - SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); - flush_sequence(); - - SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child2, 0); - flush_sequence(); - - /* end of test for switch maximized MDI children */ - DestroyWindow(mdi_client); ok_sequence(WmDestroyMDIclientSeq, "Destroy MDI client window", FALSE);
1
0
0
0
Stefan Leichter : dinput: Remove 'recursive registry key delete' function.
by Alexandre Julliard
24 Sep '07
24 Sep '07
Module: wine Branch: master Commit: dd8c4a9583846b3ff5afa0637a9f54850d7c6d59 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dd8c4a9583846b3ff5afa0637…
Author: Stefan Leichter <Stefan.Leichter(a)camline.com> Date: Mon Sep 24 10:53:23 2007 +0200 dinput: Remove 'recursive registry key delete' function. --- dlls/dinput/regsvr.c | 79 +++++-------------------------------------------- 1 files changed, 8 insertions(+), 71 deletions(-) diff --git a/dlls/dinput/regsvr.c b/dlls/dinput/regsvr.c index fed3aad..ac1ffc1 100644 --- a/dlls/dinput/regsvr.c +++ b/dlls/dinput/regsvr.c @@ -115,9 +115,6 @@ static LONG register_key_defvalueA(HKEY base, WCHAR const *name, static LONG register_progid(WCHAR const *clsid, char const *progid, char const *curver_progid, char const *name, char const *extra); -static LONG recursive_delete_key(HKEY key); -static LONG recursive_delete_keyA(HKEY base, char const *name); -static LONG recursive_delete_keyW(HKEY base, WCHAR const *name); /*********************************************************************** * register_interfaces @@ -206,7 +203,8 @@ static HRESULT unregister_interfaces(struct regsvr_interface const *list) WCHAR buf[39]; StringFromGUID2(list->iid, buf, 39); - res = recursive_delete_keyW(interface_key, buf); + res = RegDeleteTreeW(interface_key, buf); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; } RegCloseKey(interface_key); @@ -313,16 +311,19 @@ static HRESULT unregister_coclasses(struct regsvr_coclass const *list) WCHAR buf[39]; StringFromGUID2(list->clsid, buf, 39); - res = recursive_delete_keyW(coclass_key, buf); + res = RegDeleteTreeW(coclass_key, buf); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; if (res != ERROR_SUCCESS) goto error_close_coclass_key; if (list->progid) { - res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->progid); + res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->progid); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; if (res != ERROR_SUCCESS) goto error_close_coclass_key; } if (list->viprogid) { - res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->viprogid); + res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->viprogid); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; if (res != ERROR_SUCCESS) goto error_close_coclass_key; } } @@ -435,70 +436,6 @@ error_close_progid_key: } /*********************************************************************** - * recursive_delete_key - */ -static LONG recursive_delete_key(HKEY key) -{ - LONG res; - WCHAR subkey_name[MAX_PATH]; - DWORD cName; - HKEY subkey; - - for (;;) { - cName = sizeof(subkey_name) / sizeof(WCHAR); - res = RegEnumKeyExW(key, 0, subkey_name, &cName, - NULL, NULL, NULL, NULL); - if (res != ERROR_SUCCESS && res != ERROR_MORE_DATA) { - res = ERROR_SUCCESS; /* presumably we're done enumerating */ - break; - } - res = RegOpenKeyExW(key, subkey_name, 0, - KEY_READ | KEY_WRITE, &subkey); - if (res == ERROR_FILE_NOT_FOUND) continue; - if (res != ERROR_SUCCESS) break; - - res = recursive_delete_key(subkey); - RegCloseKey(subkey); - if (res != ERROR_SUCCESS) break; - } - - if (res == ERROR_SUCCESS) res = RegDeleteKeyW(key, 0); - return res; -} - -/*********************************************************************** - * recursive_delete_keyA - */ -static LONG recursive_delete_keyA(HKEY base, char const *name) -{ - LONG res; - HKEY key; - - res = RegOpenKeyExA(base, name, 0, KEY_READ | KEY_WRITE, &key); - if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS; - if (res != ERROR_SUCCESS) return res; - res = recursive_delete_key(key); - RegCloseKey(key); - return res; -} - -/*********************************************************************** - * recursive_delete_keyW - */ -static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) -{ - LONG res; - HKEY key; - - res = RegOpenKeyExW(base, name, 0, KEY_READ | KEY_WRITE, &key); - if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS; - if (res != ERROR_SUCCESS) return res; - res = recursive_delete_key(key); - RegCloseKey(key); - return res; -} - -/*********************************************************************** * coclass list */ static struct regsvr_coclass const coclass_list[] = {
1
0
0
0
Stefan Leichter : dinput8: Remove 'recursive registry key delete' function.
by Alexandre Julliard
24 Sep '07
24 Sep '07
Module: wine Branch: master Commit: 51f27e1549ccdf2a939d2adc11032851a065c539 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=51f27e1549ccdf2a939d2adc1…
Author: Stefan Leichter <Stefan.Leichter(a)camline.com> Date: Mon Sep 24 10:40:40 2007 +0200 dinput8: Remove 'recursive registry key delete' function. --- dlls/dinput8/regsvr.c | 73 +++---------------------------------------------- 1 files changed, 4 insertions(+), 69 deletions(-) diff --git a/dlls/dinput8/regsvr.c b/dlls/dinput8/regsvr.c index c278ed3..3d8cdc9 100644 --- a/dlls/dinput8/regsvr.c +++ b/dlls/dinput8/regsvr.c @@ -93,9 +93,6 @@ static LONG register_key_defvalueW(HKEY base, WCHAR const *name, WCHAR const *value); static LONG register_key_defvalueA(HKEY base, WCHAR const *name, char const *value); -static LONG recursive_delete_key(HKEY key); -static LONG recursive_delete_keyA(HKEY base, char const *name); -static LONG recursive_delete_keyW(HKEY base, WCHAR const *name); /*********************************************************************** * register_coclasses @@ -199,11 +196,13 @@ static HRESULT unregister_coclasses(struct regsvr_coclass const *list) WCHAR buf[39]; StringFromGUID2(list->clsid, buf, 39); - res = recursive_delete_keyW(coclass_key, buf); + res = RegDeleteTreeW(coclass_key, buf); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; if (res != ERROR_SUCCESS) goto error_close_coclass_key; if (list->progid) { - res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->progid); + res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->progid); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; if (res != ERROR_SUCCESS) goto error_close_coclass_key; } } @@ -255,70 +254,6 @@ static LONG register_key_defvalueA( } /*********************************************************************** - * recursive_delete_key - */ -static LONG recursive_delete_key(HKEY key) -{ - LONG res; - WCHAR subkey_name[MAX_PATH]; - DWORD cName; - HKEY subkey; - - for (;;) { - cName = sizeof(subkey_name) / sizeof(WCHAR); - res = RegEnumKeyExW(key, 0, subkey_name, &cName, - NULL, NULL, NULL, NULL); - if (res != ERROR_SUCCESS && res != ERROR_MORE_DATA) { - res = ERROR_SUCCESS; /* presumably we're done enumerating */ - break; - } - res = RegOpenKeyExW(key, subkey_name, 0, - KEY_READ | KEY_WRITE, &subkey); - if (res == ERROR_FILE_NOT_FOUND) continue; - if (res != ERROR_SUCCESS) break; - - res = recursive_delete_key(subkey); - RegCloseKey(subkey); - if (res != ERROR_SUCCESS) break; - } - - if (res == ERROR_SUCCESS) res = RegDeleteKeyW(key, 0); - return res; -} - -/*********************************************************************** - * recursive_delete_keyA - */ -static LONG recursive_delete_keyA(HKEY base, char const *name) -{ - LONG res; - HKEY key; - - res = RegOpenKeyExA(base, name, 0, KEY_READ | KEY_WRITE, &key); - if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS; - if (res != ERROR_SUCCESS) return res; - res = recursive_delete_key(key); - RegCloseKey(key); - return res; -} - -/*********************************************************************** - * recursive_delete_keyW - */ -static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) -{ - LONG res; - HKEY key; - - res = RegOpenKeyExW(base, name, 0, KEY_READ | KEY_WRITE, &key); - if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS; - if (res != ERROR_SUCCESS) return res; - res = recursive_delete_key(key); - RegCloseKey(key); - return res; -} - -/*********************************************************************** * coclass list */
1
0
0
0
← Newer
1
...
17
18
19
20
21
22
23
...
79
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
Results per page:
10
25
50
100
200