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
December 2008
----- 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
31 participants
710 discussions
Start a n
N
ew thread
[cwittich] 38474: fix some more security winetests
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 30 10:01:13 2008 New Revision: 38474 URL:
http://svn.reactos.org/svn/reactos?rev=38474&view=rev
Log: fix some more security winetests Modified: trunk/reactos/dll/win32/advapi32/sec/misc.c Modified: trunk/reactos/dll/win32/advapi32/sec/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/sec/mis…
============================================================================== --- trunk/reactos/dll/win32/advapi32/sec/misc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/sec/misc.c [iso-8859-1] Tue Dec 30 10:01:13 2008 @@ -1301,6 +1301,12 @@ TRACE("%s %s %p %p %p %p %p - stub\n", lpSystemName, lpAccountName, Sid, cbSid, ReferencedDomainName, cchReferencedDomainName, peUse); + if (!ADVAPI_IsLocalComputer(lpSystemName)) + { + SetLastError(RPC_S_SERVER_UNAVAILABLE); + return FALSE; + } + for (i = 0; i < (sizeof(ACCOUNT_SIDS) / sizeof(ACCOUNT_SIDS[0])); i++) { if (!wcscmp(lpAccountName, ACCOUNT_SIDS[i].account))
15 years, 12 months
1
0
0
0
[dreimer] 38473: I forgot the new BUILD_MP Parameter. Can be set now, too.
by dreimer@svn.reactos.org
Author: dreimer Date: Tue Dec 30 09:37:46 2008 New Revision: 38473 URL:
http://svn.reactos.org/svn/reactos?rev=38473&view=rev
Log: I forgot the new BUILD_MP Parameter. Can be set now, too. Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/Config.ps1 trunk/tools/RosBE/RosBE-Windows/Root/Config.cmd Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/Config.ps1 URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Powershell/Config.ps1 [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Powershell/Config.ps1 [iso-8859-1] Tue Dec 30 09:37:46 2008 @@ -235,6 +235,17 @@ } clear-host +"Whether to compile the multi processor versions for ntoskrnl and hal." +"Default is: 1" +"" +$BUILD_MP = $xml.group.property | ? { $_.Name -eq "BUILD_MP" } | % { $_.Value} +"Right now: $BUILD_MP" +$BUILD_MP_CH = Read-Host "(0), (1)" +if ($BUILD_MP_CH -eq $null) { + $BUILD_MP_CH = $BUILD_MP +} +clear-host + # # Generate a config.rbuild, copy it to the Source Tree and delete temp files. # @@ -248,6 +259,7 @@ $xml.group.property | ? { $_.Name -eq "NSWPAT" } | % { $_.Value = "$NSWPAT_CH"} $xml.group.property | ? { $_.Name -eq "_WINKD_" } | % { $_.Value = "$WINKD_CH"} $xml.group.property | ? { $_.Name -eq "_ELF_" } | % { $_.Value = "$ELF_CH"} +$xml.group.property | ? { $_.Name -eq "BUILD_MP" } | % { $_.Value = "$BUILD_MP_CH"} $xml.save("$ENV:APPDATA\RosBE\config.rbuild") copy-item "$ENV:APPDATA\RosBE\config.rbuild" ".\config.rbuild" @@ -259,6 +271,8 @@ # Unload all used Vars. # $YESNO = $null +$BUILD_MP = $null +$BUILD_MP_CH = $null $TUNE = $null $TUNE_CH = $null $SARCH_CH = $null Modified: trunk/tools/RosBE/RosBE-Windows/Root/Config.cmd URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Con…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Root/Config.cmd [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Root/Config.cmd [iso-8859-1] Tue Dec 30 09:37:46 2008 @@ -249,6 +249,18 @@ ) cls +echo Whether to compile the multi processor versions for ntoskrnl and hal. +echo Default is: 1 +echo. +for /f "usebackq tokens=3" %%i in (`"type "%APPDATA%\RosBE\config.rbuild" | find "BUILD_MP" | find "property name""`) do set BUILD_MP=%%i +set BUILD_MP=%BUILD_MP:~7,-1% +echo Right now: %BUILD_MP% +set /p BUILD_MP_CH="(0), (1)" +if "%BUILD_MP_CH%" == "" ( + set BUILD_MP_CH=%BUILD_MP% +) +cls + :: :: Generate a config.rbuild, copy it to the Source Tree and delete temp files. :: @@ -265,6 +277,7 @@ echo ^<property name="NSWPAT" value="%NSWPAT_CH%" /^>>>%TEMP%\config.tmp echo ^<property name="_WINKD_" value="%WINKD_CH%" /^>>>%TEMP%\config.tmp echo ^<property name="_ELF_" value="%ELF_CH%" /^>>>%TEMP%\config.tmp +echo ^<property name="BUILD_MP" value="%BUILD_MP_CH%" /^>>>%TEMP%\config.tmp echo ^</group^>>>%TEMP%\config.tmp copy "%TEMP%\config.tmp" "%APPDATA%\RosBE\config.rbuild" >NUL @@ -283,6 +296,8 @@ :: Unload all used Vars. :: set YESNO= +set BUILD_MP= +set BUILD_MP_CH= set TUNE= set TUNE_CH= set SARCH_CH=
15 years, 12 months
1
0
0
0
[cwittich] 38472: fix some security winetests
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 30 09:12:17 2008 New Revision: 38472 URL:
http://svn.reactos.org/svn/reactos?rev=38472&view=rev
Log: fix some security winetests Modified: trunk/reactos/dll/win32/advapi32/sec/misc.c Modified: trunk/reactos/dll/win32/advapi32/sec/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/sec/mis…
============================================================================== --- trunk/reactos/dll/win32/advapi32/sec/misc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/sec/misc.c [iso-8859-1] Tue Dec 30 09:12:17 2008 @@ -1261,9 +1261,9 @@ WideCharToMultiByte(CP_ACP, 0, lpReferencedDomainNameW, - *hReferencedDomainNameLength, + *hReferencedDomainNameLength + 1, ReferencedDomainName, - *hReferencedDomainNameLength, + *hReferencedDomainNameLength + 1, NULL, NULL); } @@ -1343,13 +1343,16 @@ if (ReferencedDomainName != NULL && (*cchReferencedDomainName > wcslen(dm))) wcscpy(ReferencedDomainName, dm); - if (*cchReferencedDomainName <= wcslen(dm)) + if ((*cchReferencedDomainName <= wcslen(dm)) || (!ret)) { SetLastError(ERROR_INSUFFICIENT_BUFFER); ret = FALSE; - } - - *cchReferencedDomainName = wcslen(dm)+1; + *cchReferencedDomainName = wcslen(dm) + 1; + } + else + { + *cchReferencedDomainName = wcslen(dm); + } FreeSid(pSid);
15 years, 12 months
1
0
0
0
[cwittich] 38471: get icmp.dll to work
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 30 07:55:52 2008 New Revision: 38471 URL:
http://svn.reactos.org/svn/reactos?rev=38471&view=rev
Log: get icmp.dll to work Modified: trunk/reactos/dll/win32/icmp/icmp.rbuild trunk/reactos/dll/win32/icmp/icmp_main.c Modified: trunk/reactos/dll/win32/icmp/icmp.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/icmp/icmp.rbuild…
============================================================================== --- trunk/reactos/dll/win32/icmp/icmp.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/icmp/icmp.rbuild [iso-8859-1] Tue Dec 30 07:55:52 2008 @@ -1,4 +1,4 @@ -<module name="icmp" type="win32dll" entrypoint="0" baseaddress="${BASEADDRESS_ICMP}" installbase="system32" installname="icmp.dll" allowwarnings="true"> +<module name="icmp" type="win32dll" baseaddress="${BASEADDRESS_ICMP}" installbase="system32" installname="icmp.dll" allowwarnings="true"> <importlibrary definition="icmp.spec" /> <include base="icmp">.</include> <include base="ReactOS">include/reactos/wine</include> Modified: trunk/reactos/dll/win32/icmp/icmp_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/icmp/icmp_main.c…
============================================================================== --- trunk/reactos/dll/win32/icmp/icmp_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/icmp/icmp_main.c [iso-8859-1] Tue Dec 30 07:55:52 2008 @@ -142,6 +142,22 @@ /* * Exported Routines. */ + +BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + WSADATA wsaData; + + switch (fdwReason) { + case DLL_PROCESS_ATTACH: + WSAStartup(MAKEWORD(2, 2), &wsaData); + break; + + case DLL_PROCESS_DETACH: + WSACleanup(); + break; + } + return TRUE; +} /*********************************************************************** * IcmpCreateFile (ICMP.@)
15 years, 12 months
1
0
0
0
[cwittich] 38470: fix a winetest failure
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 30 07:37:31 2008 New Revision: 38470 URL:
http://svn.reactos.org/svn/reactos?rev=38470&view=rev
Log: fix a winetest failure Modified: trunk/reactos/dll/win32/ws2_32/misc/stubs.c Modified: trunk/reactos/dll/win32/ws2_32/misc/stubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/misc/stub…
============================================================================== --- trunk/reactos/dll/win32/ws2_32/misc/stubs.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ws2_32/misc/stubs.c [iso-8859-1] Tue Dec 30 07:37:31 2008 @@ -160,6 +160,12 @@ if (!WSAINITIALIZED) { WSASetLastError(WSANOTINITIALISED); + return SOCKET_ERROR; + } + + if(IS_INTRESOURCE(optval)) + { + SetLastError(WSAEFAULT); return SOCKET_ERROR; }
15 years, 12 months
1
0
0
0
[cwittich] 38469: fix iphlpapi winetests
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 30 06:04:47 2008 New Revision: 38469 URL:
http://svn.reactos.org/svn/reactos?rev=38469&view=rev
Log: fix iphlpapi winetests Modified: trunk/reactos/dll/win32/iphlpapi/iphlpapi_main.c trunk/reactos/dll/win32/iphlpapi/ipstats_reactos.c Modified: trunk/reactos/dll/win32/iphlpapi/iphlpapi_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/iphlpapi/iphlpap…
============================================================================== --- trunk/reactos/dll/win32/iphlpapi/iphlpapi_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/iphlpapi/iphlpapi_main.c [iso-8859-1] Tue Dec 30 06:04:47 2008 @@ -1253,45 +1253,45 @@ */ DWORD WINAPI GetIpNetTable(PMIB_IPNETTABLE pIpNetTable, PULONG pdwSize, BOOL bOrder) { - DWORD ret; - - TRACE("pIpNetTable %p, pdwSize %p, bOrder %ld\n", pIpNetTable, pdwSize, + DWORD ret = NO_ERROR; + + TRACE("pIpNetTable %p, pdwSize %p, bOrder %d\n", pIpNetTable, pdwSize, (DWORD)bOrder); if (!pdwSize) ret = ERROR_INVALID_PARAMETER; else { DWORD numEntries = getNumArpEntries(); - ULONG size = sizeof(MIB_IPNETTABLE) + (numEntries - 1) * - sizeof(MIB_IPNETROW); - + ULONG size = sizeof(MIB_IPNETTABLE); + + if (numEntries > 1) + size += (numEntries - 1) * sizeof(MIB_IPNETROW); if (!pIpNetTable || *pdwSize < size) { *pdwSize = size; ret = ERROR_INSUFFICIENT_BUFFER; } else { PMIB_IPNETTABLE table = getArpTable(); - if (table) { - size = sizeof(MIB_IPNETTABLE) + (table->dwNumEntries - 1) * - sizeof(MIB_IPNETROW); + size = sizeof(MIB_IPNETTABLE); + if (table->dwNumEntries > 1) + size += (table->dwNumEntries - 1) * sizeof(MIB_IPNETROW); if (*pdwSize < size) { *pdwSize = size; ret = ERROR_INSUFFICIENT_BUFFER; } else { + *pdwSize = size; memcpy(pIpNetTable, table, size); if (bOrder) qsort(pIpNetTable->table, pIpNetTable->dwNumEntries, sizeof(MIB_IPNETROW), IpNetTableSorter); ret = NO_ERROR; } - free(table); + HeapFree(GetProcessHeap(), 0, table); } - else - ret = ERROR_OUTOFMEMORY; - } - } - TRACE("returning %ld\n", ret); + } + } + TRACE("returning %d\n", ret); return ret; } @@ -1527,6 +1527,12 @@ if (!pOutBufLen) return ERROR_INVALID_PARAMETER; + if (!pPerAdapterInfo || *pOutBufLen < sizeof(IP_PER_ADAPTER_INFO)) + { + *pOutBufLen = sizeof(IP_PER_ADAPTER_INFO); + return ERROR_BUFFER_OVERFLOW; + } + ifName = getInterfaceNameByIndex(IfIndex); if (!ifName) return ERROR_INVALID_PARAMETER; @@ -1659,58 +1665,60 @@ /****************************************************************** * GetTcpTable (IPHLPAPI.@) * - * - * PARAMS - * - * pTcpTable [In/Out] - * pdwSize [In/Out] - * bOrder [In] - * - * RETURNS - * - * DWORD - * + * Get the table of active TCP connections. + * + * PARAMS + * pTcpTable [Out] buffer for TCP connections table + * pdwSize [In/Out] length of output buffer + * bOrder [In] whether to order the table + * + * RETURNS + * Success: NO_ERROR + * Failure: error code from winerror.h + * + * NOTES + * If pdwSize is less than required, the function will return + * ERROR_INSUFFICIENT_BUFFER, and *pdwSize will be set to + * the required byte size. + * If bOrder is true, the returned table will be sorted, first by + * local address and port number, then by remote address and port + * number. */ DWORD WINAPI GetTcpTable(PMIB_TCPTABLE pTcpTable, PDWORD pdwSize, BOOL bOrder) { - DWORD ret; - - TRACE("pTcpTable %p, pdwSize %p, bOrder %ld\n", pTcpTable, pdwSize, + DWORD ret = NO_ERROR; + + TRACE("pTcpTable %p, pdwSize %p, bOrder %d\n", pTcpTable, pdwSize, (DWORD)bOrder); if (!pdwSize) ret = ERROR_INVALID_PARAMETER; else { DWORD numEntries = getNumTcpEntries(); - ULONG size = sizeof(MIB_TCPTABLE) + (numEntries - 1) * sizeof(MIB_TCPROW); - + DWORD size = sizeof(MIB_TCPTABLE); + + if (numEntries > 1) + size += (numEntries - 1) * sizeof(MIB_TCPROW); if (!pTcpTable || *pdwSize < size) { *pdwSize = size; ret = ERROR_INSUFFICIENT_BUFFER; } else { - PMIB_TCPTABLE table = getTcpTable(); - - if (table) { - size = sizeof(MIB_TCPTABLE) + (table->dwNumEntries - 1) * - sizeof(MIB_TCPROW); - if (*pdwSize < size) { - *pdwSize = size; - ret = ERROR_INSUFFICIENT_BUFFER; - } - else { - memcpy(pTcpTable, table, size); - if (bOrder) - qsort(pTcpTable->table, pTcpTable->dwNumEntries, - sizeof(MIB_TCPROW), TcpTableSorter); - ret = NO_ERROR; - } - free(table); - } - else - ret = ERROR_OUTOFMEMORY; - } - } - TRACE("returning %ld\n", ret); + PMIB_TCPTABLE pTcpTable = getTcpTable(); + if (pTcpTable) + { + size = sizeof(MIB_TCPTABLE); + if (pTcpTable->dwNumEntries > 1) + size += (pTcpTable->dwNumEntries - 1) * sizeof(MIB_TCPROW); + *pdwSize = size; + + if (bOrder) + qsort(pTcpTable->table, pTcpTable->dwNumEntries, + sizeof(MIB_TCPROW), TcpTableSorter); + ret = NO_ERROR; + } + } + } + TRACE("returning %d\n", ret); return ret; } Modified: trunk/reactos/dll/win32/iphlpapi/ipstats_reactos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/iphlpapi/ipstats…
============================================================================== --- trunk/reactos/dll/win32/iphlpapi/ipstats_reactos.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/iphlpapi/ipstats_reactos.c [iso-8859-1] Tue Dec 30 06:04:47 2008 @@ -549,7 +549,10 @@ &returnSize ); if( status == STATUS_SUCCESS ) totalNumber += returnSize; - if( IpArpTable ) tdiFreeThingSet( IpArpTable ); + if( IpArpTable ) { + tdiFreeThingSet( IpArpTable ); + IpArpTable = NULL; + } } }
15 years, 12 months
1
0
0
0
[fireball] 38468: - Silence debug output.
by fireball@svn.reactos.org
Author: fireball Date: Tue Dec 30 04:32:23 2008 New Revision: 38468 URL:
http://svn.reactos.org/svn/reactos?rev=38468&view=rev
Log: - Silence debug output. Modified: trunk/reactos/subsystems/win32/win32k/ntuser/misc.c Modified: trunk/reactos/subsystems/win32/win32k/ntuser/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/misc.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/misc.c [iso-8859-1] Tue Dec 30 04:32:23 2008 @@ -56,7 +56,7 @@ } ZwClose(KeyHandle); } - DPRINT1("Language ID = %x\n",Ret); + DPRINT("Language ID = %x\n",Ret); return (SHORT) Ret; }
15 years, 12 months
1
0
0
0
[cwittich] 38467: add iphlpapi_winetest to bootcd
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 30 03:11:13 2008 New Revision: 38467 URL:
http://svn.reactos.org/svn/reactos?rev=38467&view=rev
Log: add iphlpapi_winetest to bootcd Modified: trunk/reactos/boot/bootdata/packages/reactos.dff Modified: trunk/reactos/boot/bootdata/packages/reactos.dff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/packages/rea…
============================================================================== --- trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] Tue Dec 30 03:11:13 2008 @@ -630,6 +630,7 @@ modules\rostests\winetests\gdiplus\gdiplus_winetest.exe 7 optional modules\rostests\winetests\hlink\hlink_winetest.exe 7 optional modules\rostests\winetests\icmp\icmp_winetest.exe 7 optional +modules\rostests\winetests\iphlpapi\iphlpapi_winetest.exe 7 optional modules\rostests\winetests\jscript\jscript_winetest.exe 7 optional modules\rostests\winetests\kernel32\kernel32_winetest.exe 7 optional modules\rostests\winetests\lz32\lz32_winetest.exe 7 optional
15 years, 12 months
1
0
0
0
[cwittich] 38466: add func_iphlpapi winetest from wine 1.1.11
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 30 03:10:17 2008 New Revision: 38466 URL:
http://svn.reactos.org/svn/reactos?rev=38466&view=rev
Log: add func_iphlpapi winetest from wine 1.1.11 Added: trunk/rostests/winetests/iphlpapi/ (with props) trunk/rostests/winetests/iphlpapi/iphlpapi.c (with props) trunk/rostests/winetests/iphlpapi/iphlpapi.rbuild (with props) trunk/rostests/winetests/iphlpapi/testlist.c (with props) Modified: trunk/rostests/winetests/directory.rbuild Modified: trunk/rostests/winetests/directory.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/directory.rbuil…
============================================================================== --- trunk/rostests/winetests/directory.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/directory.rbuild [iso-8859-1] Tue Dec 30 03:10:17 2008 @@ -39,6 +39,9 @@ </directory> <directory name="imm32"> <xi:include href="imm32/imm32.rbuild" /> + </directory> + <directory name="iphlpapi"> + <xi:include href="iphlpapi/iphlpapi.rbuild" /> </directory> <directory name="jscript"> <xi:include href="jscript/jscript.rbuild" /> Propchange: trunk/rostests/winetests/iphlpapi/ ------------------------------------------------------------------------------ --- bugtraq:logregex (added) +++ bugtraq:logregex Tue Dec 30 03:10:17 2008 @@ -1,0 +1,2 @@ +([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))? +(\d+) Propchange: trunk/rostests/winetests/iphlpapi/ ------------------------------------------------------------------------------ bugtraq:message = See issue #%BUGID% for more details. Propchange: trunk/rostests/winetests/iphlpapi/ ------------------------------------------------------------------------------ bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: trunk/rostests/winetests/iphlpapi/ ------------------------------------------------------------------------------ tsvn:logminsize = 10 Added: trunk/rostests/winetests/iphlpapi/iphlpapi.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/iphlpapi/iphlpa…
============================================================================== --- trunk/rostests/winetests/iphlpapi/iphlpapi.c (added) +++ trunk/rostests/winetests/iphlpapi/iphlpapi.c [iso-8859-1] Tue Dec 30 03:10:17 2008 @@ -1,0 +1,670 @@ +/* + * iphlpapi dll test + * + * Copyright (C) 2003 Juan Lang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/* + * Some observations that an automated test can't produce: + * An adapter index is a key for an adapter. That is, if an index is returned + * from one API, that same index may be used successfully in another API, as + * long as the adapter remains present. + * If the adapter is removed and reinserted, however, the index may change (and + * indeed it does change on Win2K). + * + * The Name field of the IP_ADAPTER_INDEX_MAP entries returned by + * GetInterfaceInfo is declared as a wide string, but the bytes are actually + * an ASCII string on some versions of the IP helper API under Win9x. This was + * apparently an MS bug, it's corrected in later versions. + * + * The DomainName field of FIXED_INFO isn't NULL-terminated on Win98. + */ + +#include <stdarg.h> +#include "windef.h" +#include "winbase.h" +#include "iphlpapi.h" +#include "iprtrmib.h" +#include "wine/test.h" +#include <stdio.h> +#include <stdlib.h> + +static HMODULE hLibrary = NULL; + +typedef DWORD (WINAPI *GetNumberOfInterfacesFunc)(PDWORD); +typedef DWORD (WINAPI *GetIpAddrTableFunc)(PMIB_IPADDRTABLE,PULONG,BOOL); +typedef DWORD (WINAPI *GetIfEntryFunc)(PMIB_IFROW); +typedef DWORD (WINAPI *GetFriendlyIfIndexFunc)(DWORD); +typedef DWORD (WINAPI *GetIfTableFunc)(PMIB_IFTABLE,PULONG,BOOL); +typedef DWORD (WINAPI *GetIpForwardTableFunc)(PMIB_IPFORWARDTABLE,PULONG,BOOL); +typedef DWORD (WINAPI *GetIpNetTableFunc)(PMIB_IPNETTABLE,PULONG,BOOL); +typedef DWORD (WINAPI *GetInterfaceInfoFunc)(PIP_INTERFACE_INFO,PULONG); +typedef DWORD (WINAPI *GetAdaptersInfoFunc)(PIP_ADAPTER_INFO,PULONG); +typedef DWORD (WINAPI *GetNetworkParamsFunc)(PFIXED_INFO,PULONG); +typedef DWORD (WINAPI *GetIcmpStatisticsFunc)(PMIB_ICMP); +typedef DWORD (WINAPI *GetIpStatisticsFunc)(PMIB_IPSTATS); +typedef DWORD (WINAPI *GetTcpStatisticsFunc)(PMIB_TCPSTATS); +typedef DWORD (WINAPI *GetUdpStatisticsFunc)(PMIB_UDPSTATS); +typedef DWORD (WINAPI *GetTcpTableFunc)(PMIB_TCPTABLE,PDWORD,BOOL); +typedef DWORD (WINAPI *GetUdpTableFunc)(PMIB_UDPTABLE,PDWORD,BOOL); +typedef DWORD (WINAPI *GetPerAdapterInfoFunc)(ULONG,PIP_PER_ADAPTER_INFO,PULONG); + +static GetNumberOfInterfacesFunc gGetNumberOfInterfaces = NULL; +static GetIpAddrTableFunc gGetIpAddrTable = NULL; +static GetIfEntryFunc gGetIfEntry = NULL; +static GetFriendlyIfIndexFunc gGetFriendlyIfIndex = NULL; +static GetIfTableFunc gGetIfTable = NULL; +static GetIpForwardTableFunc gGetIpForwardTable = NULL; +static GetIpNetTableFunc gGetIpNetTable = NULL; +static GetInterfaceInfoFunc gGetInterfaceInfo = NULL; +static GetAdaptersInfoFunc gGetAdaptersInfo = NULL; +static GetNetworkParamsFunc gGetNetworkParams = NULL; +static GetIcmpStatisticsFunc gGetIcmpStatistics = NULL; +static GetIpStatisticsFunc gGetIpStatistics = NULL; +static GetTcpStatisticsFunc gGetTcpStatistics = NULL; +static GetUdpStatisticsFunc gGetUdpStatistics = NULL; +static GetTcpTableFunc gGetTcpTable = NULL; +static GetUdpTableFunc gGetUdpTable = NULL; +static GetPerAdapterInfoFunc gGetPerAdapterInfo = NULL; + +static void loadIPHlpApi(void) +{ + hLibrary = LoadLibraryA("iphlpapi.dll"); + if (hLibrary) { + gGetNumberOfInterfaces = (GetNumberOfInterfacesFunc)GetProcAddress( + hLibrary, "GetNumberOfInterfaces"); + gGetIpAddrTable = (GetIpAddrTableFunc)GetProcAddress( + hLibrary, "GetIpAddrTable"); + gGetIfEntry = (GetIfEntryFunc)GetProcAddress( + hLibrary, "GetIfEntry"); + gGetFriendlyIfIndex = (GetFriendlyIfIndexFunc)GetProcAddress( + hLibrary, "GetFriendlyIfIndex"); + gGetIfTable = (GetIfTableFunc)GetProcAddress( + hLibrary, "GetIfTable"); + gGetIpForwardTable = (GetIpForwardTableFunc)GetProcAddress( + hLibrary, "GetIpForwardTable"); + gGetIpNetTable = (GetIpNetTableFunc)GetProcAddress( + hLibrary, "GetIpNetTable"); + gGetInterfaceInfo = (GetInterfaceInfoFunc)GetProcAddress( + hLibrary, "GetInterfaceInfo"); + gGetAdaptersInfo = (GetAdaptersInfoFunc)GetProcAddress( + hLibrary, "GetAdaptersInfo"); + gGetNetworkParams = (GetNetworkParamsFunc)GetProcAddress( + hLibrary, "GetNetworkParams"); + gGetIcmpStatistics = (GetIcmpStatisticsFunc)GetProcAddress( + hLibrary, "GetIcmpStatistics"); + gGetIpStatistics = (GetIpStatisticsFunc)GetProcAddress( + hLibrary, "GetIpStatistics"); + gGetTcpStatistics = (GetTcpStatisticsFunc)GetProcAddress( + hLibrary, "GetTcpStatistics"); + gGetUdpStatistics = (GetUdpStatisticsFunc)GetProcAddress( + hLibrary, "GetUdpStatistics"); + gGetTcpTable = (GetTcpTableFunc)GetProcAddress( + hLibrary, "GetTcpTable"); + gGetUdpTable = (GetUdpTableFunc)GetProcAddress( + hLibrary, "GetUdpTable"); + gGetPerAdapterInfo = (GetPerAdapterInfoFunc)GetProcAddress(hLibrary, "GetPerAdapterInfo"); + } +} + +static void freeIPHlpApi(void) +{ + if (hLibrary) { + gGetNumberOfInterfaces = NULL; + gGetIpAddrTable = NULL; + gGetIfEntry = NULL; + gGetFriendlyIfIndex = NULL; + gGetIfTable = NULL; + gGetIpForwardTable = NULL; + gGetIpNetTable = NULL; + gGetInterfaceInfo = NULL; + gGetAdaptersInfo = NULL; + gGetNetworkParams = NULL; + gGetIcmpStatistics = NULL; + gGetIpStatistics = NULL; + gGetTcpStatistics = NULL; + gGetUdpStatistics = NULL; + gGetTcpTable = NULL; + gGetUdpTable = NULL; + FreeLibrary(hLibrary); + hLibrary = NULL; + } +} + +/* +still-to-be-tested 98-only functions: +GetUniDirectionalAdapterInfo +*/ +static void testWin98OnlyFunctions(void) +{ +} + +static void testGetNumberOfInterfaces(void) +{ + if (gGetNumberOfInterfaces) { + DWORD apiReturn, numInterfaces; + + /* Crashes on Vista */ + if (0) { + apiReturn = gGetNumberOfInterfaces(NULL), numInterfaces; + if (apiReturn == ERROR_NOT_SUPPORTED) + return; + ok(apiReturn == ERROR_INVALID_PARAMETER, + "GetNumberOfInterfaces(NULL) returned %d, expected ERROR_INVALID_PARAMETER\n", + apiReturn); + } + + apiReturn = gGetNumberOfInterfaces(&numInterfaces); + if (apiReturn == ERROR_NOT_SUPPORTED) { + skip("GetNumberOfInterfaces is not supported\n"); + return; + } + ok(apiReturn == NO_ERROR, + "GetNumberOfInterfaces returned %d, expected 0\n", apiReturn); + } +} + +static void testGetIfEntry(DWORD index) +{ + if (gGetIfEntry) { + DWORD apiReturn; + MIB_IFROW row; + + memset(&row, 0, sizeof(row)); + apiReturn = gGetIfEntry(NULL); + if (apiReturn == ERROR_NOT_SUPPORTED) { + skip("GetIfEntry is not supported\n"); + return; + } + ok(apiReturn == ERROR_INVALID_PARAMETER, + "GetIfEntry(NULL) returned %d, expected ERROR_INVALID_PARAMETER\n", + apiReturn); + row.dwIndex = -1; /* hope that's always bogus! */ + apiReturn = gGetIfEntry(&row); + ok(apiReturn == ERROR_INVALID_DATA || + apiReturn == ERROR_FILE_NOT_FOUND /* Vista */, + "GetIfEntry(bogus row) returned %d, expected ERROR_INVALID_DATA or ERROR_FILE_NOT_FOUND\n", + apiReturn); + row.dwIndex = index; + apiReturn = gGetIfEntry(&row); + ok(apiReturn == NO_ERROR, + "GetIfEntry returned %d, expected NO_ERROR\n", apiReturn); + } +} + +static void testGetIpAddrTable(void) +{ + if (gGetIpAddrTable) { + DWORD apiReturn; + ULONG dwSize = 0; + + apiReturn = gGetIpAddrTable(NULL, NULL, FALSE); + if (apiReturn == ERROR_NOT_SUPPORTED) { + skip("GetIpAddrTable is not supported\n"); + return; + } + ok(apiReturn == ERROR_INVALID_PARAMETER, + "GetIpAddrTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER\n", + apiReturn); + apiReturn = gGetIpAddrTable(NULL, &dwSize, FALSE); + ok(apiReturn == ERROR_INSUFFICIENT_BUFFER, + "GetIpAddrTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER\n", + apiReturn); + if (apiReturn == ERROR_INSUFFICIENT_BUFFER) { + PMIB_IPADDRTABLE buf = HeapAlloc(GetProcessHeap(), 0, dwSize); + + apiReturn = gGetIpAddrTable(buf, &dwSize, FALSE); + ok(apiReturn == NO_ERROR, + "GetIpAddrTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n", + apiReturn); + if (apiReturn == NO_ERROR && buf->dwNumEntries) + testGetIfEntry(buf->table[0].dwIndex); + HeapFree(GetProcessHeap(), 0, buf); + } + } +} + +static void testGetIfTable(void) +{ + if (gGetIfTable) { + DWORD apiReturn; + ULONG dwSize = 0; + + apiReturn = gGetIfTable(NULL, NULL, FALSE); + if (apiReturn == ERROR_NOT_SUPPORTED) { + skip("GetIfTable is not supported\n"); + return; + } + ok(apiReturn == ERROR_INVALID_PARAMETER, + "GetIfTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER\n", + apiReturn); + apiReturn = gGetIfTable(NULL, &dwSize, FALSE); + ok(apiReturn == ERROR_INSUFFICIENT_BUFFER, + "GetIfTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER\n", + apiReturn); + if (apiReturn == ERROR_INSUFFICIENT_BUFFER) { + PMIB_IFTABLE buf = HeapAlloc(GetProcessHeap(), 0, dwSize); + + apiReturn = gGetIfTable(buf, &dwSize, FALSE); + ok(apiReturn == NO_ERROR, + "GetIfTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n\n", + apiReturn); + HeapFree(GetProcessHeap(), 0, buf); + } + } +} + +static void testGetIpForwardTable(void) +{ + if (gGetIpForwardTable) { + DWORD apiReturn; + ULONG dwSize = 0; + + apiReturn = gGetIpForwardTable(NULL, NULL, FALSE); + if (apiReturn == ERROR_NOT_SUPPORTED) { + skip("GetIpForwardTable is not supported\n"); + return; + } + ok(apiReturn == ERROR_INVALID_PARAMETER, + "GetIpForwardTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER\n", + apiReturn); + apiReturn = gGetIpForwardTable(NULL, &dwSize, FALSE); + ok(apiReturn == ERROR_INSUFFICIENT_BUFFER, + "GetIpForwardTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER\n", + apiReturn); + if (apiReturn == ERROR_INSUFFICIENT_BUFFER) { + PMIB_IPFORWARDTABLE buf = HeapAlloc(GetProcessHeap(), 0, dwSize); + + apiReturn = gGetIpForwardTable(buf, &dwSize, FALSE); + ok(apiReturn == NO_ERROR, + "GetIpForwardTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n", + apiReturn); + HeapFree(GetProcessHeap(), 0, buf); + } + } +} + +static void testGetIpNetTable(void) +{ + if (gGetIpNetTable) { + DWORD apiReturn; + ULONG dwSize = 0; + + apiReturn = gGetIpNetTable(NULL, NULL, FALSE); + if (apiReturn == ERROR_NOT_SUPPORTED) { + skip("GetIpNetTable is not supported\n"); + return; + } + ok(apiReturn == ERROR_INVALID_PARAMETER, + "GetIpNetTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER\n", + apiReturn); + apiReturn = gGetIpNetTable(NULL, &dwSize, FALSE); + ok(apiReturn == ERROR_NO_DATA || apiReturn == ERROR_INSUFFICIENT_BUFFER, + "GetIpNetTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_NO_DATA or ERROR_INSUFFICIENT_BUFFER\n", + apiReturn); + if (apiReturn == ERROR_NO_DATA) + ; /* empty ARP table's okay */ + else if (apiReturn == ERROR_INSUFFICIENT_BUFFER) { + PMIB_IPNETTABLE buf = HeapAlloc(GetProcessHeap(), 0, dwSize); + + apiReturn = gGetIpNetTable(buf, &dwSize, FALSE); + ok(apiReturn == NO_ERROR, + "GetIpNetTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n", + apiReturn); + HeapFree(GetProcessHeap(), 0, buf); + } + } +} + +static void testGetIcmpStatistics(void) +{ + if (gGetIcmpStatistics) { + DWORD apiReturn; + MIB_ICMP stats; + + /* Crashes on Vista */ + if (0) { + apiReturn = gGetIcmpStatistics(NULL); + if (apiReturn == ERROR_NOT_SUPPORTED) + return; + ok(apiReturn == ERROR_INVALID_PARAMETER, + "GetIcmpStatistics(NULL) returned %d, expected ERROR_INVALID_PARAMETER\n", + apiReturn); + } + + apiReturn = gGetIcmpStatistics(&stats); + if (apiReturn == ERROR_NOT_SUPPORTED) + { + skip("GetIcmpStatistics is not supported\n"); + return; + } + ok(apiReturn == NO_ERROR, + "GetIcmpStatistics returned %d, expected NO_ERROR\n", apiReturn); + } +} + +static void testGetIpStatistics(void) +{ + if (gGetIpStatistics) { + DWORD apiReturn; + MIB_IPSTATS stats; + + apiReturn = gGetIpStatistics(NULL); + if (apiReturn == ERROR_NOT_SUPPORTED) { + skip("GetIpStatistics is not supported\n"); + return; + } + ok(apiReturn == ERROR_INVALID_PARAMETER, + "GetIpStatistics(NULL) returned %d, expected ERROR_INVALID_PARAMETER\n", + apiReturn); + apiReturn = gGetIpStatistics(&stats); + ok(apiReturn == NO_ERROR, + "GetIpStatistics returned %d, expected NO_ERROR\n", apiReturn); + } +} + +static void testGetTcpStatistics(void) +{ + if (gGetTcpStatistics) { + DWORD apiReturn; + MIB_TCPSTATS stats; + + apiReturn = gGetTcpStatistics(NULL); + if (apiReturn == ERROR_NOT_SUPPORTED) { + skip("GetTcpStatistics is not supported\n"); + return; + } + ok(apiReturn == ERROR_INVALID_PARAMETER, + "GetTcpStatistics(NULL) returned %d, expected ERROR_INVALID_PARAMETER\n", + apiReturn); + apiReturn = gGetTcpStatistics(&stats); + ok(apiReturn == NO_ERROR, + "GetTcpStatistics returned %d, expected NO_ERROR\n", apiReturn); + } +} + +static void testGetUdpStatistics(void) +{ + if (gGetUdpStatistics) { + DWORD apiReturn; + MIB_UDPSTATS stats; + + apiReturn = gGetUdpStatistics(NULL); + if (apiReturn == ERROR_NOT_SUPPORTED) { + skip("GetUdpStatistics is not supported\n"); + return; + } + ok(apiReturn == ERROR_INVALID_PARAMETER, + "GetUdpStatistics(NULL) returned %d, expected ERROR_INVALID_PARAMETER\n", + apiReturn); + apiReturn = gGetUdpStatistics(&stats); + ok(apiReturn == NO_ERROR, + "GetUdpStatistics returned %d, expected NO_ERROR\n", apiReturn); + } +} + +static void testGetTcpTable(void) +{ + if (gGetTcpTable) { + DWORD apiReturn; + ULONG dwSize = 0; + + apiReturn = gGetTcpTable(NULL, NULL, FALSE); + if (apiReturn == ERROR_NOT_SUPPORTED) { + skip("GetTcpTable is not supported\n"); + return; + } + ok(apiReturn == ERROR_INVALID_PARAMETER, + "GetTcpTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER\n", + apiReturn); + apiReturn = gGetTcpTable(NULL, &dwSize, FALSE); + ok(apiReturn == ERROR_INSUFFICIENT_BUFFER || + broken(apiReturn == ERROR_NO_DATA), /* win95 */ + "GetTcpTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER\n", + apiReturn); + if (apiReturn == ERROR_INSUFFICIENT_BUFFER) { + PMIB_TCPTABLE buf = HeapAlloc(GetProcessHeap(), 0, dwSize); + + apiReturn = gGetTcpTable(buf, &dwSize, FALSE); + ok(apiReturn == NO_ERROR, + "GetTcpTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n", + apiReturn); + HeapFree(GetProcessHeap(), 0, buf); + } + } +} + +static void testGetUdpTable(void) +{ + if (gGetUdpTable) { + DWORD apiReturn; + ULONG dwSize = 0; + + apiReturn = gGetUdpTable(NULL, NULL, FALSE); + if (apiReturn == ERROR_NOT_SUPPORTED) { + skip("GetUdpTable is not supported\n"); + return; + } + ok(apiReturn == ERROR_INVALID_PARAMETER, + "GetUdpTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER\n", + apiReturn); + apiReturn = gGetUdpTable(NULL, &dwSize, FALSE); + ok(apiReturn == ERROR_INSUFFICIENT_BUFFER, + "GetUdpTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER\n", + apiReturn); + if (apiReturn != ERROR_INSUFFICIENT_BUFFER) { + PMIB_UDPTABLE buf = HeapAlloc(GetProcessHeap(), 0, dwSize); + + apiReturn = gGetUdpTable(buf, &dwSize, FALSE); + ok(apiReturn == NO_ERROR, + "GetUdpTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n", + apiReturn); + HeapFree(GetProcessHeap(), 0, buf); + } + } +} + +/* +still-to-be-tested NT4-onward functions: +CreateIpForwardEntry +DeleteIpForwardEntry +CreateIpNetEntry +DeleteIpNetEntry +GetFriendlyIfIndex +GetRTTAndHopCount +SetIfEntry +SetIpForwardEntry +SetIpNetEntry +SetIpStatistics +SetIpTTL +SetTcpEntry +*/ +static void testWinNT4Functions(void) +{ + testGetNumberOfInterfaces(); + testGetIpAddrTable(); + testGetIfTable(); + testGetIpForwardTable(); + testGetIpNetTable(); + testGetIcmpStatistics(); + testGetIpStatistics(); + testGetTcpStatistics(); + testGetUdpStatistics(); + testGetTcpTable(); + testGetUdpTable(); +} + +static void testGetInterfaceInfo(void) +{ + if (gGetInterfaceInfo) { + DWORD apiReturn; + ULONG len = 0; + + apiReturn = gGetInterfaceInfo(NULL, NULL); + if (apiReturn == ERROR_NOT_SUPPORTED) { + skip("GetInterfaceInfo is not supported\n"); + return; + } + ok(apiReturn == ERROR_INVALID_PARAMETER, + "GetInterfaceInfo returned %d, expected ERROR_INVALID_PARAMETER\n", + apiReturn); + apiReturn = gGetInterfaceInfo(NULL, &len); + ok(apiReturn == ERROR_INSUFFICIENT_BUFFER, + "GetInterfaceInfo returned %d, expected ERROR_INSUFFICIENT_BUFFER\n", + apiReturn); + if (apiReturn == ERROR_INSUFFICIENT_BUFFER) { + PIP_INTERFACE_INFO buf = HeapAlloc(GetProcessHeap(), 0, len); + + apiReturn = gGetInterfaceInfo(buf, &len); + ok(apiReturn == NO_ERROR, + "GetInterfaceInfo(buf, &dwSize) returned %d, expected NO_ERROR\n", + apiReturn); + HeapFree(GetProcessHeap(), 0, buf); + } + } +} + +static void testGetAdaptersInfo(void) +{ + if (gGetAdaptersInfo) { + DWORD apiReturn; + ULONG len = 0; + + apiReturn = gGetAdaptersInfo(NULL, NULL); + if (apiReturn == ERROR_NOT_SUPPORTED) { + skip("GetAdaptersInfo is not supported\n"); + return; + } + ok(apiReturn == ERROR_INVALID_PARAMETER, + "GetAdaptersInfo returned %d, expected ERROR_INVALID_PARAMETER\n", + apiReturn); + apiReturn = gGetAdaptersInfo(NULL, &len); + ok(apiReturn == ERROR_NO_DATA || apiReturn == ERROR_BUFFER_OVERFLOW, + "GetAdaptersInfo returned %d, expected ERROR_NO_DATA or ERROR_BUFFER_OVERFLOW\n", + apiReturn); + if (apiReturn == ERROR_NO_DATA) + ; /* no adapter's, that's okay */ + else if (apiReturn == ERROR_BUFFER_OVERFLOW) { + PIP_ADAPTER_INFO buf = HeapAlloc(GetProcessHeap(), 0, len); + + apiReturn = gGetAdaptersInfo(buf, &len); + ok(apiReturn == NO_ERROR, + "GetAdaptersInfo(buf, &dwSize) returned %d, expected NO_ERROR\n", + apiReturn); + HeapFree(GetProcessHeap(), 0, buf); + } + } +} + +static void testGetNetworkParams(void) +{ + if (gGetNetworkParams) { + DWORD apiReturn; + ULONG len = 0; + + apiReturn = gGetNetworkParams(NULL, NULL); + if (apiReturn == ERROR_NOT_SUPPORTED) { + skip("GetNetworkParams is not supported\n"); + return; + } + ok(apiReturn == ERROR_INVALID_PARAMETER, + "GetNetworkParams returned %d, expected ERROR_INVALID_PARAMETER\n", + apiReturn); + apiReturn = gGetNetworkParams(NULL, &len); + ok(apiReturn == ERROR_BUFFER_OVERFLOW, + "GetNetworkParams returned %d, expected ERROR_BUFFER_OVERFLOW\n", + apiReturn); + if (apiReturn == ERROR_BUFFER_OVERFLOW) { + PFIXED_INFO buf = HeapAlloc(GetProcessHeap(), 0, len); + + apiReturn = gGetNetworkParams(buf, &len); + ok(apiReturn == NO_ERROR, + "GetNetworkParams(buf, &dwSize) returned %d, expected NO_ERROR\n", + apiReturn); + HeapFree(GetProcessHeap(), 0, buf); + } + } +} + +/* +still-to-be-tested 98-onward functions: +GetBestInterface +GetBestRoute +IpReleaseAddress +IpRenewAddress +*/ +static void testWin98Functions(void) +{ + testGetInterfaceInfo(); + testGetAdaptersInfo(); + testGetNetworkParams(); +} + +static void testGetPerAdapterInfo(void) +{ + DWORD ret, needed; + void *buffer; + + if (!gGetPerAdapterInfo) return; + ret = gGetPerAdapterInfo(1, NULL, NULL); + if (ret == ERROR_NOT_SUPPORTED) { + skip("GetPerAdapterInfo is not supported\n"); + return; + } + ok( ret == ERROR_INVALID_PARAMETER, "got %u instead of ERROR_INVALID_PARAMETER\n", ret ); + needed = 0xdeadbeef; + ret = gGetPerAdapterInfo(1, NULL, &needed); + if (ret == ERROR_NO_DATA) return; /* no such adapter */ + ok( ret == ERROR_BUFFER_OVERFLOW, "got %u instead of ERROR_BUFFER_OVERFLOW\n", ret ); + ok( needed != 0xdeadbeef, "needed not set\n" ); + buffer = HeapAlloc( GetProcessHeap(), 0, needed ); + ret = gGetPerAdapterInfo(1, buffer, &needed); + ok( ret == NO_ERROR, "got %u instead of NO_ERROR\n", ret ); + HeapFree( GetProcessHeap(), 0, buffer ); +} + +/* +still-to-be-tested 2K-onward functions: +AddIPAddress +CreateProxyArpEntry +DeleteIPAddress +DeleteProxyArpEntry +EnableRouter +FlushIpNetTable +GetAdapterIndex +NotifyAddrChange +NotifyRouteChange +SendARP +UnenableRouter +*/ +static void testWin2KFunctions(void) +{ + testGetPerAdapterInfo(); +} + +START_TEST(iphlpapi) +{ + + loadIPHlpApi(); + if (hLibrary) { + testWin98OnlyFunctions(); + testWinNT4Functions(); + testWin98Functions(); + testWin2KFunctions(); + freeIPHlpApi(); + } +} Propchange: trunk/rostests/winetests/iphlpapi/iphlpapi.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/winetests/iphlpapi/iphlpapi.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/iphlpapi/iphlpa…
============================================================================== --- trunk/rostests/winetests/iphlpapi/iphlpapi.rbuild (added) +++ trunk/rostests/winetests/iphlpapi/iphlpapi.rbuild [iso-8859-1] Tue Dec 30 03:10:17 2008 @@ -1,0 +1,13 @@ +<?xml version="1.0"?> +<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> +<group> +<module name="iphlpapi_winetest" type="win32cui" installbase="bin" installname="iphlpapi_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> + <include base="iphlpapi_winetest">.</include> + <file>iphlpapi.c</file> + <file>testlist.c</file> + <library>wine</library> + <library>kernel32</library> + <library>ntdll</library> +</module> +</group> Propchange: trunk/rostests/winetests/iphlpapi/iphlpapi.rbuild ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/winetests/iphlpapi/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/iphlpapi/testli…
============================================================================== --- trunk/rostests/winetests/iphlpapi/testlist.c (added) +++ trunk/rostests/winetests/iphlpapi/testlist.c [iso-8859-1] Tue Dec 30 03:10:17 2008 @@ -1,0 +1,15 @@ +/* Automatically generated file; DO NOT EDIT!! */ + +#define WIN32_LEAN_AND_MEAN +#include <windows.h> + +#define STANDALONE +#include "wine/test.h" + +extern void func_iphlpapi(void); + +const struct test winetest_testlist[] = +{ + { "iphlpapi", func_iphlpapi }, + { 0, 0 } +}; Propchange: trunk/rostests/winetests/iphlpapi/testlist.c ------------------------------------------------------------------------------ svn:eol-style = native
15 years, 12 months
1
0
0
0
[cwittich] 38465: add ws2_32_winetest to bootcd
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Dec 30 03:04:34 2008 New Revision: 38465 URL:
http://svn.reactos.org/svn/reactos?rev=38465&view=rev
Log: add ws2_32_winetest to bootcd Modified: trunk/reactos/boot/bootdata/packages/reactos.dff Modified: trunk/reactos/boot/bootdata/packages/reactos.dff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/packages/rea…
============================================================================== --- trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] Tue Dec 30 03:04:34 2008 @@ -664,6 +664,7 @@ modules\rostests\winetests\winhttp\winhttp_winetest.exe 7 optional modules\rostests\winetests\wininet\wininet_winetest.exe 7 optional modules\rostests\winetests\wintrust\wintrust_winetest.exe 7 optional +modules\rostests\winetests\ws2_32\ws2_32_winetest.exe 7 optional modules\wallpaper\lake.bmp 4 optional ; Native libraries
15 years, 12 months
1
0
0
0
← Newer
1
2
3
4
5
6
...
71
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Results per page:
10
25
50
100
200