[Solved] Project building with several errors when using EyeXFramework

Home Forums Software Development [Solved] Project building with several errors when using EyeXFramework

Viewing 15 posts - 16 through 30 (of 30 total)
  • Author
    Posts
  • #5427

    Hello,

    I’ve developed an Winform c# application which have lots of buttons.I’m trying to integrate it Tobii EyeX tracker in which buttons can be clicked by looking at them. I’ve followed the steps of developer guide for dotnet. I’ve added the eyex dotnet solution in my winform application but I’m unable to add Tobiieyex client dll in my winform application.

    Please help.

    Thanks.

    #5429
    Grant [Tobii]
    Keymaster

    Hi @namanon14,

    Could you kindly be more explicit in the errors you are facing? With more details, we will be better placed to assist you in getting started.

    #5435

    Hello,

    As mentioned above,I’ve developed winform application and integrating it with Tobii EyeX eye tracker.I’m using ActivatableButton forms provided in EyeX SDK. As per Tobii EyeX SDK guide I’ve added EyeXdotnet solution in my project by add>existing project.

    But when I proceed to add Tobii.EyeX.client and Tobii.EyeX.client.ner20 dll files then it shows an error message “This file can’t be added.Make Sure that the file is accessible and valid component.”

    Also when I plug my eye tracker in pc then it only glows but doesn’t work.

    Please help, my final objective is to perform click operations in my winform c# application by looking at buttons by Tobii Eye Tracker.

    Thanks in advance.

    #5436
    Alex [Tobii]
    Participant

    Hi!

    You only need to reference MANAGED dlls if you are programming in a managed language (for example C#):
    – Tobii.EyeX.Client.Net20.dll
    – EyeXFramework.dll
    You also need to make sure that NATIVE dll ( Tobii.EyeX.Client.dll ) is copied to the output folder.

    Also make sure that you reference correct dlls depending on if you build for x86 or x64.

    #5453

    Hello Alex,

    I’ve referenced the managed dll as you told and settings are exactly same for client dll. I’ve also added activatablebuttons form in my project but still I’m unable to do click operation on buttons with gaze.Please help me.

    Thanks

    #5454
    Alex [Tobii]
    Participant

    I f you are programming for WPF please make sure that you start your eyex host on app start:

    
    public partial class App : Application
        {
            private WpfEyeXHost _eyeXHost;
    
            public WpfEyeXHost EyeXHost
            {
                get { return _eyeXHost; }
            }
    
            public App()
            {
                _eyeXHost = new WpfEyeXHost();
                _eyeXHost.Start();
            }
    
            protected override void OnExit(ExitEventArgs e)
            {
                base.OnExit(e);
                _eyeXHost.Dispose();
            }
        }
    

    I would suggest first trying to compile the sample from
    source\WpfSamples\ActivatableElements\
    and then transferring the code to your project line by line.
    You can also check the device and tracking status after you initialize eyex to make sure that it works. Check this sample:
    source\WpfSamples\UserPresenceWpf\

    Let me know if that helps.

    /Alex

    #5455

    Hi Alex,

    I’m working on winform c# application development and perform select and trigger operation on buttons.I’m working on Visual Studion 2010.

    Thanks

    #5456
    Alex [Tobii]
    Participant

    Then please check winforms samples:
    source\FormsSamples\ActivatableButtonsForms\
    source\FormsSamples\UserPresenceForms\

    #5457

    HI Alex,

    I tried with your suggestion, and copied ActivatableButtonsForms and UserPresenceForms in my project. However, it is generating exceptions at few places, as in here,
    ((IComponent)behaviorMap).Disposed += OnBehaviorMapDisposed;

    “Nullreference Exception is unhandled”

    How do I proceed next? Kindly suggest.

    #5458
    Alex [Tobii]
    Participant

    Hi!

    I would suggest you compiling the samples first and making sure they work without transferring them to your project.
    After that you can try to transfer them line by line to make sure that you don’t miss anything.

    I would also suggest you going for Visual Studio 2012 or newer if it’s possible since I can’t promise that the SDK works with 2010.

    #5459

    Hi,

    I am working with Visual Studio 2012. Now the problem arises at

    _eyeXHost.Start();

    Unable to load DLL ‘Tobii.EyeX.Client.dll’: The specified module could not be found. (Exception from HRESULT: 0x8007007E)

    I am really clueless about this.

    #5460
    Alex [Tobii]
    Participant

    As I said before please make sure that Tobii.EyeX.Client.dll is copied to your output folder (same folder where your exe file is). Make sure that it’s also a correct version – x64 for x64 applications and x86 for x86 applications.

    Visual Studio doesn’t copy native dlls automatically so you need to copy it manually or automate this process with post build actions, including this dll as content file with “copy always” flag or a build script.

    #5461

    Hi Alex,

    Thanks for you help. Now my code is running.Can I do click operation on the button in my winform c# application with eye-gaze only (i.e. without any key press, only look at the button and at is clicked).

    Thanks.

    #7360
    Adam Doherty
    Participant

    I am trying to link tobii to a basic web browser i have created, and i am getting this error, which i cannot understand. [img]https://i.imgur.com/H9rpJgh.png[/img]

    BadImageFormatException Error

    #7364
    Grant [Tobii]
    Keymaster

    Hi @adamdoherty, this error message BadImageFormatException results when loading a dll by incompatible bitness (32 or 64-bit) on the solution/project vs. the DLL.

    To resolve the error, you can either:

    – Change target platform to x86 in your Visual Studio solution
    – If you want to build a 64-bit application, change the references for the two DLLs Tobii.EyeX.Client.dll and Tobii.EyeX.Client.Net20.dll to the 64-bit versions, located in \lib\x64

    Also check that is within the project properties for visual studio is if “Prefer 32-Bit” has been enabled?

    Please let us know how you get on.

Viewing 15 posts - 16 through 30 (of 30 total)
  • You must be logged in to reply to this topic.