com.sun.jna.platform.win32

## Class Rasapi32Util

- java.lang.Object
- - com.sun.jna.platform.win32.Rasapi32Util

-     public abstract class Rasapi32Util
      extends java.lang.Object

  Rasapi32 utility API.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Rasapi32Util.Ras32Exception` Exceptions

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.util.Map` | `CONNECTION_STATE_TEXT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Rasapi32Util()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static WinNT.HANDLE` | `dialEntry(java.lang.String entryName)` Dial a phone book entry by name (Synchronously)
    `static WinNT.HANDLE` | `dialEntry(java.lang.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(java.lang.String entryName)` get a phone book entry's dialing parameters
    `static WinRas.RASENTRY.ByReference` | `getPhoneBookEntry(java.lang.String entryName)` Return the phone book entry.
    `static WinNT.HANDLE` | `getRasConnection(java.lang.String connName)` Return a RAS connection by name
    `static java.lang.String` | `getRasConnectionStatusText(int connStatus)` Translate the connection status value to text
    `static java.lang.String` | `getRasErrorString(int code)` Get the RAS error description
    `static void` | `hangupRasConnection(java.lang.String connName)` Hangup a connection by name
    `static void` | `hangupRasConnection(WinNT.HANDLE hrasConn)` Hangup a connection
    `static void` | `setPhoneBookEntry(java.lang.String entryName, WinRas.RASENTRY.ByReference rasEntry)` Set a phone book entry

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### CONNECTION_STATE_TEXT

          public static final java.util.Map CONNECTION_STATE_TEXT

  - ### Constructor Detail

    - #### Rasapi32Util

          public Rasapi32Util()

  - ### Method Detail

    - #### getRasErrorString

          public static java.lang.String getRasErrorString(int code)

      Get the RAS error description
      Parameters:
        `code` - the error code
      Returns:
        the RAS description

    - #### getRasConnectionStatusText

          public static java.lang.String getRasConnectionStatusText(int connStatus)

      Translate the connection status value to text
      Parameters:
        `connStatus` - the connection status
      Returns:
        the descriptive text

    - #### getRasConnection

          public static WinNT.HANDLE getRasConnection(java.lang.String connName)
                                               throws Rasapi32Util.Ras32Exception

      Return a RAS connection by name
      Parameters:
        `connName` - the connection name
      Returns:
        the RAS connection structure
      Throws:
        `Rasapi32Util.Ras32Exception` - errors

    - #### hangupRasConnection

          public static void hangupRasConnection(java.lang.String connName)
                                          throws Rasapi32Util.Ras32Exception

      Hangup a connection by name
      Parameters:
        `connName` - the connection name
      Throws:
        `Rasapi32Util.Ras32Exception` - errors

    - #### hangupRasConnection

          public static void hangupRasConnection(WinNT.HANDLE hrasConn)
                                          throws Rasapi32Util.Ras32Exception

      Hangup a connection
      Parameters:
        `hrasConn` - the connection
      Throws:
        `Rasapi32Util.Ras32Exception` - errors

    - #### getIPProjection

          public static WinRas.RASPPPIP getIPProjection(WinNT.HANDLE hrasConn)
                                                 throws Rasapi32Util.Ras32Exception

      Get the connection's IP projection
      Parameters:
        `hrasConn` - the RAS connection handle
      Returns:
        the IP projection
      Throws:
        `Rasapi32Util.Ras32Exception` - errors

    - #### getPhoneBookEntry

          public static WinRas.RASENTRY.ByReference getPhoneBookEntry(java.lang.String entryName)
                                                               throws Rasapi32Util.Ras32Exception

      Return the phone book entry.
      Parameters:
        `entryName` - the entry name
      Returns:
        the RAS entry
      Throws:
        `Rasapi32Util.Ras32Exception` - any errors

    - #### setPhoneBookEntry

          public static void setPhoneBookEntry(java.lang.String entryName,
                               WinRas.RASENTRY.ByReference rasEntry)
                                        throws Rasapi32Util.Ras32Exception

      Set a phone book entry
      Parameters:
        `entryName` - the phone book entry name
        `rasEntry` - the entry parameters
      Throws:
        `Rasapi32Util.Ras32Exception` - errors

    - #### getPhoneBookDialingParams

          public static WinRas.RASDIALPARAMS getPhoneBookDialingParams(java.lang.String entryName)
                                                                throws Rasapi32Util.Ras32Exception

      get a phone book entry's dialing parameters
      Parameters:
        `entryName` - the phone book entry name
      Returns:
        the entry's dialing parameters parameters
      Throws:
        `Rasapi32Util.Ras32Exception` - errors

    - #### dialEntry

          public static WinNT.HANDLE dialEntry(java.lang.String entryName)
                                        throws Rasapi32Util.Ras32Exception

      Dial a phone book entry by name (Synchronously)
      Parameters:
        `entryName` - The phone book entry name
      Returns:
        result reference
      Throws:
        `Rasapi32Util.Ras32Exception` - errors

    - #### dialEntry

          public static WinNT.HANDLE dialEntry(java.lang.String entryName,
                               WinRas.RasDialFunc2 func2)
                                        throws Rasapi32Util.Ras32Exception

      Dial a phone book entry by name (Asynchronously - callback type 2)
      Parameters:
        `entryName` - The phone book entry name
        `func2` -
      Returns:
        the HRASCONN for this connection
      Throws:
        `Rasapi32Util.Ras32Exception` - errors

Copyright © 2007-2016 Timothy Wall. All Rights Reserved.