- 21/01/2021 at 05:53 #19728quocParticipant
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?21/01/2021 at 18:16 #19737Grant [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.21/01/2021 at 21:38 #19738quocParticipant
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_184.108.40.206.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?25/01/2021 at 11:24 #19747Grant [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 @
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.
- You must be logged in to reply to this topic.