P
Polaris
Hi Experts:
I have a question about GetIpForwardTable():
I use the call below to get the required table size first:
ULONG dwSize = 0;
DWORD ret = GetIpForwardTable (NULL, &dwSize, TRUE);
The return value is ERROR_INSUFFICIENT_BUFFER as expected, the dwSize looks
fine.
Then I call it again to get the actual table:
MIB_IPFORWARDTABLE *pTable = (PMIB_IPFORWARDTABLE) malloc (dwSize);
ret = GetIpForwardTable (pTable, &dwSize, TRUE);
But the 2nd call above returns 234 (More data is available).
Just wondering, the first call returned the required table size already, why
the 2nd call indicate that the dwSize is too small?
Thanks in advance !
Polaris
I have a question about GetIpForwardTable():
I use the call below to get the required table size first:
ULONG dwSize = 0;
DWORD ret = GetIpForwardTable (NULL, &dwSize, TRUE);
The return value is ERROR_INSUFFICIENT_BUFFER as expected, the dwSize looks
fine.
Then I call it again to get the actual table:
MIB_IPFORWARDTABLE *pTable = (PMIB_IPFORWARDTABLE) malloc (dwSize);
ret = GetIpForwardTable (pTable, &dwSize, TRUE);
But the 2nd call above returns 234 (More data is available).
Just wondering, the first call returned the required table size already, why
the 2nd call indicate that the dwSize is too small?
Thanks in advance !
Polaris