Home Forums Software Development Unhandled Exception in Tobii.StreamEngine.Interop.cs

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #19728
    quoc
    Participant

    When trying to run the C# example here I get exception

    Unhandled exception. System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (0x8007000B)
    at Tobii.StreamEngine.Interop.tobii_api_create(IntPtr& api, IntPtr customAlloc, tobii_custom_log_t custom_log)
    at Tobii.StreamEngine.Interop.tobii_api_create(IntPtr& api, tobii_custom_log_t custom_log) in C:\Users\tqphan\source\repos\GazeServer\GazeServer\Tobii.StreamEngine.Interop.cs:line 43
    at GazeServer.Program.Main() in C:\Users\tqphan\source\repos\GazeServer\GazeServer\Program.cs:line 23

    What happened?

    #19737
    Grant [Tobii]
    Keymaster

    Hi @quoc, this error code 0x8007000B may be caused by an issue in defining the Chipset for building, whether 32 or 64 bit. This should be taken care of automatically if you are using Visual Studio >2018.. can you kindly confirm what IDE and operating system you are working with? Please also ensure you are running the right bit version of the Stream Engine when downloading.

    #19738
    quoc
    Participant

    I got it working by switching from x84 dll to x64 dll. I have another related question.

    The file Tobii.StreamEngine.Interop.cs in stream_engine_windows_x64_4.1.0.3.zip doesn’t compile.

    1>C:\Users\tqphan\source\repos\GazeServer\GazeServer\Tobii.StreamEngine.Interop.cs(475,102,475,137): error CS0246: The type or namespace name ‘tobii_calibration_stimulus_points_t’ could not be found (are you missing a using directive or an assembly reference?)

    I have to comment out line 475.

    Possible fix?

    #19747
    Grant [Tobii]
    Keymaster

    Hi @quoc, if you simply wish to get up and running using Eye Tracking in C#, then please follow the code snippet we provide @

    Getting Started

    As the Tobii.StreamEngine.Interop.cs is not a file that is to be ran directly as a sample application as the namespace ‘tobii_calibration_stimulus_points_t’ is only provided in conjunction with the purchase of an advanced use licence.

    Please run the sample code we provide and let us know how you get on. Best Wishes.

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