C# Wrapper – Not able to get network adapters.

Home Forums Discussions Support C# Wrapper – Not able to get network adapters.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #11495
    VirtualSmile
    Participant

      Hello! Just been messing around with the C# .NET Wrapper on Github but am experiencing problems with getting any network adapters.

      var filter = NdisApi.Open();
      Console.Write("Loaded NDIS Driver Version: " + filter.GetVersion());
      var adapters = filter.GetNetworkAdapters();
      

      Returns no network adapters. Do you know what could be causing this? The driver is loading fine (3.2.28.1).

      Thanks!

      #11498
      VirtualSmile
      Participant

        Looks like upon further inspection, the Driver is failing to load. Is it because the driver name or the way the driver is loaded has changed?

        public static NdisApi Open(string driverName = "NDISRD")
                {
                    if (!NdisApiDllExists())
                        throw new Exception("Missing NDIS DLL");
        
                    var driverNameBytes = Encoding.GetEncoding("ISO-8859-1").GetBytes(driverName);
                    var handle = Native.NdisApi.OpenFilterDriver(driverNameBytes);
                    return new NdisApi(handle, driverNameBytes);
                }

        I.e the above is out of date?

        #11508
        VirtualSmile
        Participant

          Anyone have any idea?

        Viewing 3 posts - 1 through 3 (of 3 total)
        • You must be logged in to reply to this topic.