About tow IP Helper Functions

  • Thread starter Thread starter Jonson
  • Start date Start date
J

Jonson

In windows XP Pro sp1,the code as follow:

DWORD dwRet;
IP_ADAPTER_INFO adapterInfo;
ULONG ulSize = sizeof(IP_ADAPTER_INFO);
dwRet = GetAdaptersInfo(&adapterInfo,&ulSize);
if (dwRet == ERROR_SUCCESS)
{
USES_CONVERSION;
dwRet = GetAdapterIndex(A2W
(adapterInfo.AdapterName),&m_ulIfIndex);
if (dwRet != NO_ERROR)
TraceErrorMsg(dwRet);
else
{
unsigned long ulNTEContext, ulNTEInstance;
dwRet = AddIPAddress(0xDC702AD5, 0xFFFFFF00,
m_ulIfIndex, &ulNTEContext, &ulNTEInstance);
if (dwRet != NO_ERROR)
TraceErrorMsg(dwRet);
}
}
else
TraceErrorMsg(dwRet);
---------------------------------------------------------
Calling the GetAdapterIndex function always returns error
(error code = 55:The specified network resource or device
is no longer available);
and calling AddIPAddress function always returns error
(error code = 87:The parameter is incorrect).

why? Is the system's bug? If it is,which patch I must
update.Thanks for any advice!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top