Results 1 to 3 of 3

Thread: Automatically start scanning on inSSIDer startup

  1. #1
    Join Date
    Mar 2012
    Posts
    8

    Default Automatically start scanning on inSSIDer startup

    Hi all,

    How is the default interface to start scanning is persisted?
    I need to specify an interface, so that the program would automatically start scanning.
    I've found the code that does that:

    Code:

    NetworkInterface netInterface = InterfaceManager.Instance.LastInterface;
    if (netInterface != null)
    {
    Debug.WriteLine("We have a last interface, start scanning with it.");
    //Set the interface
    scanner.Interface = netInterface;
    if (Settings.Default.scanLastEnabled)
    scanner.StartScanning();
    }

    But where was that "LastInterface" saved?
    How do I specify my own?

    Any help is appreciated,

    Thank you,

    Gene

  2. #2
    Join Date
    Sep 2011
    Location
    Boise, ID
    Posts
    190

    Default

    Gene,

    Tyler answered this for you on the other thread, you might not have saw it because it went onto a new page

    Quote Originally Posted by Tyler View Post
    Yeah, I may just answer

    Gene,

    The InterfaceManager.LastInterface is saved in the ScanController.Interface property setter. The LastInterface property takes the last saved interface ID and tries to find the matching NetworkInterface object.
    As for setting one yourself, well, are you trying to hard-code in an interface to scan with? If so, you could set netInterface to the network interface you want to use (you can get a list of interfaces from NetworkInterface.GetAllNetworkInterfaces())

  3. #3
    Join Date
    Mar 2012
    Posts
    8

    Default

    Thank you, looks like I will have to do just that.

Bookmarks

Posting Permissions

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