【问题标题】:How to get lab streaming layer to work in C#?如何让实验室流层在 C# 中工作?
【发布时间】:2020-09-10 08:00:21
【问题描述】:

我有一台可以记录实时数据的设备,例如脑电图测量。我想使用实验室流传输层 (lsl) 发送这些数据。不幸的是,我无法配置 lsl 并让它运行。我不确定我是否将 dll 复制到了正确的位置。

到目前为止我做了什么:

  • latest release page下载了最近的lsl dll

  • 将 liblsl64.lib 和 liblsl64.dll 复制到我的项目文件夹和我的项目的 Debug 文件夹中

  • 将 LSL.cs(来自 github,如 C# Bindings 中所述)复制到我的项目中:重命名 const string libname = "lsl"; to const string libname = "liblsl64";

  • 当我运行代码时:

    liblsl.StreamInfo info = new liblsl.StreamInfo("TestCSharp","EEG");

我得到一个 System.BadImageFormatException: HRESULT: 0x8007000B

谁能帮我解决这个问题?

【问题讨论】:

    标签: c# shared-libraries streaming data-science badimageformatexception


    【解决方案1】:

    我得到 System.BadImageFormatException,因为我的配置管理器中有“Any CPU”而不是“x64”。当使用 .Net Core 应用程序访问库时,它也可以工作。

    【讨论】:

      猜你喜欢
      • 2015-04-16
      • 2017-03-18
      • 1970-01-01
      • 2021-02-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多