Error running sample program

Home Forums Discussions Support Error running sample program

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #13905
    cjw94022
    Participant

      I am evaluating your ndisapi, when I build your listadapters C# sample code using VS2019, it compiles okay. However, when I go to run it on my 2003 Server, I get the following error

      C:\Documents and Settings\Administrator>listadapters
      System.BadImageFormatException: An attempt was made to load a program with an in
      correct format. (Exception from HRESULT: 0x8007000B)
      at NdisApiWrapper.Ndisapi.OpenFilterDriver(Byte[] pszFileName)
      at NdisApiWrapper.Ndisapi.OpenFilterDriver(String fileName)
      at ListAdapters.Program.Main()

      This happens with other sample code too. Yet when I run your compiled binaries I have no issues.

      Do you have any idea what is wrong?

      #13906
      Vadim Smirnov
      Keymaster

        Windows Server 2003 is an outdated operating system, and building binaries specifically for it using modern versions of Visual Studio can be quite challenging. The main issue is that current toolchains are optimized for more recent versions of Windows and may not offer full backward compatibility with older APIs and libraries that are specific to Windows Server 2003.

        The basic samples you successfully ran on Windows Server 2003 were built using Visual Studio 2012 and Visual C++ 6.0.

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