0

I am trying to install an application which uses the API GetIPAddrfromTable stack. When I start up the application, I get the error "Procedure entry point not found in IPHLPAPI.dll"

I noticed that the dll file was quite old, so I tried replacing it, but Windows server 2008 doesn't let anyone copy any files to the system32 folder, even if you are administrator.

I tried to run sfc, and it updated the IPHLPAPI.DLL, and I tried to register the new DLL, but I get the error saying "The module iphlpapi.dll was loaded but the entry point DLLRegisterServer was not found. Make sure it is a valid DLL or OCX file".

I tried searching for the error messages, and they say something about using regasm, but I get the error "Error RA0000 : Failed to load because it is not a valid .NET assembly"

Is this a k

roymustang86
  • 8,054
  • 22
  • 70
  • 101

1 Answers1

1

There is no such function, GetIpAddrTable() is the closest match. Do not replace DLLs in c:\windows\system32, this can greatly destabilize Windows, assuming it would let you. Iphlpapi.dll is a native DLL. It cannot be registered with Regsvr32, it is not a COM component. Nor can you use Regasm.exe, it is not a .NET assembly.

I have to guess that your [DllImport] declaration is simply wrong. Consider using this one.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
  • Yes, I just had to copy the IPHLAPI.dll from another computer to the directory where the application was running from. – roymustang86 Jul 11 '11 at 15:50