Announcement

Collapse
No announcement yet.

Has the Win32api set been updated ....

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • StanHelton
    replied
    Originally posted by Pierre Bellisle View Post
    Stan,

    If any interest in code that work with IP_ADAPTER_INFO
    then you may have a look at the AdaptersInfoGet function...

    http://www.powerbasic.com/support/pb...ad.php?t=29789

    Thank you, Pierre. That code of yours has everything I could possible want in it. And it is much cleaner code that what I've been writing. Thanks.

    Stan

    Leave a comment:


  • Pierre Bellisle
    replied
    Stan,

    If any interest in code that work with IP_ADAPTER_INFO
    then you may have a look at the AdaptersInfoGet function...

    Leave a comment:


  • StanHelton
    replied
    doh! :lam:

    Thank you.

    Leave a comment:


  • Michael Mattias
    replied
    Because the 'address' member is a subscripted table, you have to refer to a specific occurence....

    Code:
      something = TRIM$(STR$(AdapInfo.Address[b](subscript)[/b]))

    Leave a comment:


  • StanHelton
    started a topic Has the Win32api set been updated ....

    Has the Win32api set been updated ....

    since Jan, 2005? That's the date on the one I'm using and the one in the downloads section of the PB site.

    I'm having a little trouble with a call that uses the IP_ADAPTER_INFO type from IpHlpApi.inc.

    Specifically:

    Code:
    LOCAL AdapInfo AS IP_ADAPTER_INFO
    Used in:

    Code:
    TRIM$(STR$(AdapInfo.Address))
    gives "invalid member/name" on "AdapInfo.Address"

    The api defines the type:

    Code:
    TYPE IP_ADAPTER_INFO
        pNext AS IP_ADAPTER_INFO PTR
        ComboIndex AS DWORD
        AdapterName AS STRING * (%MAX_ADAPTER_NAME_LENGTH + 4)
        Description AS STRING * (%MAX_ADAPTER_DESCRIPTION_LENGTH + 4)
        AddressLength AS DWORD
        Address(0 TO %MAX_ADAPTER_ADDRESS_LENGTH - 1) AS BYTE  'this is the offending member/name
        Index AS DWORD
        uType AS DWORD
        DhcpEnabled AS DWORD
        CurrentIpAddress AS IP_ADDR_STRING PTR
        IpAddressList AS IP_ADDR_STRING
        GatewayList AS IP_ADDR_STRING
        DhcpServer AS IP_ADDR_STRING
        HaveWins AS LONG
        PrimaryWinsServer AS IP_ADDR_STRING
        SecondaryWinsServer AS IP_ADDR_STRING
        LeaseObtained AS LONG
        LeaseExpires AS LONG
    END TYPE
Working...
X