这个问题是由于platform sdk没有装好的原因,现在我碰到以下问题。
在调用GetIpForwardTable (),GetIpAddrTable ()等函数时,报以下错误,不知是何原因?
“指定的服务并未以已安装的服务存在”

解决方案 »

  1.   

    有没有加入iphlpapi.lib,试一下把#include "iphlpapi.h"放在你的.cpp中,不要放在.h中,我使用Agent时就遇到过,放到.h不行,但放到.cpp就可以。
      

  2.   

    The GetIpForwardTable function retrieves the IP routing table.DWORD GetIpForwardTable(
      PMIB_IPFORWARDTABLE pIpForwardTable,  // buffer for routing table
      PULONG pdwSize,                       // size of buffer
      BOOL bOrder                           // sort the table
    );
    Parameters
    pIpForwardTable 
    [out] Pointer to a buffer that receives the IP routing table as a MIB_IPFORWARDTABLE structure. 
    pdwSize 
    [in, out] On input, specifies the size of the buffer pointed to by the pIpForwardTable parameter. 
    On output, if the buffer is not large enough to hold the returned routing table, the function sets this parameter equal to the required buffer size. bOrder 
    [in] Specifies whether the returned table should be sorted. If this parameter is TRUE, the table is sorted in the order of: 
    Destination address 
    Protocol that generated the route 
    Multipath routing policy 
    Next-hop address 
    Return Values
    If the function succeeds, the return value is NO_ERROR.If the function fails, use FormatMessage to obtain the message string for the returned error.
      

  3.   

    MSDN的帮助我当然知道了!!问题是为什么会提示:“指定的服务并未以已安装的服务存在”
    ??