use of com.sun.jna.platform.win32.WinRas.RASPPPIP in project jna by java-native-access.
the class Rasapi32Util method getIPProjection.
/**
* Get the connection's IP projection
* @param hrasConn the RAS connection handle
* @return the IP projection
* @throws Ras32Exception errors
*/
public static RASPPPIP getIPProjection(HANDLE hrasConn) throws Ras32Exception {
RASPPPIP pppIpProjection = new RASPPPIP();
IntByReference lpcb = new IntByReference(pppIpProjection.size());
pppIpProjection.write();
int err = Rasapi32.INSTANCE.RasGetProjectionInfo(hrasConn, RASP_PppIp, pppIpProjection.getPointer(), lpcb);
if (err != WinError.ERROR_SUCCESS)
throw new Ras32Exception(err);
pppIpProjection.read();
return pppIpProjection;
}
Aggregations