Results 1 to 2 of 2

Thread: Enumerating Network Resources....

  1. #1
    Guest
    Hi,

    I'm looking for a way to enumerate a local PCs NIC, IP Address and Sub-Net Mask, for each given NIC installed in the machine.

    For example, a laptop can have an IP Address assigned to a NIC in its docking-station as well as having one assigned to a PCMCIA card.

    The problem is that the IP Addresses may not always be bound to the card at program run-time. Presumably, I need to be looking at various Registry entries (which ones?) or the NetAPI.

    The end result is that data obtained will be inserted into a Word document (using Form-Fields).

    Any suggestions greatfully received.

    RM.

  2. #2
    Lively Member
    Join Date
    Aug 2000
    Location
    quebec
    Posts
    81

    Cool

    I suggest you take a good look at WMI (SDK free from MS) which has tons of features. It has excellent and simple to code
    networking functionalities.

    You might try using the Win32_NetworkAdapterConfiguration class for retreiving the kinds of information you're
    looking for. The above mentioned class can return all of what you need ( pretty sure anyway )

    The IPSubnet property contains an array (string) of "all subnet masks associated with the current network adapter".

    The IPAddress property contains like above but IP addresses.

    DefaultIPGateway contains a "list of IP addresses of default gateways used by the computer system."

    etc.

    I'm sure WMI has the functionalities you need.

    [Edited by hitcgar on 09-14-2000 at 07:35 PM]
    C/C++,Delphi,VB6,Java,PB (blech!),ASP,JSP,SQL...bla bla bla and bla
    I love deadlines. I like the whooshing sound they make as they fly by.
    —Douglas Adams

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width