Cebru Stick: Problem with DLLs in VS2010 .Net C#

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Cebru Stick: Problem with DLLs in VS2010 .Net C#

      In meinem Testprojekt habe ich die dll "cebomsrnet-1.4.dll" eingebunden und den Quelltext eines Beispielprogramms (siehe unten).

      Das Problem ist nun, dass die zusätzlich verlinkte dll (siehe im Fehlertext) nicht gefunden wird. Ich habe diese im Debug verzeichnis ergänzt, hat aber auch nicht geklappt.

      Fehlertext: "Unable to load DLL 'cebomsr-1.4-x86': Das angegebene Modul wurde nicht gefunden. (Exception from HRESULT: 0x8007007E)"->Fehler ist aufgetreten in der Klasse SystemConnector.

      Danke für einen Tip.

      Quellcode:
      private void FrameIoTestStick(Device device)
      {
      // Prepare and fill the list of inputs to read.
      IInput[] inputs = new IInput[]
      {
      device.SingleEndedInputs[0],
      device.SingleEndedInputs[1],
      device.DigitalPorts[0],
      device.Counters[0]
      };

      // Setup device with this selection.
      device.SetupInputFrame(inputs);

      // Read the values multiple times and write them to the console.
      for (int i = 0; i < 100; ++i)
      {
      // Read all inputs into the instance of InputFrame.
      InputFrame inFrame = device.ReadFrame();

      // Write results to the console.
      Console.WriteLine(
      "DigitalPort #0: " + inFrame.GetDigitalPort(0) + ", " +
      "SingleEnded #0: " + inFrame.GetSingleEnded(0) + " V, " +
      "SingleEnded #1: " + inFrame.GetSingleEnded(1) + " V, " +
      "Counter #0: " + inFrame.GetCounter(0));
      }

      // Reset to power up defaults.
      device.ResetDevice();
      }

      /// <summary>
      /// The examples main method.
      /// </summary>
      private void RunExample()
      {
      try
      {
      // Search for devices ...
      IList<Device> devices = LibraryInterface.Enumerate(DeviceType.All);

      // If at least one has been found, use the first one ...
      if (devices.Count > 0)
      {
      Device device = devices[0];

      // Open device, nothing can be done without doing this.
      device.Open();

      // *** DIGITAL PORTS AND ANALOG OUTPUTS ARE MODIFIED DURING THIS ***
      // *** SECTION, SO DO NOT CONNECT ANY PERIPHERALS WITHOUT STUDYING ***
      // *** THE ACTIONS DONE HERE, OTHERWISE YOUR PERIPHERALS MAY BE DAMAGED !!! ***
      //if (device.DeviceType == DeviceType.CeboLC)

      //else
      if (device.DeviceType == DeviceType.CeboStick)
      FrameIoTestStick(device);
      else
      throw new InvalidOperationException("No supported device detected.");

      // Finalize device usage, this free's up the device, so it can be used
      // again, including other applications.
      device.Close();
      }
      }
      catch (IOException ex)
      {
      Console.WriteLine(ex.ToString());
      }
      }