all groups > vj# > july 2004 >
You're in the

vj#

group:

problem with GetIpForwardTable func


problem with GetIpForwardTable func Root
7/11/2004 12:23:49 PM
vj#:

/**@dll.import("Iphlpapi")*/
*public static native int *GetIpForwardTable(int p1, int p2, boolea
p3);
That declaration is right?
And *p1* must return pointer to struct MIB_IPFORWARDTABLE, but i
doesn't work. *p1* still 0 (null)

//Declare MIB_IPFORWARDROW scruct

/**@dll.struct()*/
class MIB_IPFORWARDROW
{
public int dwForwardDest; // IP addr of destination
public int dwForwardMask; // subnetwork mask of destination
public int dwForwardPolicy; // conditions for multi-path route
public int dwForwardNextHop; // IP address of next hop
public int dwForwardIfIndex; // index of interface
public int dwForwardType; // route type
public int dwForwardProto; // protocol that generated route
public int dwForwardAge; // age of route
public int dwForwardNextHopAS; // autonomous system number
// of next hop
public int dwForwardMetric1; // protocol-specific metric
public int dwForwardMetric2; // protocol-specific metric
public int dwForwardMetric3; // protocol-specific metric
public int dwForwardMetric4; // protocol-specific metric
public int dwForwardMetric5; // protocol-specific metric

}

Now, how to declare MIB_IPFORWARDTABLE struct???

/**@dll.struct()*/
class MIB_IPFORWARDTABLE
{
public int dwNumEntries; // number of entries in the table
public int tables[]; // pointer array of route entries
}

sorry for bad english :


-
Roo
-----------------------------------------------------------------------
Posted via http://www.codecomments.co
-----------------------------------------------------------------------
Re: problem with GetIpForwardTable func Lars-Inge Tønnessen
7/11/2004 11:09:18 PM

/**@dll.import("Iphlpapi")*/

I think this line possibly should be:
/**@dll.import("Iphlpapi.dll")*/

I didn't look up the function, but test this first.... =:)


Regards,
Lars-Inge Tønnessen

AddThis Social Bookmark Button