Home Forums Software Development Problem: System.DllNotFoundException

Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2021
    Siavash Mortazavi
    Participant

    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,
    Sia

    #2022
    Siavash Mortazavi
    Participant

    UPDATE: 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}

    #2023
    Siavash Mortazavi
    Participant

    Can 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%219087

    #2024
    Siavash Mortazavi
    Participant

    UPDATE: I have solved the .dll problem, but still the I cannot get any data from eyeXhost object.

    #2033
    Robert [Tobii]
    Participant

    Hi 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.aspx

    #2089
    Siavash Mortazavi
    Participant

    Hi @roberttobii

    Thank you so much!
    You’re right, I was making a stupid mistake! 😀

    Best,
    Sia

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