Home Forums Software Development Problem: System.DllNotFoundException


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

    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?


    Siavash Mortazavi

    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}

    Siavash Mortazavi

    Can anyone please download my very simple source code and tell me what is the problem?
    The main logic happens in TobiiController.cs

    Siavash Mortazavi

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

    Robert [Tobii]

    Hi Sia,

    I looked briefly in your sample code. It looks like one problem is the using statements:

                using (var eyeXHost = new EyeXHost())
                    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:

    Siavash Mortazavi

    Hi @roberttobii

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


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