Author: cwittich Date: Sun Sep 14 01:13:20 2008 New Revision: 36218
URL: http://svn.reactos.org/svn/reactos?rev=36218&view=rev Log: sync inetmib1 with wine 1.1.4
Modified: trunk/reactos/dll/win32/inetmib1/main.c
Modified: trunk/reactos/dll/win32/inetmib1/main.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inetmib1/main.c?r... ============================================================================== --- trunk/reactos/dll/win32/inetmib1/main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/inetmib1/main.c [iso-8859-1] Sun Sep 14 01:13:20 2008 @@ -107,9 +107,12 @@
if (ret == ERROR_INSUFFICIENT_BUFFER) { - ifTable = HeapAlloc(GetProcessHeap(), 0, size); - if (ifTable) - GetIfTable(ifTable, &size, FALSE); + MIB_IFTABLE *table = HeapAlloc(GetProcessHeap(), 0, size); + if (table) + { + if (!GetIfTable(table, &size, FALSE)) ifTable = table; + else HeapFree(GetProcessHeap(), 0, table ); + } } }
@@ -633,9 +636,12 @@
if (ret == ERROR_INSUFFICIENT_BUFFER) { - ipAddrTable = HeapAlloc(GetProcessHeap(), 0, size); - if (ipAddrTable) - GetIpAddrTable(ipAddrTable, &size, TRUE); + MIB_IPADDRTABLE *table = HeapAlloc(GetProcessHeap(), 0, size); + if (table) + { + if (!GetIpAddrTable(table, &size, TRUE)) ipAddrTable = table; + else HeapFree(GetProcessHeap(), 0, table ); + } } }
@@ -721,9 +727,12 @@
if (ret == ERROR_INSUFFICIENT_BUFFER) { - ipRouteTable = HeapAlloc(GetProcessHeap(), 0, size); - if (ipRouteTable) - GetIpForwardTable(ipRouteTable, &size, TRUE); + MIB_IPFORWARDTABLE *table = HeapAlloc(GetProcessHeap(), 0, size); + if (table) + { + if (!GetIpForwardTable(table, &size, TRUE)) ipRouteTable = table; + else HeapFree(GetProcessHeap(), 0, table ); + } } }
@@ -801,9 +810,12 @@
if (ret == ERROR_INSUFFICIENT_BUFFER) { - ipNetTable = HeapAlloc(GetProcessHeap(), 0, size); - if (ipNetTable) - GetIpNetTable(ipNetTable, &size, FALSE); + MIB_IPNETTABLE *table = HeapAlloc(GetProcessHeap(), 0, size); + if (table) + { + if (!GetIpNetTable(table, &size, FALSE)) ipNetTable = table; + else HeapFree(GetProcessHeap(), 0, table ); + } } }
@@ -1047,9 +1059,12 @@
if (ret == ERROR_INSUFFICIENT_BUFFER) { - udpTable = HeapAlloc(GetProcessHeap(), 0, size); - if (udpTable) - GetUdpTable(udpTable, &size, TRUE); + MIB_UDPTABLE *table = HeapAlloc(GetProcessHeap(), 0, size); + if (table) + { + if (!GetUdpTable(table, &size, TRUE)) udpTable = table; + else HeapFree(GetProcessHeap(), 0, table); + } } }
@@ -1154,6 +1169,9 @@ }; static UINT minSupportedIDLength;
+/***************************************************************************** + * SnmpExtensionInit [INETMIB1.@] + */ BOOL WINAPI SnmpExtensionInit(DWORD dwUptimeReference, HANDLE *phSubagentTrapEvent, AsnObjectIdentifier *pFirstSupportedRegion) { @@ -1213,6 +1231,9 @@ return impl; }
+/***************************************************************************** + * SnmpExtensionQuery [INETMIB1.@] + */ BOOL WINAPI SnmpExtensionQuery(BYTE bPduType, SnmpVarBindList *pVarBindList, AsnInteger32 *pErrorStatus, AsnInteger32 *pErrorIndex) { @@ -1282,6 +1303,9 @@ return TRUE; }
+/***************************************************************************** + * DllMain [INETMIB1.@] + */ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);