Home › Forums › Software Development › Problem: System.DllNotFoundException
Tagged: eyex
- This topic has 5 replies, 2 voices, and was last updated 9 years, 9 months ago by Siavash Mortazavi.
- AuthorPosts
- 14/11/2014 at 18:54 #2021Siavash MortazaviParticipant
Hi, I’m trying to use EyeX SDK and EyeX eye tracker. I have added Tobii.EyeX.Client.Net20.dll and EyeXFramework.dll as references. When I run my application, it does nothing, and when I try to close it, I receive this error message:
An unhandled exception of type ‘System.DllNotFoundException’ occurred in Tobii.EyeX.Client.Net20.dll
Additional information: Unable to load DLL ‘Tobii.EyeX.Client.dll’: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
I have tried different versions of dlls (x86 and x64) and also I have tried to compile my app with different CPU configurations. The problem exist on both Windows 7 64-bit and Windows 8.1 64-bit.
Basically, I would like to access the gaze stream in a WPF application, and update my app based on gaze location. I don’t need to use any WPF-specific feature here.
Can anyone help please?
Thanks,
Sia14/11/2014 at 19:11 #2022Siavash MortazaviParticipantUPDATE: after this line of code in my app gets executed:
var eyeXHost = new EyeXHost();then, eyeXHost object has this status:
_context: {Tobii.EyeX.Client.Context}
_dataStreams: Count = 1
_deletedDataStreams: Count = 0
_displaySizeStateAccessor: {EyeXFramework.EngineStateAccessor<Tobii.EyeX.Client.Size2>}
_environment: {Tobii.EyeX.Client.Environment}
_eyeTrackingDeviceStatusStateAccessor: {EyeXFramework.EngineStateAccessor<Tobii.EyeX.Framework.EyeTrackingDeviceStatus>}
_screenBoundsStateAccessor: {EyeXFramework.EngineStateAccessor<Tobii.EyeX.Client.Rect>}
_userPresenceStateAccessor: {EyeXFramework.EngineStateAccessor<Tobii.EyeX.Framework.UserPresence>}
_userProfileNameStateAccessor: {EyeXFramework.EngineStateAccessor<string>}
DisplaySize: {INVALID}
EyeTrackingDeviceStatus: {INVALID}
ScreenBounds: {INVALID}
UserPresence: {INVALID}
UserProfileName: {INVALID}14/11/2014 at 19:16 #2023Siavash MortazaviParticipantCan anyone please download my very simple source code and tell me what is the problem?
The main logic happens in TobiiController.cs
https://onedrive.live.com/redir?resid=2681762D21DAF94D%21908715/11/2014 at 01:12 #2024Siavash MortazaviParticipantUPDATE: I have solved the .dll problem, but still the I cannot get any data from eyeXhost object.
17/11/2014 at 10:24 #2033Robert [Tobii]ParticipantHi Sia,
I looked briefly in your sample code. It looks like one problem is the using statements:
using (var eyeXHost = new EyeXHost()) { eyeXHost.Start(); using (var stream = eyeXHost.CreateGazePointDataStream(GazePointDataMode.LightlyFiltered)) { // ...
This means that the EyeXHost and data stream instances will be disposed right afterwards. You need to save a reference to the EyeXHost and stream object, and only dispose them when you dispose your TobiiController instance.
See MSDN for best practices regarding the using statement and IDisposable:
http://msdn.microsoft.com/en-us/library/fs2xkftw.aspx
http://msdn.microsoft.com/en-us/library/yh598w02.aspx20/11/2014 at 19:24 #2089Siavash MortazaviParticipant - AuthorPosts
- You must be logged in to reply to this topic.