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 -----------------------------------------------------------------------