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
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
List overview
Download
Ros-diffs
September 2016
----- 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
ros-diffs@reactos.org
18 participants
342 discussions
Start a n
N
ew thread
[akhaldi] 72850: [RTL] Demote this print as we'll be notified when failure occurs.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Sep 29 10:00:07 2016 New Revision: 72850 URL:
http://svn.reactos.org/svn/reactos?rev=72850&view=rev
Log: [RTL] Demote this print as we'll be notified when failure occurs. Modified: trunk/reactos/sdk/lib/rtl/heappage.c Modified: trunk/reactos/sdk/lib/rtl/heappage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/rtl/heappage.c?rev…
============================================================================== --- trunk/reactos/sdk/lib/rtl/heappage.c [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/rtl/heappage.c [iso-8859-1] Thu Sep 29 10:00:07 2016 @@ -358,7 +358,7 @@ /* Free the memory */ Status = RtlpSecMemFreeVirtualMemory(NtCurrentProcess(), &Base, &Size, Type); - DPRINT1("Page heap: FreeVm (%p, %Ix, %x) status %x \n", Base, Size, Type, Status); + DPRINT("Page heap: FreeVm (%p, %Ix, %x) status %x \n", Base, Size, Type, Status); /* Log/report failures */ if (!NT_SUCCESS(Status)) {
8 years, 2 months
1
0
0
0
[akhaldi] 72849: [KERNEL32_APITEST] Add tests that reveal how the GetComputerNameEx fix in r72722 was not proper. By Peter Hater. ROSTESTS-243
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Sep 29 09:44:57 2016 New Revision: 72849 URL:
http://svn.reactos.org/svn/reactos?rev=72849&view=rev
Log: [KERNEL32_APITEST] Add tests that reveal how the GetComputerNameEx fix in r72722 was not proper. By Peter Hater. ROSTESTS-243 Modified: trunk/rostests/apitests/kernel32/CMakeLists.txt trunk/rostests/apitests/kernel32/GetComputerNameEx.c Modified: trunk/rostests/apitests/kernel32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/kernel32/CMakeLi…
============================================================================== --- trunk/rostests/apitests/kernel32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/apitests/kernel32/CMakeLists.txt [iso-8859-1] Thu Sep 29 09:44:57 2016 @@ -21,5 +21,5 @@ add_executable(kernel32_apitest ${SOURCE}) target_link_libraries(kernel32_apitest wine ${PSEH_LIB}) set_module_type(kernel32_apitest win32cui) -add_importlibs(kernel32_apitest gdi32 user32 shlwapi msvcrt kernel32 ntdll) +add_importlibs(kernel32_apitest advapi32 gdi32 user32 shlwapi msvcrt kernel32 ntdll) add_cd_file(TARGET kernel32_apitest DESTINATION reactos/bin FOR all) Modified: trunk/rostests/apitests/kernel32/GetComputerNameEx.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/kernel32/GetComp…
============================================================================== --- trunk/rostests/apitests/kernel32/GetComputerNameEx.c [iso-8859-1] (original) +++ trunk/rostests/apitests/kernel32/GetComputerNameEx.c [iso-8859-1] Thu Sep 29 09:44:57 2016 @@ -10,6 +10,7 @@ #define WIN32_NO_STATUS #include <stdio.h> #include <ndk/rtltypes.h> +#include <winreg.h> static VOID @@ -179,6 +180,339 @@ } } +static +LSTATUS +ReadRegistryValue(PCHAR ValueName, PCHAR Value) +{ + INT ErrorCode; + HKEY ParametersKey; + DWORD RegType; + DWORD RegSize = 0; + + /* Open the database path key */ + ErrorCode = RegOpenKeyExA(HKEY_LOCAL_MACHINE, + "System\\CurrentControlSet\\Services\\Tcpip\\Parameters", + 0, + KEY_READ, + &ParametersKey); + if (ErrorCode == NO_ERROR) + { + /* Read the actual path */ + ErrorCode = RegQueryValueExA(ParametersKey, + ValueName, + NULL, + &RegType, + NULL, + &RegSize); + if (RegSize) + { + /* Read the actual path */ + ErrorCode = RegQueryValueExA(ParametersKey, + ValueName, + NULL, + &RegType, + (LPBYTE)Value, + &RegSize); + } + + /* Close the key */ + RegCloseKey(ParametersKey); + } + return ErrorCode; +} + +static +LSTATUS +ReadRegistryComputerNameValue(PCHAR ValueName, PCHAR Value) +{ + INT ErrorCode; + HKEY ParametersKey; + DWORD RegType; + DWORD RegSize = 0; + + /* Open the database path key */ + ErrorCode = RegOpenKeyExA(HKEY_LOCAL_MACHINE, + "System\\CurrentControlSet\\Control\\ComputerName\\ActiveComputerName", + 0, + KEY_READ, + &ParametersKey); + if (ErrorCode == NO_ERROR) + { + /* Read the actual path */ + ErrorCode = RegQueryValueExA(ParametersKey, + ValueName, + NULL, + &RegType, + NULL, + &RegSize); + if (RegSize) + { + /* Read the actual path */ + ErrorCode = RegQueryValueExA(ParametersKey, + ValueName, + NULL, + &RegType, + (LPBYTE)Value, + &RegSize); + } + + /* Close the key */ + RegCloseKey(ParametersKey); + } + return ErrorCode; +} + +static +LSTATUS +WriteRegistryValue(PCHAR ValueName, PCHAR Value) +{ + INT ErrorCode; + HKEY ParametersKey; + + /* Open the database path key */ + ErrorCode = RegOpenKeyExA(HKEY_LOCAL_MACHINE, + "System\\CurrentControlSet\\Services\\Tcpip\\Parameters", + 0, + KEY_WRITE, + &ParametersKey); + if (ErrorCode == NO_ERROR) + { + /* Read the actual path */ + ErrorCode = RegSetValueExA(ParametersKey, + ValueName, + 0, + REG_SZ, + (LPBYTE)Value, + strlen(Value) + 1); + + /* Close the key */ + RegCloseKey(ParametersKey); + } + return ErrorCode; +} + +static +LSTATUS +DeleteRegistryValue(PCHAR ValueName) +{ + INT ErrorCode; + HKEY ParametersKey; + + /* Open the database path key */ + ErrorCode = RegOpenKeyExA(HKEY_LOCAL_MACHINE, + "System\\CurrentControlSet\\Services\\Tcpip\\Parameters", + 0, + KEY_WRITE, + &ParametersKey); + if (ErrorCode == NO_ERROR) + { + /* Read the actual path */ + ErrorCode = RegDeleteValueA(ParametersKey, ValueName); + + /* Close the key */ + RegCloseKey(ParametersKey); + } + return ErrorCode; +} + +/* If this test crashes it might end up with wrong host and/or domain name in registry! */ +static +VOID +TestReturnValues() +{ + CHAR OrigNetBIOS[128]; + CHAR OrigHostname[128]; + CHAR OrigDomainName[128]; + CHAR OrigDhcpHostname[128]; + CHAR OrigDhcpDomainName[128]; + BOOL OrigNetBIOSExists; + BOOL OrigHostnameExists; + BOOL OrigDomainNameExists; + BOOL OrigDhcpHostnameExists; + BOOL OrigDhcpDomainNameExists; + CHAR ComputerName[128]; + DWORD ComputerNameSize = 0; + INT ErrorCode; + + memset(OrigNetBIOS, 0, sizeof(OrigNetBIOS)); + memset(OrigHostname, 0, sizeof(OrigHostname)); + memset(OrigDomainName, 0, sizeof(OrigDomainName)); + memset(OrigDhcpHostname, 0, sizeof(OrigDhcpHostname)); + memset(OrigDhcpDomainName, 0, sizeof(OrigDhcpDomainName)); + /* read current registry values */ + ErrorCode = ReadRegistryComputerNameValue("ComputerName", OrigNetBIOS); + ok(ErrorCode == ERROR_SUCCESS, "Failed to read registry key ComputerName %d\n", ErrorCode); + OrigNetBIOSExists = ErrorCode == STATUS_SUCCESS; + ErrorCode = ReadRegistryValue("Hostname", OrigHostname); + ok(ErrorCode == ERROR_SUCCESS, "Failed to read registry key Hostname %d\n", ErrorCode); + OrigHostnameExists = ErrorCode == STATUS_SUCCESS; + ErrorCode = ReadRegistryValue("Domain", OrigDomainName); + ok(ErrorCode == ERROR_SUCCESS || ErrorCode == ERROR_FILE_NOT_FOUND, "Failed to read registry key DomainName %d\n", ErrorCode); + OrigDomainNameExists = ErrorCode == STATUS_SUCCESS; + ErrorCode = ReadRegistryValue("DhcpHostname", OrigDhcpHostname); + ok(ErrorCode == ERROR_SUCCESS || ErrorCode == ERROR_FILE_NOT_FOUND, "Failed to read registry key DhcpHostname %d\n", ErrorCode); + OrigDhcpHostnameExists = ErrorCode == STATUS_SUCCESS; + ErrorCode = ReadRegistryValue("DhcpDomain", OrigDhcpDomainName); + ok(ErrorCode == ERROR_SUCCESS || ErrorCode == ERROR_FILE_NOT_FOUND, "Failed to read registry key DhcpDomainName %d\n", ErrorCode); + OrigDhcpDomainNameExists = ErrorCode == STATUS_SUCCESS; + + trace("Starting values:\n"); + trace("NetBIOS: %s, exists %s\n", OrigNetBIOS, OrigNetBIOSExists ? "yes" : "no"); + trace("Hostname: %s, exists %s\n", OrigHostname, OrigHostnameExists ? "yes" : "no"); + trace("Domain: %s, exists %s\n", OrigDomainName, OrigDomainNameExists ? "yes" : "no"); + trace("DhcpHostname: %s, exists %s\n", OrigDhcpHostnameExists ? OrigDhcpHostname : "", OrigDhcpHostnameExists ? "yes" : "no"); + trace("DhcpDomain: %s, exists %s\n", OrigDhcpDomainNameExists ? OrigDhcpDomainName : "", OrigDhcpDomainNameExists ? "yes" : "no"); + + /* ComputerNamePhysicalNetBIOS */ + ComputerNameSize = 0; + StartSeh() + GetComputerNameExA(ComputerNamePhysicalNetBIOS, ComputerName, &ComputerNameSize); + if (ComputerNameSize) + ok(GetComputerNameExA(ComputerNamePhysicalNetBIOS, ComputerName, &ComputerNameSize), "GetComputerNameExA(ComputerNamePhysicalNetBIOS) failed with %ld\n", GetLastError()); + else + memset(ComputerName, 0, sizeof(ComputerName)); + ok(strcmp(ComputerName, OrigNetBIOS) == 0, "ComputerNamePhysicalNetBIOS doesn't match registry value '%s' != '%s'\n", ComputerName, OrigNetBIOS); + EndSeh(STATUS_SUCCESS); + + /* ComputerNamePhysicalDnsHostname */ + ComputerNameSize = 0; + StartSeh() + GetComputerNameExA(ComputerNamePhysicalDnsHostname, ComputerName, &ComputerNameSize); + if (ComputerNameSize) + ok(GetComputerNameExA(ComputerNamePhysicalDnsHostname, ComputerName, &ComputerNameSize), "GetComputerNameExA(ComputerNamePhysicalDnsHostname) failed with %ld\n", GetLastError()); + else + memset(ComputerName, 0, sizeof(ComputerName)); + ok(strcmp(ComputerName, OrigHostname) == 0, "ComputerNamePhysicalDnsHostname doesn't match registry value '%s' != '%s'\n", ComputerName, OrigHostname); + EndSeh(STATUS_SUCCESS); + + /* ComputerNamePhysicalDnsDomain */ + ComputerNameSize = 0; + StartSeh() + GetComputerNameExA(ComputerNamePhysicalDnsDomain, ComputerName, &ComputerNameSize); + if (ComputerNameSize) + ok(GetComputerNameExA(ComputerNamePhysicalDnsDomain, ComputerName, &ComputerNameSize), "GetComputerNameExA(ComputerNamePhysicalDnsDomain) failed with %ld\n", GetLastError()); + else + memset(ComputerName, 0, sizeof(ComputerName)); + ok(strcmp(ComputerName, OrigDomainName) == 0, "ComputerNamePhysicalDnsDomain doesn't match registry value '%s' != '%s'\n", ComputerName, OrigDomainName); + EndSeh(STATUS_SUCCESS); + ComputerNameSize = 0; + + /* ComputerNameNetBIOS */ + StartSeh() + GetComputerNameExA(ComputerNameNetBIOS, ComputerName, &ComputerNameSize); + if (ComputerNameSize) + ok(GetComputerNameExA(ComputerNameNetBIOS, ComputerName, &ComputerNameSize), "GetComputerNameExA(ComputerNameNetBIOS) failed with %ld\n", GetLastError()); + else + memset(ComputerName, 0, sizeof(ComputerName)); + ok(strcmp(ComputerName, OrigNetBIOS) == 0, "ComputerNameNetBIOS doesn't match registry value '%s' != '%s'\n", ComputerName, OrigNetBIOS); + EndSeh(STATUS_SUCCESS); + + /* ComputerNameDnsHostname */ + ComputerNameSize = 0; + StartSeh() + GetComputerNameExA(ComputerNameDnsHostname, ComputerName, &ComputerNameSize); + if (ComputerNameSize) + ok(GetComputerNameExA(ComputerNameDnsHostname, ComputerName, &ComputerNameSize), "GetComputerNameExA(ComputerNameDnsHostname) failed with %ld\n", GetLastError()); + else + memset(ComputerName, 0, sizeof(ComputerName)); + ok(strcmp(ComputerName, OrigHostname) == 0, "ComputerNameDnsHostname doesn't match registry value '%s' != '%s'\n", ComputerName, OrigHostname); + EndSeh(STATUS_SUCCESS); + + /* ComputerNameDnsDomain */ + ComputerNameSize = 0; + StartSeh() + GetComputerNameExA(ComputerNameDnsDomain, ComputerName, &ComputerNameSize); + if (ComputerNameSize) + ok(GetComputerNameExA(ComputerNameDnsDomain, ComputerName, &ComputerNameSize), "GetComputerNameExA(ComputerNameDnsDomain) failed with %ld\n", GetLastError()); + else + memset(ComputerName, 0, sizeof(ComputerName)); + ok(strcmp(ComputerName, OrigDomainName) == 0, "ComputerNameDnsDomain doesn't match registry value '%s' != '%s'\n", ComputerName, OrigDomainName); + EndSeh(STATUS_SUCCESS); + + ErrorCode = WriteRegistryValue("DhcpHostname", "testdhcproshost"); + ok(ErrorCode == ERROR_SUCCESS, "Failed to write registry key DhcpHostname %d\n", ErrorCode); + ErrorCode = WriteRegistryValue("DhcpDomain", "testrosdomain"); + ok(ErrorCode == ERROR_SUCCESS, "Failed to write registry key DhcpDomainName %d\n", ErrorCode); + + /* ComputerNamePhysicalNetBIOS */ + ComputerNameSize = 0; + StartSeh() + GetComputerNameExA(ComputerNamePhysicalNetBIOS, ComputerName, &ComputerNameSize); + if (ComputerNameSize) + ok(GetComputerNameExA(ComputerNamePhysicalNetBIOS, ComputerName, &ComputerNameSize), "GetComputerNameExA(ComputerNamePhysicalNetBIOS) failed with %ld\n", GetLastError()); + else + memset(ComputerName, 0, sizeof(ComputerName)); + ok(strcmp(ComputerName, OrigNetBIOS) == 0, "ComputerNamePhysicalNetBIOS doesn't match registry value '%s' != '%s'\n", ComputerName, OrigNetBIOS); + EndSeh(STATUS_SUCCESS); + + /* ComputerNamePhysicalDnsHostname */ + ComputerNameSize = 0; + StartSeh() + GetComputerNameExA(ComputerNamePhysicalDnsHostname, ComputerName, &ComputerNameSize); + if (ComputerNameSize) + ok(GetComputerNameExA(ComputerNamePhysicalDnsHostname, ComputerName, &ComputerNameSize), "GetComputerNameExA(ComputerNamePhysicalDnsHostname) failed with %ld\n", GetLastError()); + else + memset(ComputerName, 0, sizeof(ComputerName)); + ok(strcmp(ComputerName, OrigHostname) == 0, "ComputerNamePhysicalDnsHostname doesn't match registry value '%s' != '%s'\n", ComputerName, OrigHostname); + EndSeh(STATUS_SUCCESS); + + /* ComputerNamePhysicalDnsDomain */ + ComputerNameSize = 0; + StartSeh() + GetComputerNameExA(ComputerNamePhysicalDnsDomain, ComputerName, &ComputerNameSize); + if (ComputerNameSize) + ok(GetComputerNameExA(ComputerNamePhysicalDnsDomain, ComputerName, &ComputerNameSize), "GetComputerNameExA(ComputerNamePhysicalDnsDomain) failed with %ld\n", GetLastError()); + else + memset(ComputerName, 0, sizeof(ComputerName)); + ok(strcmp(ComputerName, OrigDomainName) == 0, "ComputerNamePhysicalDnsDomain doesn't match registry value '%s' != '%s'\n", ComputerName, OrigDomainName); + EndSeh(STATUS_SUCCESS); + ComputerNameSize = 0; + + /* ComputerNameNetBIOS */ + StartSeh() + GetComputerNameExA(ComputerNameNetBIOS, ComputerName, &ComputerNameSize); + if (ComputerNameSize) + ok(GetComputerNameExA(ComputerNameNetBIOS, ComputerName, &ComputerNameSize), "GetComputerNameExA(ComputerNameNetBIOS) failed with %ld\n", GetLastError()); + else + memset(ComputerName, 0, sizeof(ComputerName)); + ok(strcmp(ComputerName, OrigNetBIOS) == 0, "ComputerNameNetBIOS doesn't match registry value '%s' != '%s'\n", ComputerName, OrigNetBIOS); + EndSeh(STATUS_SUCCESS); + + /* ComputerNameDnsHostname */ + ComputerNameSize = 0; + StartSeh() + GetComputerNameExA(ComputerNameDnsHostname, ComputerName, &ComputerNameSize); + if (ComputerNameSize) + ok(GetComputerNameExA(ComputerNameDnsHostname, ComputerName, &ComputerNameSize), "GetComputerNameExA(ComputerNameDnsHostname) failed with %ld\n", GetLastError()); + else + memset(ComputerName, 0, sizeof(ComputerName)); + ok(strcmp(ComputerName, OrigHostname) == 0, "ComputerNameDnsHostname doesn't match registry value '%s' != '%s'\n", ComputerName, OrigHostname); + EndSeh(STATUS_SUCCESS); + + /* ComputerNameDnsDomain */ + ComputerNameSize = 0; + StartSeh() + GetComputerNameExA(ComputerNameDnsDomain, ComputerName, &ComputerNameSize); + if (ComputerNameSize) + ok(GetComputerNameExA(ComputerNameDnsDomain, ComputerName, &ComputerNameSize), "GetComputerNameExA(ComputerNameDnsDomain) failed with %ld\n", GetLastError()); + else + memset(ComputerName, 0, sizeof(ComputerName)); + ok(strcmp(ComputerName, OrigDomainName) == 0, "ComputerNameDnsDomain doesn't match registry value '%s' != '%s'\n", ComputerName, OrigDomainName); + EndSeh(STATUS_SUCCESS); + + /* restore registry values */ + if (OrigDhcpHostnameExists) + ErrorCode = WriteRegistryValue("DhcpHostname", OrigDhcpHostname); + else + ErrorCode = DeleteRegistryValue("DhcpHostname"); + ok(ErrorCode == ERROR_SUCCESS, "Failed to restore registry key DhcpHostname %d\n", ErrorCode); + if (OrigDhcpDomainNameExists) + ErrorCode = WriteRegistryValue("DhcpDomain", OrigDhcpDomainName); + else + ErrorCode = DeleteRegistryValue("DhcpDomain"); + ok(ErrorCode == ERROR_SUCCESS, "Failed to restore registry key DhcpDomainName %d\n", ErrorCode); +} + START_TEST(GetComputerNameEx) { TestGetComputerNameEx(ComputerNameNetBIOS); @@ -189,4 +523,5 @@ TestGetComputerNameEx(ComputerNamePhysicalDnsHostname); TestGetComputerNameEx(ComputerNamePhysicalDnsDomain); //TestGetComputerNameEx(ComputerNamePhysicalDnsFullyQualified); -} + TestReturnValues(); +}
8 years, 2 months
1
0
0
0
[tfaber] 72848: [RAPPS] - Avoid an unintended fall-through and document and intended one in DownloadProgressProc. CID 1341273 (rapps), 1363531 (rapps_new)
by tfaber@svn.reactos.org
Author: tfaber Date: Thu Sep 29 09:36:33 2016 New Revision: 72848 URL:
http://svn.reactos.org/svn/reactos?rev=72848&view=rev
Log: [RAPPS] - Avoid an unintended fall-through and document and intended one in DownloadProgressProc. CID 1341273 (rapps), 1363531 (rapps_new) Modified: trunk/reactos/base/applications/rapps/loaddlg.c trunk/reactos/base/applications/rapps_new/loaddlg.cpp Modified: trunk/reactos/base/applications/rapps/loaddlg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/lo…
============================================================================== --- trunk/reactos/base/applications/rapps/loaddlg.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/rapps/loaddlg.c [iso-8859-1] Thu Sep 29 09:36:33 2016 @@ -556,6 +556,7 @@ sizeof(szProgressText), (PCWSTR)lParam); } + return TRUE; } case WM_ERASEBKGND: @@ -611,7 +612,7 @@ ZeroMemory(szProgressText, sizeof(szProgressText)); RemoveWindowSubclass(hWnd, DownloadProgressProc, uIdSubclass); } - + /* Fall-through */ default: return DefSubclassProc(hWnd, uMsg, wParam, lParam); } Modified: trunk/reactos/base/applications/rapps_new/loaddlg.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps_ne…
============================================================================== --- trunk/reactos/base/applications/rapps_new/loaddlg.cpp [iso-8859-1] (original) +++ trunk/reactos/base/applications/rapps_new/loaddlg.cpp [iso-8859-1] Thu Sep 29 09:36:33 2016 @@ -508,6 +508,7 @@ sizeof(szProgressText), (PCWSTR)lParam); } + return TRUE; } case WM_ERASEBKGND: @@ -563,7 +564,7 @@ ZeroMemory(szProgressText, sizeof(szProgressText)); RemoveWindowSubclass(hWnd, DownloadProgressProc, uIdSubclass); } - + /* Fall-through */ default: return DefSubclassProc(hWnd, uMsg, wParam, lParam); }
8 years, 2 months
1
0
0
0
[tfaber] 72847: [WIN32K:NTUSER] - Add missing break in DefWndStartSizeMove. CID 513489 CORE-12064 #resolve
by tfaber@svn.reactos.org
Author: tfaber Date: Thu Sep 29 08:23:26 2016 New Revision: 72847 URL:
http://svn.reactos.org/svn/reactos?rev=72847&view=rev
Log: [WIN32K:NTUSER] - Add missing break in DefWndStartSizeMove. CID 513489 CORE-12064 #resolve Modified: trunk/reactos/win32ss/user/ntuser/nonclient.c Modified: trunk/reactos/win32ss/user/ntuser/nonclient.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/noncli…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/nonclient.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/nonclient.c [iso-8859-1] Thu Sep 29 08:23:26 2016 @@ -214,6 +214,7 @@ case VK_ESCAPE: return 0; } + break; default: IntTranslateKbdMessage( &msg, 0 ); pti->TIF_flags |= TIF_MOVESIZETRACKING;
8 years, 2 months
1
0
0
0
[hbelusca] 72846: [REACTOS]: Do not gather all the generated message resource files in the same directory (sdk/include/reactos/), so that to avoid potential file collisions, but instead place them ...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Wed Sep 28 23:20:20 2016 New Revision: 72846 URL:
http://svn.reactos.org/svn/reactos?rev=72846&view=rev
Log: [REACTOS]: Do not gather all the generated message resource files in the same directory (sdk/include/reactos/), so that to avoid potential file collisions, but instead place them into their respective per-target directories. CORE-12062 #resolve [RAPPS_NEW]: Fix rapps_new message header & resource files inclusion. [ROSTESTS]: Adjust the CMakeLists files in accordance. Added: trunk/reactos/dll/win32/netevent/netevent.rc - copied unchanged from r72845, trunk/reactos/dll/win32/netevent/netevt.rc Removed: trunk/reactos/dll/win32/netevent/netevt.rc Modified: trunk/reactos/CMakeLists.txt trunk/reactos/base/applications/rapps_new/rapps.h trunk/reactos/base/applications/rapps_new/rapps.rc trunk/reactos/dll/win32/iologmsg/CMakeLists.txt trunk/reactos/dll/win32/netevent/CMakeLists.txt trunk/reactos/sdk/cmake/CMakeMacros.cmake trunk/reactos/sdk/cmake/gcc.cmake trunk/reactos/sdk/cmake/msvc.cmake trunk/rostests/rosautotest/CMakeLists.txt trunk/rostests/win32/advapi32/eventlog/CMakeLists.txt Modified: trunk/reactos/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/CMakeLists.txt?rev=72846&r…
============================================================================== --- trunk/reactos/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/CMakeLists.txt [iso-8859-1] Wed Sep 28 23:20:20 2016 @@ -235,6 +235,7 @@ ${REACTOS_BINARY_DIR}/sdk/include/dxsdk ${REACTOS_BINARY_DIR}/sdk/include/ddk ${REACTOS_BINARY_DIR}/sdk/include/reactos + ${REACTOS_BINARY_DIR}/sdk/include/reactos/mc sdk/include/crt sdk/include/ddk sdk/include/ndk Modified: trunk/reactos/base/applications/rapps_new/rapps.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps_ne…
============================================================================== --- trunk/reactos/base/applications/rapps_new/rapps.h [iso-8859-1] (original) +++ trunk/reactos/base/applications/rapps_new/rapps.h [iso-8859-1] Wed Sep 28 23:20:20 2016 @@ -24,7 +24,7 @@ #include <strsafe.h> #include <ndk/rtlfuncs.h> -#include <rappsmsg.h> +#include <rappsmsg_new.h> #include "resource.h" Modified: trunk/reactos/base/applications/rapps_new/rapps.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps_ne…
============================================================================== --- trunk/reactos/base/applications/rapps_new/rapps.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/rapps_new/rapps.rc [iso-8859-1] Wed Sep 28 23:20:20 2016 @@ -52,7 +52,7 @@ #include <reactos/manifest_exe.rc> -#include <rappsmsg.rc> +#include <rappsmsg_new.rc> /* UTF-8 */ #pragma code_page(65001) Modified: trunk/reactos/dll/win32/iologmsg/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/iologmsg/CMakeLi…
============================================================================== --- trunk/reactos/dll/win32/iologmsg/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/iologmsg/CMakeLists.txt [iso-8859-1] Wed Sep 28 23:20:20 2016 @@ -1,5 +1,4 @@ -include_directories(${REACTOS_BINARY_DIR}/sdk/include/reactos) add_library(iologmsg SHARED iologmsg.rc) set_module_type(iologmsg module UNICODE) add_dependencies(iologmsg ntiologc) Modified: trunk/reactos/dll/win32/netevent/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netevent/CMakeLi…
============================================================================== --- trunk/reactos/dll/win32/netevent/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netevent/CMakeLists.txt [iso-8859-1] Wed Sep 28 23:20:20 2016 @@ -1,6 +1,5 @@ -include_directories(${REACTOS_BINARY_DIR}/sdk/include/reactos) -add_library(netevent SHARED netevt.rc) +add_library(netevent SHARED netevent.rc) set_module_type(netevent module UNICODE) add_dependencies(netevent neteventmsg) add_cd_file(TARGET netevent DESTINATION reactos/system32 FOR all) Removed: trunk/reactos/dll/win32/netevent/netevt.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netevent/netevt.…
============================================================================== --- trunk/reactos/dll/win32/netevent/netevt.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netevent/netevt.rc (removed) @@ -1,7 +0,0 @@ -#define REACTOS_VERSION_DLL -#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Network Event Handler" -#define REACTOS_STR_INTERNAL_NAME "netevent" -#define REACTOS_STR_ORIGINAL_FILENAME "netevent.dll" -#include <reactos/version.rc> - -#include <neteventmsg.rc> Modified: trunk/reactos/sdk/cmake/CMakeMacros.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/cmake/CMakeMacros.cmak…
============================================================================== --- trunk/reactos/sdk/cmake/CMakeMacros.cmake [iso-8859-1] (original) +++ trunk/reactos/sdk/cmake/CMakeMacros.cmake [iso-8859-1] Wed Sep 28 23:20:20 2016 @@ -113,23 +113,23 @@ else() set(_flag "-A") endif() - foreach(_in_FILE ${ARGN}) - get_filename_component(FILE ${_in_FILE} NAME_WE) - set(_converted_item ${REACTOS_BINARY_DIR}/sdk/include/reactos/mc/${FILE}.mc) - set(_source_item ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.mc) + foreach(_file ${ARGN}) + get_filename_component(_file_name ${_file} NAME_WE) + set(_converted_file ${CMAKE_CURRENT_BINARY_DIR}/${_file}) ## ${_file_name}.mc + set(_source_file ${CMAKE_CURRENT_SOURCE_DIR}/${_file}) ## ${_file_name}.mc add_custom_command( - OUTPUT "${_converted_item}" - COMMAND native-utf16le "${_source_item}" "${_converted_item}" "nobom" - DEPENDS native-utf16le "${_source_item}") - macro_mc(${_flag} ${FILE}) + OUTPUT "${_converted_file}" + COMMAND native-utf16le "${_source_file}" "${_converted_file}" nobom + DEPENDS native-utf16le "${_source_file}") + macro_mc(${_flag} ${_converted_file}) add_custom_command( - OUTPUT ${REACTOS_BINARY_DIR}/sdk/include/reactos/${FILE}.rc ${REACTOS_BINARY_DIR}/sdk/include/reactos/${FILE}.h - COMMAND ${COMMAND_MC} ${MC_FLAGS} - DEPENDS "${_converted_item}") + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_file_name}.h ${CMAKE_CURRENT_BINARY_DIR}/${_file_name}.rc + COMMAND ${COMMAND_MC} + DEPENDS "${_converted_file}") set_source_files_properties( - ${REACTOS_BINARY_DIR}/sdk/include/reactos/${FILE}.h ${REACTOS_BINARY_DIR}/sdk/include/reactos/${FILE}.rc + ${CMAKE_CURRENT_BINARY_DIR}/${_file_name}.h ${CMAKE_CURRENT_BINARY_DIR}/${_file_name}.rc PROPERTIES GENERATED TRUE) - add_custom_target(${FILE} ALL DEPENDS ${REACTOS_BINARY_DIR}/sdk/include/reactos/${FILE}.h ${REACTOS_BINARY_DIR}/sdk/include/reactos/${FILE}.rc) + add_custom_target(${_file_name} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_file_name}.h ${CMAKE_CURRENT_BINARY_DIR}/${_file_name}.rc) endforeach() endfunction() Modified: trunk/reactos/sdk/cmake/gcc.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/cmake/gcc.cmake?rev=72…
============================================================================== --- trunk/reactos/sdk/cmake/gcc.cmake [iso-8859-1] (original) +++ trunk/reactos/sdk/cmake/gcc.cmake [iso-8859-1] Wed Sep 28 23:20:20 2016 @@ -379,7 +379,7 @@ endfunction() macro(macro_mc FLAG FILE) - set(COMMAND_MC ${CMAKE_MC_COMPILER} -u ${FLAG} -b ${REACTOS_BINARY_DIR}/sdk/include/reactos/mc/${FILE}.mc -r ${REACTOS_BINARY_DIR}/sdk/include/reactos -h ${REACTOS_BINARY_DIR}/sdk/include/reactos) + set(COMMAND_MC ${CMAKE_MC_COMPILER} -u ${FLAG} -b -h ${CMAKE_CURRENT_BINARY_DIR}/ -r ${CMAKE_CURRENT_BINARY_DIR}/ ${FILE}) endmacro() # PSEH lib, needed with mingw Modified: trunk/reactos/sdk/cmake/msvc.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/cmake/msvc.cmake?rev=7…
============================================================================== --- trunk/reactos/sdk/cmake/msvc.cmake [iso-8859-1] (original) +++ trunk/reactos/sdk/cmake/msvc.cmake [iso-8859-1] Wed Sep 28 23:20:20 2016 @@ -374,7 +374,7 @@ endfunction() macro(macro_mc FLAG FILE) - set(COMMAND_MC ${CMAKE_MC_COMPILER} ${FLAG} -b ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.mc -r ${REACTOS_BINARY_DIR}/sdk/include/reactos -h ${REACTOS_BINARY_DIR}/sdk/include/reactos) + set(COMMAND_MC ${CMAKE_MC_COMPILER} -u ${FLAG} -b -h ${CMAKE_CURRENT_BINARY_DIR}/ -r ${CMAKE_CURRENT_BINARY_DIR}/ ${FILE}) endmacro() # PSEH workaround Modified: trunk/rostests/rosautotest/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/rosautotest/CMakeLists.tx…
============================================================================== --- trunk/rostests/rosautotest/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/rosautotest/CMakeLists.txt [iso-8859-1] Wed Sep 28 23:20:20 2016 @@ -22,7 +22,7 @@ tools.cpp precomp.h) -add_executable(rosautotest ${SOURCE} ${REACTOS_BINARY_DIR}/sdk/include/reactos/rosautotestmsg.rc) +add_executable(rosautotest ${SOURCE} ${CMAKE_CURRENT_BINARY_DIR}/rosautotestmsg.rc) set_module_type(rosautotest win32cui UNICODE) add_importlibs(rosautotest advapi32 shell32 user32 wininet msvcrt kernel32 ntdll) add_pch(rosautotest precomp.h SOURCE) Modified: trunk/rostests/win32/advapi32/eventlog/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/win32/advapi32/eventlog/C…
============================================================================== --- trunk/rostests/win32/advapi32/eventlog/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/win32/advapi32/eventlog/CMakeLists.txt [iso-8859-1] Wed Sep 28 23:20:20 2016 @@ -3,19 +3,15 @@ ## rc /fo $(IntDir)MyEventProvider.res MyEventProvider.rc ## link /dll /noentry /SUBSYSTEM:CONSOLE",5.0" /out:$(SolutionDir)$(Configuration)\MyEventProvider.dll $(IntDir)MyEventProvider.res -## add_message_headers(UNICODE MyEventProvider.mc) - -add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/MyEventProvider.rc ${CMAKE_CURRENT_BINARY_DIR}/MyEventProvider.h - COMMAND ${CMAKE_MC_COMPILER} -U ${CMAKE_CURRENT_SOURCE_DIR}/MyEventProvider.mc -r ${CMAKE_CURRENT_BINARY_DIR}/ - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/MyEventProvider.mc) - -add_library(MyEventProvider SHARED ${CMAKE_CURRENT_BINARY_DIR}/MyEventProvider.rc) -set_module_type(MyEventProvider module UNICODE) -add_cd_file(TARGET MyEventProvider DESTINATION reactos/bin FOR all) +add_message_headers(UNICODE MyEventProvider.mc) +add_library(MyEventProvider_dll SHARED ${CMAKE_CURRENT_BINARY_DIR}/MyEventProvider.rc) +add_dependencies(MyEventProvider_dll MyEventProvider) +set_module_type(MyEventProvider_dll module UNICODE) +set_target_properties(MyEventProvider_dll PROPERTIES OUTPUT_NAME "MyEventProvider") +add_cd_file(TARGET MyEventProvider_dll DESTINATION reactos/bin FOR all) add_executable(evtlogtest EvtLogTest.c) -add_dependencies(evtlogtest MyEventProvider) set_module_type(evtlogtest win32cui UNICODE) +add_dependencies(evtlogtest MyEventProvider MyEventProvider_dll) add_importlibs(evtlogtest advapi32 msvcrt kernel32) add_cd_file(TARGET evtlogtest DESTINATION reactos/bin FOR all)
8 years, 2 months
1
0
0
0
[dchapyshev] 72845: [SHLWAPI] Try to fix regression
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Wed Sep 28 21:44:01 2016 New Revision: 72845 URL:
http://svn.reactos.org/svn/reactos?rev=72845&view=rev
Log: [SHLWAPI] Try to fix regression Modified: trunk/reactos/dll/win32/shlwapi/url.c Modified: trunk/reactos/dll/win32/shlwapi/url.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/url.c?re…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/url.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/url.c [iso-8859-1] Wed Sep 28 21:44:01 2016 @@ -1190,13 +1190,23 @@ if ((cur >= 0xd800 && cur <= 0xdfff) && (src[1] >= 0xdc00 && src[1] <= 0xdfff)) { +#ifdef __REACTOS__ + len = WideCharToMultiByte( CP_UTF8, 0, src, 2, + utf, sizeof(utf), NULL, NULL ); +#else len = WideCharToMultiByte( CP_UTF8, WC_ERR_INVALID_CHARS, src, 2, utf, sizeof(utf), NULL, NULL ); +#endif src++; } else +#ifdef __REACTOS__ + len = WideCharToMultiByte( CP_UTF8, 0, &cur, 1, + utf, sizeof(utf), NULL, NULL ); +#else len = WideCharToMultiByte( CP_UTF8, WC_ERR_INVALID_CHARS, &cur, 1, utf, sizeof(utf), NULL, NULL ); +#endif if (!len) { utf[0] = 0xef;
8 years, 2 months
1
0
0
0
[mjansen] 72844: [DEGMGR] Revert r65406, this is not a leak. CORE-9716 #comment Please retest!
by mjansen@svn.reactos.org
Author: mjansen Date: Wed Sep 28 21:05:39 2016 New Revision: 72844 URL:
http://svn.reactos.org/svn/reactos?rev=72844&view=rev
Log: [DEGMGR] Revert r65406, this is not a leak. CORE-9716 #comment Please retest! Modified: trunk/reactos/dll/win32/devmgr/properties/hwpage.cpp Modified: trunk/reactos/dll/win32/devmgr/properties/hwpage.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/propertie…
============================================================================== --- trunk/reactos/dll/win32/devmgr/properties/hwpage.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/devmgr/properties/hwpage.cpp [iso-8859-1] Wed Sep 28 21:05:39 2016 @@ -1067,7 +1067,6 @@ (LPARAM)hpd); if (hWnd != NULL) { - HeapFree(GetProcessHeap(), 0, hpd); return hWnd; } else
8 years, 2 months
1
0
0
0
[janderwald] 72843: [USBAUDIO] - implement USBAudioSelectAudioStreamingInterface
by janderwald@svn.reactos.org
Author: janderwald Date: Wed Sep 28 20:31:32 2016 New Revision: 72843 URL:
http://svn.reactos.org/svn/reactos?rev=72843&view=rev
Log: [USBAUDIO] - implement USBAudioSelectAudioStreamingInterface Modified: trunk/reactos/drivers/usb/usbaudio/filter.c trunk/reactos/drivers/usb/usbaudio/pin.c trunk/reactos/drivers/usb/usbaudio/usbaudio.c Modified: trunk/reactos/drivers/usb/usbaudio/filter.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbaudio/filte…
============================================================================== --- trunk/reactos/drivers/usb/usbaudio/filter.c [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbaudio/filter.c [iso-8859-1] Wed Sep 28 20:31:32 2016 @@ -136,6 +136,7 @@ FilterContext->LowerDevice = Device->NextDeviceObject; Filter->Context = FilterContext; + DPRINT("USBAudioFilterCreate FilterContext %p LowerDevice %p DeviceExtension %p\n", FilterContext, FilterContext->LowerDevice, FilterContext->DeviceExtension); KsAddItemToObjectBag(Filter->Bag, FilterContext, ExFreePool); return STATUS_SUCCESS; } Modified: trunk/reactos/drivers/usb/usbaudio/pin.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbaudio/pin.c…
============================================================================== --- trunk/reactos/drivers/usb/usbaudio/pin.c [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbaudio/pin.c [iso-8859-1] Wed Sep 28 20:31:32 2016 @@ -10,80 +10,8 @@ #include "usbaudio.h" NTSTATUS -NTAPI -USBAudioPinCreate( - _In_ PKSPIN Pin, - _In_ PIRP Irp) -{ - PKSFILTER Filter; - PFILTER_CONTEXT FilterContext; - PPIN_CONTEXT PinContext; - - Filter = KsPinGetParentFilter(Pin); - if (Filter == NULL) - { - /* invalid parameter */ - return STATUS_INVALID_PARAMETER; - } - - /* get filter context */ - FilterContext = Filter->Context; - - /* allocate pin context */ - PinContext = AllocFunction(sizeof(PIN_CONTEXT)); - if (!PinContext) - { - /* no memory*/ - return STATUS_INSUFFICIENT_RESOURCES; - } - - /* init pin context */ - PinContext->DeviceExtension = FilterContext->DeviceExtension; - PinContext->LowerDevice = FilterContext->LowerDevice; - - /* store pin context*/ - Pin->Context = PinContext; - - return STATUS_SUCCESS; -} - -NTSTATUS -NTAPI -USBAudioPinClose( - _In_ PKSPIN Pin, - _In_ PIRP Irp) -{ - UNIMPLEMENTED - return STATUS_NOT_IMPLEMENTED; -} - - -NTSTATUS -NTAPI -USBAudioPinProcess( - _In_ PKSPIN Pin) -{ - UNIMPLEMENTED - return STATUS_SUCCESS; -} - - -VOID -NTAPI -USBAudioPinReset( - _In_ PKSPIN Pin) -{ - UNIMPLEMENTED -} - -NTSTATUS -NTAPI -USBAudioPinSetDataFormat( - _In_ PKSPIN Pin, - _In_opt_ PKSDATAFORMAT OldFormat, - _In_opt_ PKSMULTIPLE_ITEM OldAttributeList, - _In_ const KSDATARANGE* DataRange, - _In_opt_ const KSATTRIBUTE_LIST* AttributeRange) +UsbAudioSetFormat( + IN PKSPIN Pin) { PURB Urb; PUCHAR SampleRateBuffer; @@ -99,14 +27,16 @@ return STATUS_INSUFFICIENT_RESOURCES; } - if (IsEqualGUIDAligned(&Pin->ConnectionFormat->MajorFormat, &KSDATAFORMAT_TYPE_AUDIO) && - IsEqualGUIDAligned(&Pin->ConnectionFormat->SubFormat, &KSDATAFORMAT_SUBTYPE_PCM) && + if (IsEqualGUIDAligned(&Pin->ConnectionFormat->MajorFormat, &KSDATAFORMAT_TYPE_AUDIO) && + IsEqualGUIDAligned(&Pin->ConnectionFormat->SubFormat, &KSDATAFORMAT_SUBTYPE_PCM) && IsEqualGUIDAligned(&Pin->ConnectionFormat->Specifier, &KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)) { WaveFormatEx = (PKSDATAFORMAT_WAVEFORMATEX)Pin->ConnectionFormat; SampleRateBuffer[0] = (WaveFormatEx->WaveFormatEx.nSamplesPerSec >> 16) & 0xFF; SampleRateBuffer[1] = (WaveFormatEx->WaveFormatEx.nSamplesPerSec >> 8) & 0xFF; SampleRateBuffer[2] = (WaveFormatEx->WaveFormatEx.nSamplesPerSec >> 0) & 0xFF; + + /* TODO: verify connection format */ } else { @@ -127,17 +57,17 @@ /* format urb */ UsbBuildVendorRequest(Urb, - URB_FUNCTION_CLASS_ENDPOINT, - sizeof(struct _URB_CONTROL_VENDOR_OR_CLASS_REQUEST), - USBD_TRANSFER_DIRECTION_OUT, - 0, - 0x01, - 0x100, - 0x81, //bEndpointAddress - SampleRateBuffer, - NULL, - 3, - NULL); + URB_FUNCTION_CLASS_ENDPOINT, + sizeof(URB), + USBD_TRANSFER_DIRECTION_OUT, + 0, + 0x01, + 0x100, + 0x81, //FIXME bEndpointAddress + SampleRateBuffer, + NULL, + 3, + NULL); /* get pin context */ PinContext = Pin->Context; @@ -152,6 +82,200 @@ } NTSTATUS +USBAudioSelectAudioStreamingInterface( + IN PDEVICE_EXTENSION DeviceExtension, + IN PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor) +{ + PURB Urb; + PUSB_INTERFACE_DESCRIPTOR InterfaceDescriptor; + NTSTATUS Status; + + /* grab interface descriptor */ + InterfaceDescriptor = USBD_ParseConfigurationDescriptorEx(ConfigurationDescriptor, ConfigurationDescriptor, -1, -1, USB_DEVICE_CLASS_AUDIO, -1, -1); + if (!InterfaceDescriptor) + { + /* no such interface */ + return STATUS_INVALID_PARAMETER; + } + + /* select the first interface with audio streaming and non zero num of endpoints */ + while (InterfaceDescriptor != NULL) + { + if (InterfaceDescriptor->bInterfaceSubClass == 0x02 /* AUDIO_STREAMING */ && InterfaceDescriptor->bNumEndpoints > 0) + { + break; + } + InterfaceDescriptor = USBD_ParseConfigurationDescriptorEx(ConfigurationDescriptor, (PVOID)((ULONG_PTR)InterfaceDescriptor + InterfaceDescriptor->bLength), -1, -1, USB_DEVICE_CLASS_AUDIO, -1, -1); + } + + if (!InterfaceDescriptor) + { + /* no such interface */ + return STATUS_INVALID_PARAMETER; + } + + Urb = AllocFunction(GET_SELECT_INTERFACE_REQUEST_SIZE(InterfaceDescriptor->bNumEndpoints)); + if (!Urb) + { + /* no memory */ + return USBD_STATUS_INSUFFICIENT_RESOURCES; + } + + /* now prepare interface urb */ + UsbBuildSelectInterfaceRequest(Urb, GET_SELECT_INTERFACE_REQUEST_SIZE(InterfaceDescriptor->bNumEndpoints), DeviceExtension->ConfigurationHandle, InterfaceDescriptor->bInterfaceNumber, InterfaceDescriptor->bAlternateSetting); + + /* copy interface information */ + RtlCopyMemory(&Urb->UrbSelectInterface.Interface, DeviceExtension->InterfaceInfo, DeviceExtension->InterfaceInfo->Length); + + /* set configuration handle */ + Urb->UrbSelectInterface.ConfigurationHandle = DeviceExtension->ConfigurationHandle; + + /* now select the interface */ + Status = SubmitUrbSync(DeviceExtension->LowerDevice, Urb); + + DPRINT1("USBAudioSelectAudioStreamingInterface Status %x UrbStatus %x\n", Status, Urb->UrbSelectInterface.Hdr.Status); + + /* did it succeeed */ + if (NT_SUCCESS(Status)) + { + /* update configuration info */ + ASSERT(Urb->UrbSelectInterface.Interface.Length == DeviceExtension->InterfaceInfo->Length); + RtlCopyMemory(DeviceExtension->InterfaceInfo, &Urb->UrbSelectInterface.Interface, Urb->UrbSelectInterface.Interface.Length); + } + + /* free urb */ + FreeFunction(Urb); + return Status; +} + +NTSTATUS +InitCapturePin( + IN PKSPIN Pin) +{ + NTSTATUS Status; + + /* set sample rate */ + Status = UsbAudioSetFormat(Pin); + + /* TODO: init pin */ + return Status; +} + +NTSTATUS +InitStreamPin( + IN PKSPIN Pin) +{ + UNIMPLEMENTED + return STATUS_NOT_IMPLEMENTED; +} + + +NTSTATUS +NTAPI +USBAudioPinCreate( + _In_ PKSPIN Pin, + _In_ PIRP Irp) +{ + PKSFILTER Filter; + PFILTER_CONTEXT FilterContext; + PPIN_CONTEXT PinContext; + NTSTATUS Status; + + Filter = KsPinGetParentFilter(Pin); + if (Filter == NULL) + { + /* invalid parameter */ + return STATUS_INVALID_PARAMETER; + } + + /* get filter context */ + FilterContext = Filter->Context; + + /* allocate pin context */ + PinContext = AllocFunction(sizeof(PIN_CONTEXT)); + if (!PinContext) + { + /* no memory*/ + return STATUS_INSUFFICIENT_RESOURCES; + } + + /* init pin context */ + PinContext->DeviceExtension = FilterContext->DeviceExtension; + PinContext->LowerDevice = FilterContext->LowerDevice; + + /* store pin context*/ + Pin->Context = PinContext; + + /* select streaming interface */ + Status = USBAudioSelectAudioStreamingInterface(PinContext->DeviceExtension, PinContext->DeviceExtension->ConfigurationDescriptor); + if (!NT_SUCCESS(Status)) + { + /* failed */ + return Status; + } + + if (Pin->DataFlow == KSPIN_DATAFLOW_OUT) + { + /* init capture pin */ + Status = InitCapturePin(Pin); + } + else + { + /* audio streaming pin*/ + Status = InitStreamPin(Pin); + } + + return STATUS_SUCCESS; +} + +NTSTATUS +NTAPI +USBAudioPinClose( + _In_ PKSPIN Pin, + _In_ PIRP Irp) +{ + UNIMPLEMENTED + return STATUS_NOT_IMPLEMENTED; +} + + +NTSTATUS +NTAPI +USBAudioPinProcess( + _In_ PKSPIN Pin) +{ + return STATUS_SUCCESS; +} + + +VOID +NTAPI +USBAudioPinReset( + _In_ PKSPIN Pin) +{ + UNIMPLEMENTED +} + +NTSTATUS +NTAPI +USBAudioPinSetDataFormat( + _In_ PKSPIN Pin, + _In_opt_ PKSDATAFORMAT OldFormat, + _In_opt_ PKSMULTIPLE_ITEM OldAttributeList, + _In_ const KSDATARANGE* DataRange, + _In_opt_ const KSATTRIBUTE_LIST* AttributeRange) +{ + if (OldFormat == NULL) + { + /* TODO: verify connection format */ + UNIMPLEMENTED + return STATUS_SUCCESS; + } + + return UsbAudioSetFormat(Pin); +} + +NTSTATUS NTAPI USBAudioPinSetDeviceState( _In_ PKSPIN Pin, Modified: trunk/reactos/drivers/usb/usbaudio/usbaudio.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbaudio/usbau…
============================================================================== --- trunk/reactos/drivers/usb/usbaudio/usbaudio.c [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbaudio/usbaudio.c [iso-8859-1] Wed Sep 28 20:31:32 2016 @@ -79,14 +79,6 @@ if (Status == STATUS_PENDING) { KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL); - } - - // complete request - IoCompleteRequest(Irp, IO_NO_INCREMENT); - - if (Status == STATUS_PENDING) - { - // get final status Status = IoStatus.Status; }
8 years, 2 months
1
0
0
0
[hbelusca] 72842: Addendum to r72841.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Wed Sep 28 20:22:33 2016 New Revision: 72842 URL:
http://svn.reactos.org/svn/reactos?rev=72842&view=rev
Log: Addendum to r72841. Modified: trunk/rostests/win32/advapi32/eventlog/CMakeLists.txt Modified: trunk/rostests/win32/advapi32/eventlog/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/win32/advapi32/eventlog/C…
============================================================================== --- trunk/rostests/win32/advapi32/eventlog/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/win32/advapi32/eventlog/CMakeLists.txt [iso-8859-1] Wed Sep 28 20:22:33 2016 @@ -11,7 +11,7 @@ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/MyEventProvider.mc) add_library(MyEventProvider SHARED ${CMAKE_CURRENT_BINARY_DIR}/MyEventProvider.rc) -set_module_type(MyEventProvider win32dll UNICODE ENTRYPOINT 0) +set_module_type(MyEventProvider module UNICODE) add_cd_file(TARGET MyEventProvider DESTINATION reactos/bin FOR all) add_executable(evtlogtest EvtLogTest.c)
8 years, 2 months
1
0
0
0
[hbelusca] 72841: Use set_module_type() with module type == "module" instead of specifying that the entrypoint is 0, for resource-only dlls.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Wed Sep 28 20:21:31 2016 New Revision: 72841 URL:
http://svn.reactos.org/svn/reactos?rev=72841&view=rev
Log: Use set_module_type() with module type == "module" instead of specifying that the entrypoint is 0, for resource-only dlls. Modified: trunk/reactos/dll/win32/iologmsg/CMakeLists.txt trunk/reactos/dll/win32/netevent/CMakeLists.txt trunk/reactos/drivers/base/kdgdb/CMakeLists.txt trunk/reactos/subsystems/mvdm/pifmgr/CMakeLists.txt Modified: trunk/reactos/dll/win32/iologmsg/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/iologmsg/CMakeLi…
============================================================================== --- trunk/reactos/dll/win32/iologmsg/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/iologmsg/CMakeLists.txt [iso-8859-1] Wed Sep 28 20:21:31 2016 @@ -1,6 +1,6 @@ include_directories(${REACTOS_BINARY_DIR}/sdk/include/reactos) add_library(iologmsg SHARED iologmsg.rc) -set_module_type(iologmsg win32dll ENTRYPOINT 0 UNICODE) +set_module_type(iologmsg module UNICODE) add_dependencies(iologmsg ntiologc) add_cd_file(TARGET iologmsg DESTINATION reactos/system32 FOR all) Modified: trunk/reactos/dll/win32/netevent/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netevent/CMakeLi…
============================================================================== --- trunk/reactos/dll/win32/netevent/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netevent/CMakeLists.txt [iso-8859-1] Wed Sep 28 20:21:31 2016 @@ -1,6 +1,6 @@ include_directories(${REACTOS_BINARY_DIR}/sdk/include/reactos) add_library(netevent SHARED netevt.rc) -set_module_type(netevent win32dll UNICODE ENTRYPOINT 0) +set_module_type(netevent module UNICODE) add_dependencies(netevent neteventmsg) add_cd_file(TARGET netevent DESTINATION reactos/system32 FOR all) Modified: trunk/reactos/drivers/base/kdgdb/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/kdgdb/CMakeLi…
============================================================================== --- trunk/reactos/drivers/base/kdgdb/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/drivers/base/kdgdb/CMakeLists.txt [iso-8859-1] Wed Sep 28 20:21:31 2016 @@ -20,9 +20,8 @@ kdgdb.rc ${CMAKE_CURRENT_BINARY_DIR}/kdcom.def) -set_entrypoint(kdcom 0) +set_module_type(kdcom module IMAGEBASE 0x00010000) set_subsystem(kdcom native) -set_image_base(kdcom 0x00010000) add_importlibs(kdcom ntoskrnl hal) target_link_libraries(kdcom cportlib) add_pch(kdcom kdgdb.h SOURCE) Modified: trunk/reactos/subsystems/mvdm/pifmgr/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/pifmgr/CMa…
============================================================================== --- trunk/reactos/subsystems/mvdm/pifmgr/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/pifmgr/CMakeLists.txt [iso-8859-1] Wed Sep 28 20:21:31 2016 @@ -2,5 +2,5 @@ file(GLOB pifmgr_rc_deps "res/*.*" "res_alt/*.*") add_rc_deps(pifmgr.rc ${pifmgr_rc_deps}) add_library(pifmgr SHARED pifmgr.rc) -set_module_type(pifmgr win32dll UNICODE ENTRYPOINT 0) +set_module_type(pifmgr module UNICODE) add_cd_file(TARGET pifmgr DESTINATION reactos/system32 FOR all)
8 years, 2 months
1
0
0
0
← Newer
1
2
3
4
5
6
...
35
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
Results per page:
10
25
50
100
200