ReactOS.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
2024
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
List overview
Download
Ros-diffs
November 2015
----- 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
ros-diffs@reactos.org
14 participants
457 discussions
Start a n
N
ew thread
[tfaber] 70144: [NTOS:FSRTL] - FILE_LOCK_INFO::ProcessId is really an EPROCESS pointer, not a process id
by tfaber@svn.reactos.org
Author: tfaber Date: Fri Nov 27 07:49:31 2015 New Revision: 70144 URL:
http://svn.reactos.org/svn/reactos?rev=70144&view=rev
Log: [NTOS:FSRTL] - FILE_LOCK_INFO::ProcessId is really an EPROCESS pointer, not a process id Modified: trunk/reactos/ntoskrnl/fsrtl/filelock.c Modified: trunk/reactos/ntoskrnl/fsrtl/filelock.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/filelock.c?…
============================================================================== --- trunk/reactos/ntoskrnl/fsrtl/filelock.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/fsrtl/filelock.c [iso-8859-1] Fri Nov 27 07:49:31 2015 @@ -418,7 +418,7 @@ ToInsert.Exclusive.FileLock.FileObject = FileObject; ToInsert.Exclusive.FileLock.StartingByte = *FileOffset; ToInsert.Exclusive.FileLock.EndingByte.QuadPart = FileOffset->QuadPart + Length->QuadPart; - ToInsert.Exclusive.FileLock.ProcessId = Process->UniqueProcessId; + ToInsert.Exclusive.FileLock.ProcessId = Process; ToInsert.Exclusive.FileLock.Key = Key; ToInsert.Exclusive.FileLock.ExclusiveLock = ExclusiveLock; @@ -643,7 +643,7 @@ NewSharedRange->Start = *FileOffset; NewSharedRange->End.QuadPart = FileOffset->QuadPart + Length->QuadPart; NewSharedRange->Key = Key; - NewSharedRange->ProcessId = Process->UniqueProcessId; + NewSharedRange->ProcessId = Process; InsertTailList(&LockInfo->SharedLocks, &NewSharedRange->Entry); } @@ -739,7 +739,7 @@ DPRINT("CheckLockForWriteAccess(%wZ) => TRUE\n", &IoStack->FileObject->FileName); return TRUE; } - Result = Process->UniqueProcessId == Found->Exclusive.FileLock.ProcessId; + Result = Process == Found->Exclusive.FileLock.ProcessId; DPRINT("CheckLockForWriteAccess(%wZ) => %s\n", &IoStack->FileObject->FileName, Result ? "TRUE" : "FALSE"); return Result; } @@ -775,7 +775,7 @@ &ToFind); if (!Found || !Found->Exclusive.FileLock.ExclusiveLock) return TRUE; return Found->Exclusive.FileLock.Key == Key && - Found->Exclusive.FileLock.ProcessId == EProcess->UniqueProcessId; + Found->Exclusive.FileLock.ProcessId == EProcess; } /* @@ -816,7 +816,7 @@ return TRUE; } Result = Found->Exclusive.FileLock.Key == Key && - Found->Exclusive.FileLock.ProcessId == EProcess->UniqueProcessId; + Found->Exclusive.FileLock.ProcessId == EProcess; DPRINT("CheckForWrite(%wZ) => %s\n", &FileObject->FileName, Result ? "TRUE" : "FALSE"); return Result; } @@ -879,7 +879,7 @@ if (Entry->Exclusive.FileLock.ExclusiveLock) { if (Entry->Exclusive.FileLock.Key != Key || - Entry->Exclusive.FileLock.ProcessId != Process->UniqueProcessId || + Entry->Exclusive.FileLock.ProcessId != Process || Entry->Exclusive.FileLock.StartingByte.QuadPart != FileOffset->QuadPart || Entry->Exclusive.FileLock.EndingByte.QuadPart != FileOffset->QuadPart + Length->QuadPart) @@ -907,7 +907,7 @@ if (SharedRange->Start.QuadPart == FileOffset->QuadPart && SharedRange->End.QuadPart == FileOffset->QuadPart + Length->QuadPart && SharedRange->Key == Key && - SharedRange->ProcessId == Process->UniqueProcessId) + SharedRange->ProcessId == Process) { FoundShared = TRUE; DPRINT("Found shared element to delete %wZ Start %08x%08x End %08x%08x Key %x\n", @@ -1044,7 +1044,7 @@ PLOCK_SHARED_RANGE Range = CONTAINING_RECORD(ListEntry, LOCK_SHARED_RANGE, Entry); Length.QuadPart = Range->End.QuadPart - Range->Start.QuadPart; ListEntry = ListEntry->Flink; - if (Range->ProcessId != Process->UniqueProcessId) + if (Range->ProcessId != Process) continue; FsRtlFastUnlockSingle (FileLock, @@ -1105,7 +1105,7 @@ LARGE_INTEGER Length; Length.QuadPart = Range->End.QuadPart - Range->Start.QuadPart; ListEntry = ListEntry->Flink; - if (Range->ProcessId != Process->UniqueProcessId || + if (Range->ProcessId != Process || Range->Key != Key) continue; FsRtlFastUnlockSingle @@ -1128,7 +1128,7 @@ Entry->Exclusive.FileLock.EndingByte.QuadPart - Entry->Exclusive.FileLock.StartingByte.QuadPart; if (Entry->Exclusive.FileLock.Key == Key && - Entry->Exclusive.FileLock.ProcessId == Process->UniqueProcessId) + Entry->Exclusive.FileLock.ProcessId == Process) { FsRtlFastUnlockSingle (FileLock,
8 years, 11 months
1
0
0
0
[tfaber] 70143: [NETCFGX] - Specify KEY_CREATE_SUB_KEY when trying to create subkeys CORE-10587
by tfaber@svn.reactos.org
Author: tfaber Date: Fri Nov 27 01:51:08 2015 New Revision: 70143 URL:
http://svn.reactos.org/svn/reactos?rev=70143&view=rev
Log: [NETCFGX] - Specify KEY_CREATE_SUB_KEY when trying to create subkeys CORE-10587 Modified: trunk/reactos/dll/win32/netcfgx/netcfgx.c Modified: trunk/reactos/dll/win32/netcfgx/netcfgx.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/netcfgx.…
============================================================================== --- trunk/reactos/dll/win32/netcfgx/netcfgx.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netcfgx/netcfgx.c [iso-8859-1] Fri Nov 27 01:51:08 2015 @@ -287,14 +287,14 @@ wcscat(ExportName, UuidString); /* Write Tcpip parameters in new service Key */ - rc = RegCreateKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Services", 0, NULL, REG_OPTION_NON_VOLATILE, 0, NULL, &hKey, NULL); - if (rc != ERROR_SUCCESS) - { - DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc); - goto cleanup; - } - - rc = RegCreateKeyExW(hKey, UuidString, 0, NULL, REG_OPTION_NON_VOLATILE, 0, NULL, &hNetworkKey, NULL); + rc = RegCreateKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Services", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_CREATE_SUB_KEY, NULL, &hKey, NULL); + if (rc != ERROR_SUCCESS) + { + DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc); + goto cleanup; + } + + rc = RegCreateKeyExW(hKey, UuidString, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_CREATE_SUB_KEY, NULL, &hNetworkKey, NULL); if (rc != ERROR_SUCCESS) { DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc); @@ -414,7 +414,7 @@ hKey = NULL; /* Write connection information in network subkey */ - rc = RegCreateKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}", 0, NULL, REG_OPTION_NON_VOLATILE, 0, NULL, &hNetworkKey, NULL); + rc = RegCreateKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_CREATE_SUB_KEY, NULL, &hNetworkKey, NULL); if (rc != ERROR_SUCCESS) { DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc);
8 years, 11 months
1
0
0
0
[tfaber] 70142: [NETCFGX] - Enable debug prints on failure in InstallNetDevice
by tfaber@svn.reactos.org
Author: tfaber Date: Fri Nov 27 01:41:09 2015 New Revision: 70142 URL:
http://svn.reactos.org/svn/reactos?rev=70142&view=rev
Log: [NETCFGX] - Enable debug prints on failure in InstallNetDevice Modified: trunk/reactos/dll/win32/netcfgx/netcfgx.c Modified: trunk/reactos/dll/win32/netcfgx/netcfgx.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/netcfgx.…
============================================================================== --- trunk/reactos/dll/win32/netcfgx/netcfgx.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netcfgx/netcfgx.c [iso-8859-1] Fri Nov 27 01:41:09 2015 @@ -290,14 +290,14 @@ rc = RegCreateKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Services", 0, NULL, REG_OPTION_NON_VOLATILE, 0, NULL, &hKey, NULL); if (rc != ERROR_SUCCESS) { - DPRINT("RegCreateKeyExW() failed with error 0x%lx\n", rc); + DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc); goto cleanup; } rc = RegCreateKeyExW(hKey, UuidString, 0, NULL, REG_OPTION_NON_VOLATILE, 0, NULL, &hNetworkKey, NULL); if (rc != ERROR_SUCCESS) { - DPRINT("RegCreateKeyExW() failed with error 0x%lx\n", rc); + DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc); goto cleanup; } RegCloseKey(hKey); @@ -306,7 +306,7 @@ rc = RegCreateKeyExW(hNetworkKey, L"Parameters\\Tcpip", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_SET_VALUE, NULL, &hKey, NULL); if (rc != ERROR_SUCCESS) { - DPRINT("RegCreateKeyExW() failed with error 0x%lx\n", rc); + DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc); goto cleanup; } RegCloseKey(hNetworkKey); @@ -315,21 +315,21 @@ rc = RegSetValueExW(hKey, L"DefaultGateway", 0, REG_SZ, (const BYTE*)L"0.0.0.0", (wcslen(L"0.0.0.0") + 1) * sizeof(WCHAR)); if (rc != ERROR_SUCCESS) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc); goto cleanup; } rc = RegSetValueExW(hKey, L"IPAddress", 0, REG_SZ, (const BYTE*)L"0.0.0.0", (wcslen(L"0.0.0.0") + 1) * sizeof(WCHAR)); if (rc != ERROR_SUCCESS) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc); goto cleanup; } rc = RegSetValueExW(hKey, L"SubnetMask", 0, REG_SZ, (const BYTE*)L"0.0.0.0", (wcslen(L"0.0.0.0") + 1) * sizeof(WCHAR)); if (rc != ERROR_SUCCESS) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc); goto cleanup; } @@ -337,7 +337,7 @@ rc = RegSetValueExW(hKey, L"EnableDHCP", 0, REG_DWORD, (const BYTE*)&dwValue, sizeof(DWORD)); if (rc != ERROR_SUCCESS) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc); goto cleanup; } RegCloseKey(hKey); @@ -355,21 +355,21 @@ { hKey = NULL; rc = GetLastError(); - DPRINT("SetupDiCreateDevRegKeyW() failed with error 0x%lx\n", rc); + DPRINT1("SetupDiCreateDevRegKeyW() failed with error 0x%lx\n", rc); goto cleanup; } rc = RegSetValueExW(hKey, L"NetCfgInstanceId", 0, REG_SZ, (const BYTE*)UuidString, (wcslen(UuidString) + 1) * sizeof(WCHAR)); if (rc != ERROR_SUCCESS) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc); goto cleanup; } rc = RegSetValueExW(hKey, L"Characteristics", 0, REG_DWORD, (const BYTE*)&Characteristics, sizeof(DWORD)); if (rc != ERROR_SUCCESS) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc); goto cleanup; } @@ -378,7 +378,7 @@ rc = RegSetValueExW(hKey, L"BusType", 0, REG_SZ, (const BYTE*)BusType, (wcslen(BusType) + 1) * sizeof(WCHAR)); if (rc != ERROR_SUCCESS) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc); goto cleanup; } } @@ -386,28 +386,28 @@ rc = RegCreateKeyExW(hKey, L"Linkage", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_SET_VALUE, NULL, &hLinkageKey, NULL); if (rc != ERROR_SUCCESS) { - DPRINT("RegCreateKeyExW() failed with error 0x%lx\n", rc); + DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc); goto cleanup; } rc = RegSetValueExW(hLinkageKey, L"Export", 0, REG_SZ, (const BYTE*)DeviceName, (wcslen(DeviceName) + 1) * sizeof(WCHAR)); if (rc != ERROR_SUCCESS) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc); goto cleanup; } rc = RegSetValueExW(hLinkageKey, L"RootDevice", 0, REG_SZ, (const BYTE*)UuidString, (wcslen(UuidString) + 1) * sizeof(WCHAR)); if (rc != ERROR_SUCCESS) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc); goto cleanup; } rc = RegSetValueExW(hLinkageKey, L"UpperBind", 0, REG_SZ, (const BYTE*)L"Tcpip", (wcslen(L"Tcpip") + 1) * sizeof(WCHAR)); if (rc != ERROR_SUCCESS) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc); goto cleanup; } RegCloseKey(hKey); @@ -417,14 +417,14 @@ rc = RegCreateKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}", 0, NULL, REG_OPTION_NON_VOLATILE, 0, NULL, &hNetworkKey, NULL); if (rc != ERROR_SUCCESS) { - DPRINT("RegCreateKeyExW() failed with error 0x%lx\n", rc); + DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc); goto cleanup; } rc = RegCreateKeyExW(hNetworkKey, UuidString, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_CREATE_SUB_KEY, NULL, &hKey, NULL); if (rc != ERROR_SUCCESS) { - DPRINT("RegCreateKeyExW() failed with error 0x%lx\n", rc); + DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc); goto cleanup; } @@ -433,7 +433,7 @@ hKey = NULL; if (rc != ERROR_SUCCESS) { - DPRINT("RegCreateKeyExW() failed with error 0x%lx\n", rc); + DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc); goto cleanup; } @@ -445,14 +445,14 @@ rc = RegSetValueExW(hConnectionKey, L"Name", 0, REG_SZ, (const BYTE*)szBuffer, (wcslen(szBuffer) + 1) * sizeof(WCHAR)); if (rc != ERROR_SUCCESS) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc); goto cleanup; } rc = RegSetValueExW(hConnectionKey, L"PnpInstanceId", 0, REG_SZ, (const BYTE*)InstanceId, (wcslen(InstanceId) + 1) * sizeof(WCHAR)); if (rc != ERROR_SUCCESS) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc); goto cleanup; } @@ -460,7 +460,7 @@ rc = RegSetValueExW(hConnectionKey, L"ShowIcon", 0, REG_DWORD, (const BYTE*)&dwShowIcon, sizeof(dwShowIcon)); if (rc != ERROR_SUCCESS) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc); goto cleanup; } @@ -468,25 +468,25 @@ rc = RegCreateKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Linkage", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_QUERY_VALUE | KEY_SET_VALUE, NULL, &hKey, NULL); if (rc != ERROR_SUCCESS) { - DPRINT("RegCreateKeyExW() failed with error 0x%lx\n", rc); + DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc); goto cleanup; } rc = AppendStringToMultiSZ(hKey, L"Bind", DeviceName); if (rc != ERROR_SUCCESS) { - DPRINT("AppendStringToMultiSZ() failed with error 0x%lx\n", rc); + DPRINT1("AppendStringToMultiSZ() failed with error 0x%lx\n", rc); goto cleanup; } rc = AppendStringToMultiSZ(hKey, L"Export", ExportName); if (rc != ERROR_SUCCESS) { - DPRINT("AppendStringToMultiSZ() failed with error 0x%lx\n", rc); + DPRINT1("AppendStringToMultiSZ() failed with error 0x%lx\n", rc); goto cleanup; } rc = AppendStringToMultiSZ(hKey, L"Route", UuidString); if (rc != ERROR_SUCCESS) { - DPRINT("AppendStringToMultiSZ() failed with error 0x%lx\n", rc); + DPRINT1("AppendStringToMultiSZ() failed with error 0x%lx\n", rc); goto cleanup; }
8 years, 11 months
1
0
0
0
[akhaldi] 70141: [WINMM_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 26 23:39:16 2015 New Revision: 70141 URL:
http://svn.reactos.org/svn/reactos?rev=70141&view=rev
Log: [WINMM_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536 Modified: trunk/rostests/winetests/winmm/joystick.c trunk/rostests/winetests/winmm/mci.c trunk/rostests/winetests/winmm/mmio.c trunk/rostests/winetests/winmm/wave.c Modified: trunk/rostests/winetests/winmm/joystick.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/winmm/joystick.…
============================================================================== --- trunk/rostests/winetests/winmm/joystick.c [iso-8859-1] (original) +++ trunk/rostests/winetests/winmm/joystick.c [iso-8859-1] Thu Nov 26 23:39:16 2015 @@ -156,7 +156,7 @@ par = 0xdead; ret = joyGetThreshold(joyid, &par); ok(ret == JOYERR_NOERROR, "Test [%d]: Expected %d, got %d\n", i, JOYERR_NOERROR, ret); - if (!win98 || (win98 && i < 8)) + if (!win98 || i < 8) { if ((1 << i) & threshold_error) ok(par == period[8], "Test [%d]: Expected %d, got %d\n", i, period[8], par); @@ -195,6 +195,35 @@ ret = joyGetPosEx(joyid, &infoex.ex); ok(ret == JOYERR_NOERROR, "Expected %d, got %d\n", JOYERR_NOERROR, ret); } + + /* the interactive tests spans for 15 seconds, a 500ms polling is used to get + * changes in the joystick. */ + if (winetest_interactive) + { +#define MAX_TIME 15000 + DWORD tick = GetTickCount(), spent; + infoex.ex.dwSize = sizeof(infoex.ex); + infoex.ex.dwFlags = JOY_RETURNALL; + do + { + spent = GetTickCount() - tick; + ret = joyGetPosEx(joyid, &infoex.ex); + if (ret == JOYERR_NOERROR) + { + trace("X: %5d, Y: %5d, Z: %5d, POV: %5d\n", + infoex.ex.dwXpos, infoex.ex.dwYpos, infoex.ex.dwZpos, infoex.ex.dwPOV); + trace("R: %5d, U: %5d, V: %5d\n", + infoex.ex.dwRpos, infoex.ex.dwUpos, infoex.ex.dwVpos); + trace("BUTTONS: 0x%04X, BUTTON_COUNT: %2d, REMAINING: %d ms\n\n", + infoex.ex.dwButtons, infoex.ex.dwButtonNumber, MAX_TIME - spent); + } + Sleep(500); + } + while (spent < MAX_TIME); +#undef MAX_TIME + } + else + skip("Skipping interactive tests for the joystick\n"); } START_TEST(joystick) Modified: trunk/rostests/winetests/winmm/mci.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/winmm/mci.c?rev…
============================================================================== --- trunk/rostests/winetests/winmm/mci.c [iso-8859-1] (original) +++ trunk/rostests/winetests/winmm/mci.c [iso-8859-1] Thu Nov 26 23:39:16 2015 @@ -1329,8 +1329,70 @@ ok(status_parm.dwReturn == MCI_MODE_PLAY, "mciCommand status mode: %u\n", (DWORD)status_parm.dwReturn); + err = mciSendStringA("setaudio mysound volume to 1000", NULL, 0, NULL); + ok(!err,"mci setaudio volume to 1000 returned %s\n", dbg_mcierr(err)); + + err = mciSendStringA("status mysound mode", buf, sizeof(buf), NULL); + ok(!err,"mci status mode returned %s\n", dbg_mcierr(err)); + ok(!strcmp(buf,"playing"), "mci status mode: %s\n", buf); + + err = mciSendStringA("setaudio mysound volume to 1001", NULL, 0, NULL); + ok(err==MCIERR_OUTOFRANGE,"mci setaudio volume to 1001 returned %s\n", dbg_mcierr(err)); + + err = mciSendStringA("status mysound mode", buf, sizeof(buf), NULL); + ok(!err,"mci status mode returned %s\n", dbg_mcierr(err)); + ok(!strcmp(buf,"playing"), "mci status mode: %s\n", buf); + err = mciSendStringA("close mysound", NULL, 0, NULL); ok(!err,"mci close returned %s\n", dbg_mcierr(err)); +} + +static void test_asyncWaveTypeMpegvideo(HWND hwnd) +{ + MCIDEVICEID wDeviceID; + int err; + char buf[1024]; + memset(buf, 0, sizeof(buf)); + + err = mciSendStringA("open tempfile.wav alias mysound notify type mpegvideo", buf, sizeof(buf), hwnd); + ok(err==ok_saved,"mci open tempfile.wav returned %s\n", dbg_mcierr(err)); + if(err) { + skip("Cannot open tempfile.wav for playing (%s), skipping\n", dbg_mcierr(err)); + return; + } + ok(!strcmp(buf,"1"), "mci open deviceId: %s, expected 1\n", buf); + wDeviceID = atoi(buf); + ok(wDeviceID,"mci open DeviceID: %d\n", wDeviceID); + test_notification(hwnd,"open alias notify",MCI_NOTIFY_SUCCESSFUL); + + err = mciSendStringA("play mysound notify", NULL, 0, hwnd); + ok(!err,"mci play returned %s\n", dbg_mcierr(err)); + + Sleep(500); /* milliseconds */ + + err = mciSendStringA("pause mysound wait", NULL, 0, hwnd); + ok(!err,"mci pause wait returned %s\n", dbg_mcierr(err)); + + err = mciSendStringA("status mysound mode notify", buf, sizeof(buf), hwnd); + ok(!err,"mci status mode returned %s\n", dbg_mcierr(err)); + if(!err) ok(!strcmp(buf,"paused"), "mci status mode: %s\n", buf); + test_notification(hwnd,"play (superseded)",MCI_NOTIFY_SUPERSEDED); + test_notification(hwnd,"status",MCI_NOTIFY_SUCCESSFUL); + + err = mciSendStringA("seek mysound to start wait", NULL, 0, NULL); + ok(!err,"mci seek to start wait returned %s\n", dbg_mcierr(err)); + + err = mciSendStringA("set mysound time format milliseconds", NULL, 0, NULL); + ok(!err,"mci time format milliseconds returned %s\n", dbg_mcierr(err)); + + err = mciSendStringA("play mysound to 1500 notify", NULL, 0, hwnd); + ok(!err,"mci play returned %s\n", dbg_mcierr(err)); + Sleep(200); + test_notification(hwnd,"play",0); + + err = mciSendStringA("close mysound wait", NULL, 0, NULL); + ok(!err,"mci close wait returned %s\n", dbg_mcierr(err)); + test_notification(hwnd,"play (aborted by close)",MCI_NOTIFY_ABORTED); } START_TEST(mci) @@ -1353,6 +1415,7 @@ test_asyncWAVE(hwnd); test_AutoOpenWAVE(hwnd); test_playWaveTypeMpegvideo(); + test_asyncWaveTypeMpegvideo(hwnd); }else skip("No output devices available, skipping all output tests\n"); /* Win9X hangs when exiting with something still open. */ Modified: trunk/rostests/winetests/winmm/mmio.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/winmm/mmio.c?re…
============================================================================== --- trunk/rostests/winetests/winmm/mmio.c [iso-8859-1] (original) +++ trunk/rostests/winetests/winmm/mmio.c [iso-8859-1] Thu Nov 26 23:39:16 2015 @@ -599,12 +599,15 @@ static LRESULT CALLBACK mmio_test_IOProc(LPSTR lpMMIOInfo, UINT uMessage, LPARAM lParam1, LPARAM lParam2) { LPMMIOINFO lpInfo = (LPMMIOINFO) lpMMIOInfo; + int i; switch (uMessage) { case MMIOM_OPEN: if (lpInfo->fccIOProc == FOURCC_DOS) lpInfo->fccIOProc = mmioFOURCC('F', 'A', 'I', 'L'); + for (i = 0; i < sizeof(lpInfo->adwInfo) / sizeof(*lpInfo->adwInfo); i++) + ok(lpInfo->adwInfo[i] == 0, "[%d] Expected 0, got %u\n", i, lpInfo->adwInfo[i]); return MMSYSERR_NOERROR; case MMIOM_CLOSE: return MMSYSERR_NOERROR; @@ -633,6 +636,18 @@ memset(&mmio, 0, sizeof(mmio)); hmmio = mmioOpenA(fname, &mmio, MMIO_READ); + mmioGetInfo(hmmio, &mmio, 0); + ok(hmmio && mmio.fccIOProc == FOURCC_XYZ, "mmioOpenA error %u, got %4.4s\n", + mmio.wErrorRet, (LPCSTR)&mmio.fccIOProc); + ok(mmio.adwInfo[1] == 0, "mmioOpenA sent MMIOM_SEEK, got %d\n", + mmio.adwInfo[1]); + ok(mmio.lDiskOffset == 0, "mmioOpenA updated lDiskOffset, got %d\n", + mmio.lDiskOffset); + mmioClose(hmmio, 0); + + /* Same test with NULL info */ + memset(&mmio, 0, sizeof(mmio)); + hmmio = mmioOpenA(fname, NULL, MMIO_READ); mmioGetInfo(hmmio, &mmio, 0); ok(hmmio && mmio.fccIOProc == FOURCC_XYZ, "mmioOpenA error %u, got %4.4s\n", mmio.wErrorRet, (LPCSTR)&mmio.fccIOProc); @@ -870,7 +885,8 @@ ok(mmio.pchEndRead == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchEndRead); /* fill the buffer */ - size = mmioAdvance(hmmio, &mmio, MMIO_READ); + res = mmioAdvance(hmmio, &mmio, MMIO_READ); + ok(res == MMSYSERR_NOERROR, "mmioAdvance failed %x\n", res); ok(mmio.pchEndRead-mmio.pchBuffer == sizeof(buffer), "got %d\n", (int)(mmio.pchEndRead-mmio.pchBuffer)); /* seeking to the same buffer chunk, the buffer is kept */ @@ -904,6 +920,88 @@ mmioClose(hmmio, 0); DeleteFileA(test_file); +} + +static void test_riff_write(void) +{ + static const DWORD test_write_data[] = + { + FOURCC_RIFF, 0x28, mmioFOURCC('W','A','V','E'), mmioFOURCC('d','a','t','a'), + 0x1b, 0xdededede, 0xdededede, 0xefefefef, + 0xefefefef, 0xbabababa, 0xbabababa, 0xefefef + }; + + char name[] = "test_write.wav"; + char buf[256]; + MMCKINFO chunk_info[2]; + MMIOINFO info; + HMMIO mmio; + MMRESULT ret; + LONG written; + DWORD read; + HANDLE h; + + memset(chunk_info, 0, sizeof(chunk_info)); + + mmio = mmioOpenA(name, NULL, MMIO_ALLOCBUF|MMIO_CREATE|MMIO_READWRITE); + ok(mmio != NULL, "mmioOpen failed\n"); + + chunk_info[0].fccType = mmioFOURCC('W','A','V','E'); + ret = mmioCreateChunk(mmio, chunk_info, MMIO_CREATERIFF); + ok(ret == MMSYSERR_NOERROR, "mmioCreateChunk failed %x\n", ret); + ok(chunk_info[0].ckid == FOURCC_RIFF, "chunk_info[0].ckid = %x\n", chunk_info[0].ckid); + ok(chunk_info[0].cksize == 0, "chunk_info[0].cksize = %d\n", chunk_info[0].cksize); + ok(chunk_info[0].dwDataOffset == 8, "chunk_info[0].dwDataOffset = %d\n", chunk_info[0].dwDataOffset); + ok(chunk_info[0].dwFlags == MMIO_DIRTY, "chunk_info[0].dwFlags = %x\n", chunk_info[0].dwFlags); + + chunk_info[1].ckid = mmioFOURCC('d','a','t','a'); + ret = mmioCreateChunk(mmio, chunk_info+1, 0); + ok(ret == MMSYSERR_NOERROR, "mmioCreateChunk failed %x\n", ret); + ok(chunk_info[1].ckid == mmioFOURCC('d','a','t','a'), "chunk_info[1].ckid = %x\n", chunk_info[1].ckid); + ok(chunk_info[1].cksize == 0, "chunk_info[1].cksize = %d\n", chunk_info[1].cksize); + ok(chunk_info[1].dwDataOffset == 20, "chunk_info[1].dwDataOffset = %d\n", chunk_info[1].dwDataOffset); + ok(chunk_info[1].dwFlags == MMIO_DIRTY, "chunk_info[1].dwFlags = %x\n", chunk_info[1].dwFlags); + + memset(buf, 0xde, sizeof(buf)); + written = mmioWrite(mmio, buf, 8); + ok(written == 8, "mmioWrite failed %x\n", ret); + + ret = mmioGetInfo(mmio, &info, 0); + ok(ret == MMSYSERR_NOERROR, "mmioGetInfo failed %x\n", ret); + + memset(info.pchNext, 0xef, 8); + info.pchNext += 8; + ret = mmioAdvance(mmio, &info, 1); + ok(ret == MMSYSERR_NOERROR, "mmioAdvance failed %x\n", ret); + ok(info.lBufOffset == 36, "info.lBufOffset = %d\n", info.lBufOffset); + + info.dwFlags |= MMIO_DIRTY; + memset(info.pchNext, 0xba, 8); + info.pchNext += 8; + ret = mmioAdvance(mmio, &info, 1); + ok(ret == MMSYSERR_NOERROR, "mmioAdvance failed %x\n", ret); + ok(info.lBufOffset == 44, "info.lBufOffset = %d\n", info.lBufOffset); + + info.dwFlags |= MMIO_DIRTY; + memset(info.pchNext, 0xef, 3); + info.pchNext += 3; + ret = mmioSetInfo(mmio, &info, 0); + ok(ret == MMSYSERR_NOERROR, "mmioSetInfo failed %x\n", ret); + + ret = mmioAscend(mmio, chunk_info+1, 0); + ok(ret == MMSYSERR_NOERROR, "mmioAscend failed %x\n", ret); + ret = mmioAscend(mmio, chunk_info, 0); + ok(ret == MMSYSERR_NOERROR, "mmioAscend failed %x\n", ret); + ret = mmioClose(mmio, 0); + ok(ret == MMSYSERR_NOERROR, "mmioClose failed %x\n", ret); + + h = CreateFileA("test_write.wav", GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0); + ok(h != INVALID_HANDLE_VALUE, "CreateFile failed\n"); + ok(ReadFile(h, buf, sizeof(buf), &read, NULL), "ReadFile failed\n"); + CloseHandle(h); + ok(!memcmp(buf, test_write_data, sizeof(test_write_data)), "created file is incorrect\n"); + + DeleteFileA("test_write.wav"); } START_TEST(mmio) @@ -924,4 +1022,5 @@ test_mmioSeek(); test_mmio_end_of_file(); test_mmio_buffer_pointer(); -} + test_riff_write(); +} Modified: trunk/rostests/winetests/winmm/wave.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/winmm/wave.c?re…
============================================================================== --- trunk/rostests/winetests/winmm/wave.c [iso-8859-1] (original) +++ trunk/rostests/winetests/winmm/wave.c [iso-8859-1] Thu Nov 26 23:39:16 2015 @@ -1603,10 +1603,100 @@ CloseHandle(hevent); } +static void create_wav_file(char *temp_file) +{ + WAVEFORMATEX format; + HMMIO h; + MMCKINFO riff_chunk, chunk; + MMRESULT rc; + LONG written; + DWORD length; + char *buffer; + + format.wFormatTag=WAVE_FORMAT_PCM; + format.cbSize = 0; + format.nChannels=1; + format.wBitsPerSample=8; + format.nSamplesPerSec=8000; + format.nBlockAlign=format.nChannels*format.wBitsPerSample/8; + format.nAvgBytesPerSec=format.nSamplesPerSec*format.nBlockAlign; + + h = mmioOpenA(temp_file, NULL, MMIO_ALLOCBUF | MMIO_WRITE | MMIO_CREATE); + ok(h != NULL, "Can't open temp_file\n"); + + riff_chunk.fccType = mmioFOURCC('W','A','V','E'); + riff_chunk.cksize = 0; + rc = mmioCreateChunk(h, &riff_chunk, MMIO_CREATERIFF); + ok(rc == MMSYSERR_NOERROR, "mmioCreateChunk failed, got %u\n", rc); + + chunk.ckid = mmioFOURCC('f','m','t',' '); + chunk.cksize = 0; + rc = mmioCreateChunk(h, &chunk, 0); + ok(rc == MMSYSERR_NOERROR, "mmioCreateChunk failed, got %u\n", rc); + written = mmioWrite(h, (char*)&format, sizeof(format)); + ok(written == sizeof(format), "mmioWrite failed, got %d\n", written); + rc = mmioAscend(h, &chunk, 0); + ok(rc == MMSYSERR_NOERROR, "mmioAscend failed, got %d\n", rc); + + chunk.ckid = mmioFOURCC('d','a','t','a'); + rc = mmioCreateChunk(h, &chunk, 0); + ok(rc == MMSYSERR_NOERROR, "mmioCreateChunk failed, got %u\n", rc); + buffer = wave_generate_silence(&format, .1, &length); + written = mmioWrite(h, buffer, length); + ok(written == length, "mmioWrite failed, got %d\n", written); + rc = mmioAscend(h, &chunk, 0); + ok(rc == MMSYSERR_NOERROR, "mmioAscend failed, got %d\n", rc); + HeapFree(GetProcessHeap(), 0, buffer); + + rc = mmioAscend(h, &riff_chunk, 0); + ok(rc == MMSYSERR_NOERROR, "mmioAscend failed, got %d\n", rc); + + rc = mmioClose(h, 0); + ok(rc == MMSYSERR_NOERROR, "mmioClose failed, got %u\n", rc); +} + +static void test_PlaySound(void) +{ + BOOL br; + char test_file[MAX_PATH], temp[MAX_PATH], *exts; + + if(waveOutGetNumDevs() == 0) { + skip("No output devices available\n"); + return; + } + + GetTempPathA(sizeof(test_file), test_file); + strcat(test_file, "mysound.wav"); + create_wav_file(test_file); + + br = PlaySoundA(test_file, NULL, SND_FILENAME | SND_NODEFAULT); + ok(br, "PlaySound failed, got %d\n", br); + + /* SND_ALIAS fallbacks to SND_FILENAME */ + br = PlaySoundA(test_file, NULL, SND_ALIAS | SND_NODEFAULT); + ok(br, "PlaySound failed, got %d\n", br); + + strcpy(temp, test_file); + exts = strrchr(temp, '.'); + + /* no extensions */ + *exts = '\0'; + br = PlaySoundA(temp, NULL, SND_FILENAME | SND_NODEFAULT); + ok(br, "PlaySound failed, got %d\n", br); + + /* ends with a dot */ + strcpy(exts, "."); + br = PlaySoundA(temp, NULL, SND_FILENAME | SND_NODEFAULT); + ok(!br || broken(br), "PlaySound succeeded, got %d\n", br); + + DeleteFileA(test_file); +} + START_TEST(wave) { test_multiple_waveopens(); wave_out_tests(); test_sndPlaySound(); test_fragmentsize(); -} + test_PlaySound(); +}
8 years, 11 months
1
0
0
0
[akhaldi] 70140: [VBSCRIPT_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 26 23:37:03 2015 New Revision: 70140 URL:
http://svn.reactos.org/svn/reactos?rev=70140&view=rev
Log: [VBSCRIPT_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536 Modified: trunk/rostests/winetests/vbscript/run.c trunk/rostests/winetests/vbscript/vbsregexp55.idl Modified: trunk/rostests/winetests/vbscript/run.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/vbscript/run.c?…
============================================================================== --- trunk/rostests/winetests/vbscript/run.c [iso-8859-1] (original) +++ trunk/rostests/winetests/vbscript/run.c [iso-8859-1] Thu Nov 26 23:37:03 2015 @@ -107,6 +107,7 @@ DEFINE_EXPECT(GetWindow); DEFINE_EXPECT(GetUIBehavior); DEFINE_EXPECT(EnableModeless); +DEFINE_EXPECT(OnScriptError); #define DISPID_GLOBAL_REPORTSUCCESS 1000 #define DISPID_GLOBAL_TRACE 1001 @@ -145,6 +146,7 @@ static int test_counter; static SCRIPTUICHANDLING uic_handling = SCRIPTUICHANDLING_NOUIERROR; static IDispatchEx testObj; +static HRESULT onerror_hres = E_NOTIMPL; static BSTR a2bstr(const char *str) { @@ -1630,7 +1632,12 @@ static HRESULT WINAPI ActiveScriptSite_OnScriptError(IActiveScriptSite *iface, IActiveScriptError *pscripterror) { - return E_NOTIMPL; + HRESULT hr = onerror_hres; + CHECK_EXPECT(OnScriptError); + + onerror_hres = E_NOTIMPL; + + return hr; } static HRESULT WINAPI ActiveScriptSite_OnEnterScript(IActiveScriptSite *iface) @@ -1934,18 +1941,22 @@ SET_EXPECT(GetUIBehavior); SET_EXPECT(GetWindow); SET_EXPECT(EnableModeless); + SET_EXPECT(OnScriptError); hres = parse_script_ar("MsgBox \"testing...\""); ok(FAILED(hres), "script not failed\n"); CHECK_CALLED(GetUIBehavior); CHECK_CALLED(GetWindow); CHECK_CALLED(EnableModeless); + todo_wine CHECK_CALLED(OnScriptError); uic_handling = SCRIPTUICHANDLING_NOUIERROR; SET_EXPECT(GetUIBehavior); + SET_EXPECT(OnScriptError); hres = parse_script_ar("MsgBox \"testing...\""); ok(FAILED(hres), "script not failed\n"); CHECK_CALLED(GetUIBehavior); + todo_wine CHECK_CALLED(OnScriptError); } static HRESULT test_global_vars_ref(BOOL use_close) @@ -2191,8 +2202,10 @@ parse_htmlscript_a("<!--\ndim x\nx=1\n-->\n"); parse_htmlscript_a("<!--\ndim x\n-->\n<!--\nx=1\n-->\n"); + SET_EXPECT(OnScriptError); hres = parse_script_ar("<!--"); ok(FAILED(hres), "script didn't fail\n"); + todo_wine CHECK_CALLED(OnScriptError); SET_EXPECT(global_success_d); SET_EXPECT(global_success_i); @@ -2215,19 +2228,39 @@ test_global_vars_ref(TRUE); test_global_vars_ref(FALSE); + SET_EXPECT(OnScriptError); hres = parse_script_ar("throwInt(&h80080008&)"); ok(hres == 0x80080008, "hres = %08x\n", hres); + todo_wine CHECK_CALLED(OnScriptError); /* DISP_E_BADINDEX */ + SET_EXPECT(OnScriptError); hres = parse_script_ar("throwInt(&h8002000b&)"); ok(hres == MAKE_VBSERROR(9), "hres = %08x\n", hres); - + todo_wine CHECK_CALLED(OnScriptError); + + SET_EXPECT(OnScriptError); hres = parse_script_ar("throwInt(&h800a0009&)"); ok(hres == MAKE_VBSERROR(9), "hres = %08x\n", hres); + todo_wine CHECK_CALLED(OnScriptError); + + onerror_hres = S_OK; + SET_EXPECT(OnScriptError); + hres = parse_script_ar("throwInt(&h800a0009&)"); + todo_wine ok(hres == SCRIPT_E_REPORTED, "hres = %08x\n", hres); + todo_wine CHECK_CALLED(OnScriptError); /* E_NOTIMPL */ + SET_EXPECT(OnScriptError); hres = parse_script_ar("throwInt(&h80004001&)"); ok(hres == MAKE_VBSERROR(445), "hres = %08x\n", hres); + todo_wine CHECK_CALLED(OnScriptError); + + onerror_hres = S_OK; + SET_EXPECT(OnScriptError); + hres = parse_script_ar("throwInt(&h80004001&)"); + todo_wine ok(hres == SCRIPT_E_REPORTED, "hres = %08x\n", hres); + todo_wine CHECK_CALLED(OnScriptError); SET_EXPECT(global_testoptionalarg_i); parse_script_a("call testOptionalArg(1,,2)"); @@ -2262,8 +2295,10 @@ parse_script_a("x = y\n" "Call ok(getVT(x) = \"VT_EMPTY*\", \"getVT(x) = \" & getVT(x))\n" "Call ok(getVT(y) = \"VT_EMPTY*\", \"getVT(y) = \" & getVT(y))"); + SET_EXPECT(OnScriptError); hres = parse_script_ar("x = y(\"a\")"); ok(FAILED(hres), "script didn't fail\n"); + todo_wine CHECK_CALLED(OnScriptError); run_from_res("lang.vbs"); run_from_res("api.vbs"); Modified: trunk/rostests/winetests/vbscript/vbsregexp55.idl URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/vbscript/vbsreg…
============================================================================== --- trunk/rostests/winetests/vbscript/vbsregexp55.idl [iso-8859-1] (original) +++ trunk/rostests/winetests/vbscript/vbsregexp55.idl [iso-8859-1] Thu Nov 26 23:37:03 2015 @@ -16,6 +16,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#pragma makedep header + import "oaidl.idl"; #include "vbscript_defs.h"
8 years, 11 months
1
0
0
0
[akhaldi] 70139: [PSDK] Add missing SCRIPT_E_* definitions.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 26 23:36:41 2015 New Revision: 70139 URL:
http://svn.reactos.org/svn/reactos?rev=70139&view=rev
Log: [PSDK] Add missing SCRIPT_E_* definitions. Modified: trunk/reactos/include/psdk/activscp.idl Modified: trunk/reactos/include/psdk/activscp.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/activscp.idl?…
============================================================================== --- trunk/reactos/include/psdk/activscp.idl [iso-8859-1] (original) +++ trunk/reactos/include/psdk/activscp.idl [iso-8859-1] Thu Nov 26 23:36:41 2015 @@ -118,6 +118,10 @@ cpp_quote("#define SCRIPTSTAT_INTSTRUCTION_TIME 3") cpp_quote("#define SCRIPTSTAT_TOTAL_TIME 4") +cpp_quote("#define SCRIPT_E_RECORDED 0x86664004") +cpp_quote("#define SCRIPT_E_REPORTED 0x80020101") +cpp_quote("#define SCRIPT_E_PROPAGATE 0x80020102") + [ object, uuid(EAE1BA61-A4ED-11cf-8F20-00805F2CD064),
8 years, 11 months
1
0
0
0
[akhaldi] 70138: [SERVICES_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 26 23:33:27 2015 New Revision: 70138 URL:
http://svn.reactos.org/svn/reactos?rev=70138&view=rev
Log: [SERVICES_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536 Modified: trunk/rostests/winetests/services/service.c Modified: trunk/rostests/winetests/services/service.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/services/servic…
============================================================================== --- trunk/rostests/winetests/services/service.c [iso-8859-1] (original) +++ trunk/rostests/winetests/services/service.c [iso-8859-1] Thu Nov 26 23:33:27 2015 @@ -328,6 +328,7 @@ ok(res, "StartService failed: %u\n", GetLastError()); if(!res) { DeleteService(service_handle); + CloseServiceHandle(service_handle); return; } expect_event("RUNNING"); @@ -368,6 +369,7 @@ ok(res, "StartService failed: %u\n", GetLastError()); if(!res) { DeleteService(service_handle); + CloseServiceHandle(service_handle); return; } expect_event("RUNNING"); @@ -468,10 +470,14 @@ return; } + scm_handle = OpenSCManagerA(NULL, NULL, GENERIC_ALL); + ok(scm_handle != NULL || GetLastError() == ERROR_ACCESS_DENIED, "OpenSCManager failed: %u\n", GetLastError()); + if(!scm_handle) { + skip("OpenSCManager failed, skipping tests\n"); + return; + } + argc = winetest_get_mainargs(&argv); - - scm_handle = OpenSCManagerA(NULL, NULL, GENERIC_ALL); - ok(scm_handle != NULL, "OpenSCManager failed: %u\n", GetLastError()); if(argc < 3) { test_runner(test_service);
8 years, 11 months
1
0
0
0
[akhaldi] 70137: [SECUR32_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 26 23:32:19 2015 New Revision: 70137 URL:
http://svn.reactos.org/svn/reactos?rev=70137&view=rev
Log: [SECUR32_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536 Modified: trunk/rostests/winetests/secur32/negotiate.c trunk/rostests/winetests/secur32/schannel.c trunk/rostests/winetests/secur32/secur32.c Modified: trunk/rostests/winetests/secur32/negotiate.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/secur32/negotia…
============================================================================== --- trunk/rostests/winetests/secur32/negotiate.c [iso-8859-1] (original) +++ trunk/rostests/winetests/secur32/negotiate.c [iso-8859-1] Thu Nov 26 23:32:19 2015 @@ -262,6 +262,9 @@ SecPkgInfoA *pi; BOOL first = TRUE; + memset(&client, 0, sizeof(client)); + memset(&server, 0, sizeof(server)); + id.User = (unsigned char *)"user"; id.UserLength = strlen( "user" ); id.Domain = (unsigned char *)"domain"; @@ -342,17 +345,29 @@ cleanup_buffers( &client ); cleanup_buffers( &server ); - status_c = pDeleteSecurityContext( &client.ctxt ); - ok( status_c == SEC_E_OK, "DeleteSecurityContext returned %08x\n", status_c ); - - status_s = pDeleteSecurityContext( &server.ctxt ); - ok( status_s == SEC_E_OK, "DeleteSecurityContext returned %08x\n", status_s ); - - status_c = pFreeCredentialsHandle( &client.cred ); - ok( status_c == SEC_E_OK, "FreeCredentialsHandle returned %08x\n", status_c ); - - status_s = pFreeCredentialsHandle(&server.cred); - ok( status_s == SEC_E_OK, "FreeCredentialsHandle returned %08x\n", status_s ); + if (client.ctxt.dwLower || client.ctxt.dwUpper) + { + status_c = pDeleteSecurityContext( &client.ctxt ); + ok( status_c == SEC_E_OK, "DeleteSecurityContext returned %08x\n", status_c ); + } + + if (server.ctxt.dwLower || server.ctxt.dwUpper) + { + status_s = pDeleteSecurityContext( &server.ctxt ); + ok( status_s == SEC_E_OK, "DeleteSecurityContext returned %08x\n", status_s ); + } + + if (client.cred.dwLower || client.cred.dwUpper) + { + status_c = pFreeCredentialsHandle( &client.cred ); + ok( status_c == SEC_E_OK, "FreeCredentialsHandle returned %08x\n", status_c ); + } + + if (server.cred.dwLower || server.cred.dwUpper) + { + status_s = pFreeCredentialsHandle(&server.cred); + ok( status_s == SEC_E_OK, "FreeCredentialsHandle returned %08x\n", status_s ); + } } START_TEST(negotiate) Modified: trunk/rostests/winetests/secur32/schannel.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/secur32/schanne…
============================================================================== --- trunk/rostests/winetests/secur32/schannel.c [iso-8859-1] (original) +++ trunk/rostests/winetests/secur32/schannel.c [iso-8859-1] Thu Nov 26 23:32:19 2015 @@ -115,6 +115,8 @@ 0x0a, 0x8c, 0xb4, 0x5c, 0x34, 0x78, 0xe0, 0x3c, 0x9c, 0xe9, 0xf3, 0x30, 0x9f, 0xa8, 0x76, 0x57, 0x92, 0x36 }; +static CHAR unisp_name_a[] = UNISP_NAME_A; + static void InitFunctionPtrs(void) { HMODULE advapi32dll; @@ -154,6 +156,81 @@ #undef GET_PROC } +static const char *algid_to_str(ALG_ID alg) +{ + static char buf[12]; + switch(alg) { +#define X(x) case x: return #x + X(CALG_MD2); + X(CALG_MD4); + X(CALG_MD5); + X(CALG_SHA1); /* same as CALG_SHA */ + X(CALG_MAC); + X(CALG_RSA_SIGN); + X(CALG_DSS_SIGN); + X(CALG_NO_SIGN); + X(CALG_RSA_KEYX); + X(CALG_DES); + X(CALG_3DES_112); + X(CALG_3DES); + X(CALG_DESX); + X(CALG_RC2); + X(CALG_RC4); + X(CALG_SEAL); + X(CALG_DH_SF); + X(CALG_DH_EPHEM); + X(CALG_AGREEDKEY_ANY); + X(CALG_KEA_KEYX); + X(CALG_HUGHES_MD5); + X(CALG_SKIPJACK); + X(CALG_TEK); + X(CALG_CYLINK_MEK); + X(CALG_SSL3_SHAMD5); + X(CALG_SSL3_MASTER); + X(CALG_SCHANNEL_MASTER_HASH); + X(CALG_SCHANNEL_MAC_KEY); + X(CALG_SCHANNEL_ENC_KEY); + X(CALG_PCT1_MASTER); + X(CALG_SSL2_MASTER); + X(CALG_TLS1_MASTER); + X(CALG_RC5); + X(CALG_HMAC); + X(CALG_TLS1PRF); + X(CALG_HASH_REPLACE_OWF); + X(CALG_AES_128); + X(CALG_AES_192); + X(CALG_AES_256); + X(CALG_AES); + X(CALG_SHA_256); + X(CALG_SHA_384); + X(CALG_SHA_512); + X(CALG_ECDH); + X(CALG_ECMQV); + X(CALG_ECDSA); +#undef X + } + + sprintf(buf, "%x", alg); + return buf; +} + +static void init_cred(SCHANNEL_CRED *cred) +{ + cred->dwVersion = SCHANNEL_CRED_VERSION; + cred->cCreds = 0; + cred->paCred = 0; + cred->hRootStore = NULL; + cred->cMappers = 0; + cred->aphMappers = NULL; + cred->cSupportedAlgs = 0; + cred->palgSupportedAlgs = NULL; + cred->grbitEnabledProtocols = 0; + cred->dwMinimumCipherStrength = 0; + cred->dwMaximumCipherStrength = 0; + cred->dwSessionLifespan = 0; + cred->dwFlags = 0; +} + static void test_strength(PCredHandle handle) { SecPkgCred_CipherStrengths strength = {-1,-1}; @@ -189,6 +266,57 @@ if(protocols.grbitProtocol) trace("Unknown flags: %x\n", protocols.grbitProtocol); +} + +static void test_supported_algs(CredHandle *handle) +{ + SecPkgCred_SupportedAlgs algs; + SECURITY_STATUS status; + unsigned i; + + status = pQueryCredentialsAttributesA(handle, SECPKG_ATTR_SUPPORTED_ALGS, &algs); + todo_wine ok(status == SEC_E_OK, "QueryCredentialsAttributes failed: %08x\n", status); + if(status != SEC_E_OK) + return; + + trace("Supported algorithms (%d):\n", algs.cSupportedAlgs); + for(i=0; i < algs.cSupportedAlgs; i++) + trace(" %s\n", algid_to_str(algs.palgSupportedAlgs[i])); + + pFreeContextBuffer(algs.palgSupportedAlgs); +} + +static void test_cread_attrs(void) +{ + SCHANNEL_CRED schannel_cred; + SECURITY_STATUS status; + CredHandle cred; + + status = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, + NULL, NULL, NULL, NULL, &cred, NULL); + ok(status == SEC_E_OK, "AcquireCredentialsHandleA failed: %x\n", status); + + test_supported_protocols(&cred, 0); + test_supported_algs(&cred); + + status = pQueryCredentialsAttributesA(&cred, SECPKG_ATTR_SUPPORTED_PROTOCOLS, NULL); + ok(status == SEC_E_INTERNAL_ERROR, "QueryCredentialsAttributes failed: %08x, expected SEC_E_INTERNAL_ERROR\n", status); + + status = pQueryCredentialsAttributesA(&cred, SECPKG_ATTR_SUPPORTED_ALGS, NULL); + ok(status == SEC_E_INTERNAL_ERROR, "QueryCredentialsAttributes failed: %08x, expected SEC_E_INTERNAL_ERROR\n", status); + + pFreeCredentialsHandle(&cred); + + init_cred(&schannel_cred); + schannel_cred.grbitEnabledProtocols = SP_PROT_TLS1_CLIENT; + status = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, + NULL, &schannel_cred, NULL, NULL, &cred, NULL); + ok(status == SEC_E_OK, "AcquireCredentialsHandleA failed: %x\n", status); + + test_supported_protocols(&cred, SP_PROT_TLS1_CLIENT); + test_supported_algs(&cred); + + pFreeCredentialsHandle(&cred); } static void testAcquireSecurityContext(void) @@ -203,7 +331,6 @@ SCHANNEL_CRED schanCred; PCCERT_CONTEXT certs[2]; HCRYPTPROV csp; - static CHAR unisp_name_a[] = UNISP_NAME_A; WCHAR ms_def_prov_w[MAX_PATH]; BOOL ret; HCRYPTKEY key; @@ -287,13 +414,8 @@ st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, NULL, NULL, NULL, NULL, &cred, NULL); ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", st); - if(st == SEC_E_OK) { - st = pQueryCredentialsAttributesA(&cred, SECPKG_ATTR_SUPPORTED_PROTOCOLS, NULL); - ok(st == SEC_E_INTERNAL_ERROR, "QueryCredentialsAttributes failed: %08x, expected SEC_E_INTERNAL_ERROR\n", st); - - test_supported_protocols(&cred, 0); + if(st == SEC_E_OK) pFreeCredentialsHandle(&cred); - } memset(&cred, 0, sizeof(cred)); st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, NULL, NULL, NULL, NULL, &cred, &exp); @@ -524,23 +646,6 @@ static const char http_request[] = "HEAD /test.html HTTP/1.1\r\nHost:
www.winehq.org\r\nConnection
: close\r\n\r\n"; -static void init_cred(SCHANNEL_CRED *cred) -{ - cred->dwVersion = SCHANNEL_CRED_VERSION; - cred->cCreds = 0; - cred->paCred = 0; - cred->hRootStore = NULL; - cred->cMappers = 0; - cred->aphMappers = NULL; - cred->cSupportedAlgs = 0; - cred->palgSupportedAlgs = NULL; - cred->grbitEnabledProtocols = SP_PROT_TLS1_CLIENT; - cred->dwMinimumCipherStrength = 0; - cred->dwMaximumCipherStrength = 0; - cred->dwSessionLifespan = 0; - cred->dwFlags = 0; -} - static void init_buffers(SecBufferDesc *desc, unsigned count, unsigned size) { desc->ulVersion = SECBUFFER_VERSION; @@ -679,14 +784,13 @@ /* Create client credentials */ init_cred(&cred); + cred.grbitEnabledProtocols = SP_PROT_TLS1_CLIENT; cred.dwFlags = SCH_CRED_NO_DEFAULT_CREDS|SCH_CRED_MANUAL_CRED_VALIDATION; status = pAcquireCredentialsHandleA(NULL, (SEC_CHAR *)UNISP_NAME_A, SECPKG_CRED_OUTBOUND, NULL, &cred, NULL, NULL, &cred_handle, NULL); ok(status == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", status); if (status != SEC_E_OK) return; - - test_supported_protocols(&cred_handle, SP_PROT_TLS1_CLIENT); /* Initialize the connection */ init_buffers(&buffers[0], 4, buf_size); @@ -917,6 +1021,7 @@ { InitFunctionPtrs(); + test_cread_attrs(); testAcquireSecurityContext(); test_communication(); Modified: trunk/rostests/winetests/secur32/secur32.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/secur32/secur32…
============================================================================== --- trunk/rostests/winetests/secur32/secur32.c [iso-8859-1] (original) +++ trunk/rostests/winetests/secur32/secur32.c [iso-8859-1] Thu Nov 26 23:32:19 2015 @@ -30,6 +30,17 @@ static HMODULE secdll; +static SECURITY_STATUS (SEC_ENTRY *pSspiEncodeAuthIdentityAsStrings) + (PSEC_WINNT_AUTH_IDENTITY_OPAQUE, PCWSTR *, PCWSTR *, PCWSTR *); +static SECURITY_STATUS (SEC_ENTRY *pSspiEncodeStringsAsAuthIdentity) + (PCWSTR, PCWSTR, PCWSTR, PSEC_WINNT_AUTH_IDENTITY_OPAQUE *); +static void (SEC_ENTRY *pSspiFreeAuthIdentity) + (PSEC_WINNT_AUTH_IDENTITY_OPAQUE); +static void (SEC_ENTRY *pSspiLocalFree) + (void *); +static void (SEC_ENTRY *pSspiZeroAuthIdentity) + (PSEC_WINNT_AUTH_IDENTITY_OPAQUE); + static BOOLEAN (WINAPI * pGetComputerObjectNameA)(EXTENDED_NAME_FORMAT NameFormat, LPSTR lpNameBuffer, PULONG lpnSize); static BOOLEAN (WINAPI * pGetComputerObjectNameW)(EXTENDED_NAME_FORMAT NameFormat, LPWSTR lpNameBuffer, PULONG lpnSize); static BOOLEAN (WINAPI * pGetUserNameExA)(EXTENDED_NAME_FORMAT NameFormat, LPSTR lpNameBuffer, PULONG lpnSize); @@ -220,6 +231,90 @@ ok(sftW->Reserved4 == sftW->DecryptMessage, "Reserved4 should be equal to DecryptMessage in the security function table\n"); } +static void test_SspiEncodeStringsAsAuthIdentity(void) +{ + static const WCHAR username[] = {'u','s','e','r','n','a','m','e',0}; + static const WCHAR domainname[] = {'d','o','m','a','i','n','n','a','m','e',0}; + static const WCHAR password[] = {'p','a','s','s','w','o','r','d',0}; + const WCHAR *username_ptr, *domainname_ptr, *password_ptr; + PSEC_WINNT_AUTH_IDENTITY_OPAQUE id; + SECURITY_STATUS status; + + if (!pSspiEncodeStringsAsAuthIdentity) + { + win_skip( "SspiEncodeAuthIdentityAsStrings not exported by secur32.dll\n" ); + return; + } + + status = pSspiEncodeStringsAsAuthIdentity( NULL, NULL, NULL, NULL ); + ok( status == SEC_E_INVALID_TOKEN, "got %08x\n", status ); + + id = (PSEC_WINNT_AUTH_IDENTITY_OPAQUE)0xdeadbeef; + status = pSspiEncodeStringsAsAuthIdentity( NULL, NULL, NULL, &id ); + ok( status == SEC_E_INVALID_TOKEN, "got %08x\n", status ); + ok( id == (PSEC_WINNT_AUTH_IDENTITY_OPAQUE)0xdeadbeef, "id set\n" ); + + id = NULL; + status = pSspiEncodeStringsAsAuthIdentity( NULL, NULL, password, &id ); + ok( status == SEC_E_OK, "got %08x\n", status ); + ok( id != NULL, "id not set\n" ); + pSspiFreeAuthIdentity( id ); + + id = NULL; + status = pSspiEncodeStringsAsAuthIdentity( NULL, domainname, password, &id ); + ok( status == SEC_E_OK, "got %08x\n", status ); + ok( id != NULL, "id not set\n" ); + pSspiFreeAuthIdentity( id ); + + id = NULL; + status = pSspiEncodeStringsAsAuthIdentity( username, NULL, password, &id ); + ok( status == SEC_E_OK, "got %08x\n", status ); + ok( id != NULL, "id not set\n" ); + pSspiFreeAuthIdentity( id ); + + id = NULL; + status = pSspiEncodeStringsAsAuthIdentity( username, NULL, NULL, &id ); + ok( status == SEC_E_OK, "got %08x\n", status ); + ok( id != NULL, "id not set\n" ); + pSspiFreeAuthIdentity( id ); + + id = NULL; + status = pSspiEncodeStringsAsAuthIdentity( username, domainname, password, &id ); + ok( status == SEC_E_OK, "got %08x\n", status ); + ok( id != NULL, "id not set\n" ); + + username_ptr = domainname_ptr = password_ptr = NULL; + status = pSspiEncodeAuthIdentityAsStrings( id, &username_ptr, &domainname_ptr, &password_ptr ); + ok( status == SEC_E_OK, "got %08x\n", status ); + ok( !lstrcmpW( username, username_ptr ), "wrong username\n" ); + ok( !lstrcmpW( domainname, domainname_ptr ), "wrong domainname\n" ); + ok( !lstrcmpW( password, password_ptr ), "wrong password\n" ); + + pSspiZeroAuthIdentity( id ); + + pSspiLocalFree( (void *)username_ptr ); + pSspiLocalFree( (void *)domainname_ptr ); + pSspiLocalFree( (void *)password_ptr ); + pSspiFreeAuthIdentity( id ); + + id = NULL; + status = pSspiEncodeStringsAsAuthIdentity( username, NULL, password, &id ); + ok( status == SEC_E_OK, "got %08x\n", status ); + ok( id != NULL, "id not set\n" ); + + username_ptr = password_ptr = NULL; + domainname_ptr = (const WCHAR *)0xdeadbeef; + status = pSspiEncodeAuthIdentityAsStrings( id, &username_ptr, &domainname_ptr, &password_ptr ); + ok( status == SEC_E_OK, "got %08x\n", status ); + ok( !lstrcmpW( username, username_ptr ), "wrong username\n" ); + ok( domainname_ptr == NULL, "domainname_ptr not cleared\n" ); + ok( !lstrcmpW( password, password_ptr ), "wrong password\n" ); + + pSspiLocalFree( (void *)username_ptr ); + pSspiLocalFree( (void *)password_ptr ); + pSspiFreeAuthIdentity( id ); +} + START_TEST(secur32) { secdll = LoadLibraryA("secur32.dll"); @@ -229,6 +324,11 @@ if (secdll) { + pSspiEncodeAuthIdentityAsStrings = (void *)GetProcAddress(secdll, "SspiEncodeAuthIdentityAsStrings"); + pSspiEncodeStringsAsAuthIdentity = (void *)GetProcAddress(secdll, "SspiEncodeStringsAsAuthIdentity"); + pSspiFreeAuthIdentity = (void *)GetProcAddress(secdll, "SspiFreeAuthIdentity"); + pSspiLocalFree = (void *)GetProcAddress(secdll, "SspiLocalFree"); + pSspiZeroAuthIdentity = (void *)GetProcAddress(secdll, "SspiZeroAuthIdentity"); pGetComputerObjectNameA = (PVOID)GetProcAddress(secdll, "GetComputerObjectNameA"); pGetComputerObjectNameW = (PVOID)GetProcAddress(secdll, "GetComputerObjectNameW"); pGetUserNameExA = (PVOID)GetProcAddress(secdll, "GetUserNameExA"); @@ -257,6 +357,7 @@ win_skip("GetUserNameExW not exported by secur32.dll\n"); test_InitSecurityInterface(); + test_SspiEncodeStringsAsAuthIdentity(); FreeLibrary(secdll); }
8 years, 11 months
1
0
0
0
[akhaldi] 70136: [SCRRUN_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 26 23:30:32 2015 New Revision: 70136 URL:
http://svn.reactos.org/svn/reactos?rev=70136&view=rev
Log: [SCRRUN_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536 Modified: trunk/rostests/winetests/scrrun/dictionary.c Modified: trunk/rostests/winetests/scrrun/dictionary.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/scrrun/dictiona…
============================================================================== --- trunk/rostests/winetests/scrrun/dictionary.c [iso-8859-1] (original) +++ trunk/rostests/winetests/scrrun/dictionary.c [iso-8859-1] Thu Nov 26 23:30:32 2015 @@ -209,7 +209,7 @@ static ULONG WINAPI test_unk_AddRef(IUnknown *iface) { - ok(0, "unxpected\n"); + ok(0, "unexpected\n"); return 2; } @@ -218,13 +218,13 @@ return 1; } -static IUnknownVtbl test_unk_vtbl = { +static /* const */ IUnknownVtbl test_unk_vtbl = { test_unk_QI, test_unk_AddRef, test_unk_Release }; -static IUnknownVtbl test_unk_no_vtbl = { +static /* const */ IUnknownVtbl test_unk_no_vtbl = { test_unk_no_QI, test_unk_AddRef, test_unk_Release @@ -244,7 +244,7 @@ static ULONG WINAPI test_disp_AddRef(IDispatch *iface) { - ok(0, "unxpected\n"); + ok(0, "unexpected\n"); return 2; } @@ -279,7 +279,7 @@ return E_NOTIMPL; } -static IDispatchVtbl test_disp_vtbl = { +static /* const */ IDispatchVtbl test_disp_vtbl = { test_disp_QI, test_disp_AddRef, test_disp_Release,
8 years, 11 months
1
0
0
0
[akhaldi] 70135: [PSAPI_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Nov 26 23:29:19 2015 New Revision: 70135 URL:
http://svn.reactos.org/svn/reactos?rev=70135&view=rev
Log: [PSAPI_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536 Modified: trunk/rostests/winetests/psapi/CMakeLists.txt trunk/rostests/winetests/psapi/psapi_main.c Modified: trunk/rostests/winetests/psapi/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/psapi/CMakeList…
============================================================================== --- trunk/rostests/winetests/psapi/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/winetests/psapi/CMakeLists.txt [iso-8859-1] Thu Nov 26 23:29:19 2015 @@ -1,4 +1,5 @@ +add_definitions(-D__WINESRC__) add_executable(psapi_winetest psapi_main.c testlist.c) set_module_type(psapi_winetest win32cui) add_importlibs(psapi_winetest msvcrt kernel32) Modified: trunk/rostests/winetests/psapi/psapi_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/psapi/psapi_mai…
============================================================================== --- trunk/rostests/winetests/psapi/psapi_main.c [iso-8859-1] (original) +++ trunk/rostests/winetests/psapi/psapi_main.c [iso-8859-1] Thu Nov 26 23:29:19 2015 @@ -50,14 +50,16 @@ static BOOL (WINAPI *pGetModuleInformation)(HANDLE, HMODULE, LPMODULEINFO, DWORD); static DWORD (WINAPI *pGetMappedFileNameA)(HANDLE, LPVOID, LPSTR, DWORD); static DWORD (WINAPI *pGetMappedFileNameW)(HANDLE, LPVOID, LPWSTR, DWORD); +static BOOL (WINAPI *pGetPerformanceInfo)(PPERFORMANCE_INFORMATION, DWORD); static DWORD (WINAPI *pGetProcessImageFileNameA)(HANDLE, LPSTR, DWORD); static DWORD (WINAPI *pGetProcessImageFileNameW)(HANDLE, LPWSTR, DWORD); static BOOL (WINAPI *pGetProcessMemoryInfo)(HANDLE, PPROCESS_MEMORY_COUNTERS, DWORD); static BOOL (WINAPI *pGetWsChanges)(HANDLE, PPSAPI_WS_WATCH_INFORMATION, DWORD); static BOOL (WINAPI *pInitializeProcessForWsWatch)(HANDLE); static BOOL (WINAPI *pQueryWorkingSet)(HANDLE, PVOID, DWORD); +static NTSTATUS (WINAPI *pNtQuerySystemInformation)(SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG); static NTSTATUS (WINAPI *pNtQueryVirtualMemory)(HANDLE, LPCVOID, ULONG, PVOID, SIZE_T, SIZE_T *); - + static BOOL InitFunctionPtrs(HMODULE hpsapi) { PSAPI_GET_PROC(EmptyWorkingSet); @@ -74,10 +76,13 @@ PSAPI_GET_PROC(InitializeProcessForWsWatch); PSAPI_GET_PROC(QueryWorkingSet); /* GetProcessImageFileName is not exported on NT4 */ + pGetPerformanceInfo = + (void *)GetProcAddress(hpsapi, "GetPerformanceInfo"); pGetProcessImageFileNameA = (void *)GetProcAddress(hpsapi, "GetProcessImageFileNameA"); pGetProcessImageFileNameW = (void *)GetProcAddress(hpsapi, "GetProcessImageFileNameW"); + pNtQuerySystemInformation = (void *)GetProcAddress(GetModuleHandleA("ntdll.dll"), "NtQuerySystemInformation"); pNtQueryVirtualMemory = (void *)GetProcAddress(GetModuleHandleA("ntdll.dll"), "NtQueryVirtualMemory"); return TRUE; } @@ -126,6 +131,11 @@ SetLastError(0xdeadbeef); ret = pEnumProcessModules(hpQV, NULL, 0, &cbNeeded); ok(ret == 1, "failed with %d\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret = pEnumProcessModules(hpQV, NULL, sizeof(HMODULE), &cbNeeded); + ok(!ret, "succeeded\n"); + ok(GetLastError() == ERROR_NOACCESS, "expected error=ERROR_NOACCESS but got %d\n", GetLastError()); SetLastError(0xdeadbeef); ret = pEnumProcessModules(hpQV, &hMod, sizeof(HMODULE), &cbNeeded); @@ -134,23 +144,6 @@ ok(hMod == GetModuleHandleA(NULL), "hMod=%p GetModuleHandleA(NULL)=%p\n", hMod, GetModuleHandleA(NULL)); ok(cbNeeded % sizeof(hMod) == 0, "not a multiple of sizeof(HMODULE) cbNeeded=%d\n", cbNeeded); - /* Windows sometimes has a bunch of extra dlls, presumably brought in by - * aclayers.dll. - */ - if (cbNeeded < 4 * sizeof(HMODULE) || cbNeeded > 30 * sizeof(HMODULE)) - { - HMODULE hmods[100]; - int i; - ok(0, "cbNeeded=%d\n", cbNeeded); - - pEnumProcessModules(hpQV, hmods, sizeof(hmods), &cbNeeded); - for (i = 0 ; i < cbNeeded/sizeof(*hmods); i++) - { - char path[1024]; - GetModuleFileNameA(hmods[i], path, sizeof(path)); - trace("i=%d hmod=%p path=[%s]\n", i, hmods[i], path); - } - } } static void test_GetModuleInformation(void) @@ -180,6 +173,120 @@ ok(ret == 1, "failed with %d\n", GetLastError()); ok(info.lpBaseOfDll == hMod, "lpBaseOfDll=%p hMod=%p\n", info.lpBaseOfDll, hMod); } + +static BOOL check_with_margin(SIZE_T perf, SIZE_T sysperf, int margin) +{ + return (perf >= max(sysperf, margin) - margin && perf <= sysperf + margin); +} + +static void test_GetPerformanceInfo(void) +{ + PERFORMANCE_INFORMATION info; + NTSTATUS status; + DWORD size; + BOOL ret; + + SetLastError(0xdeadbeef); + ret = pGetPerformanceInfo(&info, sizeof(info)-1); + ok(!ret, "GetPerformanceInfo unexpectedly succeeded\n"); + ok(GetLastError() == ERROR_BAD_LENGTH, "expected error=ERROR_BAD_LENGTH but got %d\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret = pGetPerformanceInfo(&info, sizeof(info)); + ok(ret, "GetPerformanceInfo failed with %d\n", GetLastError()); + ok(info.cb == sizeof(PERFORMANCE_INFORMATION), "got %d\n", info.cb); + + if (!pNtQuerySystemInformation) + win_skip("NtQuerySystemInformation not found, skipping tests\n"); + else + { + char performance_buffer[sizeof(SYSTEM_PERFORMANCE_INFORMATION) + 16]; /* larger on w2k8/win7 */ + SYSTEM_PERFORMANCE_INFORMATION *sys_performance_info = (SYSTEM_PERFORMANCE_INFORMATION *)performance_buffer; + SYSTEM_PROCESS_INFORMATION *sys_process_info = NULL, *spi; + SYSTEM_BASIC_INFORMATION sys_basic_info; + DWORD process_count, handle_count, thread_count; + + /* compare with values from SYSTEM_PERFORMANCE_INFORMATION */ + size = 0; + status = pNtQuerySystemInformation(SystemPerformanceInformation, sys_performance_info, sizeof(performance_buffer), &size); + ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %08x\n", status); + ok(size >= sizeof(SYSTEM_PERFORMANCE_INFORMATION), "incorrect length %d\n", size); + + + ok(check_with_margin(info.CommitTotal, sys_performance_info->TotalCommittedPages, 288), + "expected approximately %ld but got %d\n", info.CommitTotal, sys_performance_info->TotalCommittedPages); + + ok(check_with_margin(info.CommitLimit, sys_performance_info->TotalCommitLimit, 32), + "expected approximately %ld but got %d\n", info.CommitLimit, sys_performance_info->TotalCommitLimit); + + ok(check_with_margin(info.CommitPeak, sys_performance_info->PeakCommitment, 32), + "expected approximately %ld but got %d\n", info.CommitPeak, sys_performance_info->PeakCommitment); + + ok(check_with_margin(info.PhysicalAvailable, sys_performance_info->AvailablePages, 128), + "expected approximately %ld but got %d\n", info.PhysicalAvailable, sys_performance_info->AvailablePages); + + /* TODO: info.SystemCache not checked yet - to which field(s) does this value correspond to? */ + + ok(check_with_margin(info.KernelTotal, sys_performance_info->PagedPoolUsage + sys_performance_info->NonPagedPoolUsage, 64), + "expected approximately %ld but got %d\n", info.KernelTotal, + sys_performance_info->PagedPoolUsage + sys_performance_info->NonPagedPoolUsage); + + ok(check_with_margin(info.KernelPaged, sys_performance_info->PagedPoolUsage, 64), + "expected approximately %ld but got %d\n", info.KernelPaged, sys_performance_info->PagedPoolUsage); + + ok(check_with_margin(info.KernelNonpaged, sys_performance_info->NonPagedPoolUsage, 8), + "expected approximately %ld but got %d\n", info.KernelNonpaged, sys_performance_info->NonPagedPoolUsage); + + /* compare with values from SYSTEM_BASIC_INFORMATION */ + size = 0; + status = pNtQuerySystemInformation(SystemBasicInformation, &sys_basic_info, sizeof(sys_basic_info), &size); + ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %08x\n", status); + ok(size >= sizeof(SYSTEM_BASIC_INFORMATION), "incorrect length %d\n", size); + + ok(info.PhysicalTotal == sys_basic_info.MmNumberOfPhysicalPages, + "expected info.PhysicalTotal=%u but got %u\n", + sys_basic_info.MmNumberOfPhysicalPages, (ULONG)info.PhysicalTotal); + + ok(info.PageSize == sys_basic_info.PageSize, + "expected info.PageSize=%u but got %u\n", + sys_basic_info.PageSize, (ULONG)info.PageSize); + + /* compare with values from SYSTEM_PROCESS_INFORMATION */ + size = 0; + status = pNtQuerySystemInformation(SystemProcessInformation, NULL, 0, &size); + ok(status == STATUS_INFO_LENGTH_MISMATCH, "expected STATUS_LENGTH_MISMATCH, got %08x\n", status); + ok(size > 0, "incorrect length %d\n", size); + while (status == STATUS_INFO_LENGTH_MISMATCH) + { + sys_process_info = HeapAlloc(GetProcessHeap(), 0, size); + ok(sys_process_info != NULL, "failed to allocate memory\n"); + status = pNtQuerySystemInformation(SystemProcessInformation, sys_process_info, size, &size); + if (status == STATUS_SUCCESS) break; + HeapFree(GetProcessHeap(), 0, sys_process_info); + } + ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %08x\n", status); + + process_count = handle_count = thread_count = 0; + for (spi = sys_process_info;; spi = (SYSTEM_PROCESS_INFORMATION *)(((char *)spi) + spi->NextEntryOffset)) + { + process_count++; + handle_count += spi->HandleCount; + thread_count += spi->dwThreadCount; + if (spi->NextEntryOffset == 0) break; + } + HeapFree(GetProcessHeap(), 0, sys_process_info); + + ok(check_with_margin(info.HandleCount, handle_count, 24), + "expected approximately %d but got %d\n", info.HandleCount, handle_count); + + ok(check_with_margin(info.ProcessCount, process_count, 4), + "expected approximately %d but got %d\n", info.ProcessCount, process_count); + + ok(check_with_margin(info.ThreadCount, thread_count, 4), + "expected approximately %d but got %d\n", info.ThreadCount, thread_count); + } +} + static void test_GetProcessMemoryInfo(void) { @@ -514,30 +621,36 @@ SetLastError(0xdeadbeef); memset( szModExPath, 0xcc, sizeof(szModExPath) ); ret = pGetModuleFileNameExA(hpQV, NULL, szModExPath, 4 ); - ok( ret == 4, "wrong length %u\n", ret ); + ok( ret == 4 || ret == strlen(szModExPath), "wrong length %u\n", ret ); ok( broken(szModExPath[3]) /*w2kpro*/ || strlen(szModExPath) == 3, "szModExPath=\"%s\" ret=%d\n", szModExPath, ret ); ok(GetLastError() == 0xdeadbeef, "got error %d\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pGetModuleFileNameExA(hpQV, NULL, szModExPath, 0 ); - ok( ret == 0, "wrong length %u\n", ret ); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %d\n", GetLastError()); + if (0) /* crashes on Windows 10 */ + { + SetLastError(0xdeadbeef); + ret = pGetModuleFileNameExA(hpQV, NULL, szModExPath, 0 ); + ok( ret == 0, "wrong length %u\n", ret ); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %d\n", GetLastError()); + } SetLastError(0xdeadbeef); memset( buffer, 0xcc, sizeof(buffer) ); ret = pGetModuleFileNameExW(hpQV, NULL, buffer, 4 ); - ok( ret == 4, "wrong length %u\n", ret ); + ok( ret == 4 || ret == lstrlenW(buffer), "wrong length %u\n", ret ); ok( broken(buffer[3]) /*w2kpro*/ || lstrlenW(buffer) == 3, "buffer=%s ret=%d\n", wine_dbgstr_w(buffer), ret ); ok(GetLastError() == 0xdeadbeef, "got error %d\n", GetLastError()); - SetLastError(0xdeadbeef); - buffer[0] = 0xcc; - ret = pGetModuleFileNameExW(hpQV, NULL, buffer, 0 ); - ok( ret == 0, "wrong length %u\n", ret ); - ok(GetLastError() == 0xdeadbeef, "got error %d\n", GetLastError()); - ok( buffer[0] == 0xcc, "buffer modified %s\n", wine_dbgstr_w(buffer) ); + if (0) /* crashes on Windows 10 */ + { + SetLastError(0xdeadbeef); + buffer[0] = 0xcc; + ret = pGetModuleFileNameExW(hpQV, NULL, buffer, 0 ); + ok( ret == 0, "wrong length %u\n", ret ); + ok(GetLastError() == 0xdeadbeef, "got error %d\n", GetLastError()); + ok( buffer[0] == 0xcc, "buffer modified %s\n", wine_dbgstr_w(buffer) ); + } } static void test_GetModuleBaseName(void) @@ -674,6 +787,7 @@ test_EnumProcesses(); test_EnumProcessModules(); test_GetModuleInformation(); + test_GetPerformanceInfo(); test_GetProcessMemoryInfo(); test_GetMappedFileName(); test_GetProcessImageFileName();
8 years, 11 months
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
46
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
Results per page:
10
25
50
100
200