public abstract class Rasapi32Util extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Rasapi32Util.Ras32Exception
Exceptions
|
Modifier and Type | Field and Description |
---|---|
static Map |
CONNECTION_STATE_TEXT |
Constructor and Description |
---|
Rasapi32Util() |
Modifier and Type | Method and Description |
---|---|
static WinNT.HANDLE |
dialEntry(String entryName)
Dial a phone book entry by name (Synchronously)
|
static WinNT.HANDLE |
dialEntry(String entryName,
WinRas.RasDialFunc2 func2)
Dial a phone book entry by name (Asynchronously - callback type 2)
|
static WinRas.RASPPPIP |
getIPProjection(WinNT.HANDLE hrasConn)
Get the connection's IP projection
|
static WinRas.RASDIALPARAMS |
getPhoneBookDialingParams(String entryName)
get a phone book entry's dialing parameters
|
static WinRas.RASENTRY.ByReference |
getPhoneBookEntry(String entryName)
Return the phone book entry.
|
static WinNT.HANDLE |
getRasConnection(String connName)
Return a RAS connection by name
|
static String |
getRasConnectionStatusText(int connStatus)
Translate the connection status value to text
|
static String |
getRasErrorString(int code)
Get the RAS error description
|
static void |
hangupRasConnection(String connName)
Hangup a connection by name
|
static void |
hangupRasConnection(WinNT.HANDLE hrasConn)
Hangup a connection
|
static void |
setPhoneBookEntry(String entryName,
WinRas.RASENTRY.ByReference rasEntry)
Set a phone book entry
|
public static final Map CONNECTION_STATE_TEXT
public static String getRasErrorString(int code)
code
- the error codepublic static String getRasConnectionStatusText(int connStatus)
connStatus
- the connection statuspublic static WinNT.HANDLE getRasConnection(String connName) throws Rasapi32Util.Ras32Exception
connName
- the connection nameRasapi32Util.Ras32Exception
- errorspublic static void hangupRasConnection(String connName) throws Rasapi32Util.Ras32Exception
connName
- the connection nameRasapi32Util.Ras32Exception
- errorspublic static void hangupRasConnection(WinNT.HANDLE hrasConn) throws Rasapi32Util.Ras32Exception
hrasConn
- the connectionRasapi32Util.Ras32Exception
- errorspublic static WinRas.RASPPPIP getIPProjection(WinNT.HANDLE hrasConn) throws Rasapi32Util.Ras32Exception
hrasConn
- the RAS connection handleRasapi32Util.Ras32Exception
- errorspublic static WinRas.RASENTRY.ByReference getPhoneBookEntry(String entryName) throws Rasapi32Util.Ras32Exception
entryName
- the entry nameRasapi32Util.Ras32Exception
- any errorspublic static void setPhoneBookEntry(String entryName, WinRas.RASENTRY.ByReference rasEntry) throws Rasapi32Util.Ras32Exception
entryName
- the phone book entry namerasEntry
- the entry parametersRasapi32Util.Ras32Exception
- errorspublic static WinRas.RASDIALPARAMS getPhoneBookDialingParams(String entryName) throws Rasapi32Util.Ras32Exception
entryName
- the phone book entry nameRasapi32Util.Ras32Exception
- errorspublic static WinNT.HANDLE dialEntry(String entryName) throws Rasapi32Util.Ras32Exception
entryName
- The phone book entry nameRasapi32Util.Ras32Exception
- errorspublic static WinNT.HANDLE dialEntry(String entryName, WinRas.RasDialFunc2 func2) throws Rasapi32Util.Ras32Exception
entryName
- The phone book entry namefunc2
- Rasapi32Util.Ras32Exception
- errors