Announcement

Collapse
No announcement yet.

host addr revisited

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

  • Tom Hanlin
    replied
    Glad to be of service.

    ------------------
    Tom Hanlin
    PowerBASIC Staff

    Leave a comment:


  • Adrian C Aitken
    replied
    And as if by magic, downloaded the latest winapi.zip and there it is !! Thanks PB

    Adrian

    ------------------

    Leave a comment:


  • Adrian C Aitken
    replied
    Thanks Per, now to try and translate that to English (or at least PowerBasic !!)

    Adrian

    ------------------

    Leave a comment:


  • Per Fimmeland
    replied
    Hi,
    The GetIpForwardTable funct is found in iphlpapi.dll

    from MSDN :

    GetIpForwardTable
    [This is preliminary documentation and subject to change.]

    The GetIpForwardTable function retrieves the IP routing table.

    DWORD GetIpForwardTable (
    PMIB_IPFORWARDTABLE pIpForwardTable, // buffer for routing table
    PULONG pdwSize, // size of buffer
    BOOL bOrder // sort the table?
    );

    Parameters
    pIpForwardTable
    Pointer to a buffer that, on successful return, contains the IP routing table as a
    MIB_IPFORWARDTABLE structure.
    pdwSize
    Specifies the size of the buffer pointed to by the pIpForwardTable parameter.
    If the buffer is not large enough to hold the returned routing table, the function
    sets this parameter equal to the required buffer size.
    bOrder
    Specifies whether the returned table should be sorted.
    If this parameter is TRUE, the table is sorted by:
    1. Destination address
    2. Protocol that generated the route
    3. Multipath routing policy
    4. Next-hop address
    in that order.

    Return Values
    If the function succeeds, the return value is NO_ERROR.

    If the function fails, use FormatMessage to obtain the message string for the returned error.

    QuickInfo
    Windows NT: Requires version 4.0 SP4 or later.
    Windows: Requires Windows 98 or later.
    Windows CE: Unsupported.
    Header: Declared in iphlpapi.h.
    Import Library: Use iphlpapi.lib.

    See Also
    MIB_IPFORWARDTABLE
    -per


    ------------------

    Leave a comment:


  • Adrian C Aitken
    replied
    At Microsofts MSDN center they give a C program snippet to get (and change ) the default gateway @ http://msdn.microsoft.com/library/de...iphelp_14.asp.
    However to me it seems to want the function 'GetIpForwardTable' which I can't find in wsock32.inc or win32api.inc. Does anyone know how to get this fucntion ?

    Regards
    Adrian

    ------------------

    Leave a comment:


  • Adrian C Aitken
    replied
    Scott - yep, thats the hard way !!! Also it'll pop up a black box in the middle of the screen.
    Lance - thanks, I've got the subnet mask but the data it returns doesn't give the gateway but it does look promising.

    Adrian

    ------------------

    Leave a comment:


  • Lance Edmonds
    replied
    a search of the bbs for "subnet" gives me http://www.powerbasic.com/support/pb...ad.php?t=24848 - it may do what you want?


    ------------------
    lance
    powerbasic support
    mailto:[email protected][email protected]</a>

    Leave a comment:


  • Scott Turchin
    replied
    You could always shell to a cmd.exe and run "ipconfig /all" and screen scrape all the data off, tons of it in there...

    That's the hard way I'm sure...



    ------------------
    Scott

    Leave a comment:


  • Adrian C Aitken
    started a topic host addr revisited

    host addr revisited

    Hi all, in the past there's been alot of posts regarding getting the computers IP address (or addresses). For your next challenge , how could I get the subnet mask and default gateway settings for the respective IP addresses?
    For the purpose of this post , I'm using Windows 2000.

    Any help most gratefully received.

    Adrian


    ------------------
Working...
X
😀
🥰
🤢
😎
😡
👍
👎