Home Forums EyeX Software Development dev BadImageFormatException:

This topic contains 7 replies, has 2 voices, and was last updated by Profile photo of Grant [Tobii] Grant [Tobii] 5 days, 18 hours ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #7039
    Profile photo of Devi
    Devi
    Participant

    Hi I am new to the Tobii eyex development. I have created a windows form application which has two buttons. My object is to when look at the Particular button that should trigger the button click. But the problem is it is not executing the activated event from the EyeX Engine to trigger the click.
    Also another issue is I am not able to run the Sample code ActivableButtonForms and it gives an like this: “BadImageFormatException: using An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)”. I am using Visual studio 2012 32bit
    Please help me.

    #7048
    Profile photo of Grant [Tobii]
    Grant [Tobii]
    Moderator

    Hi @devi,

    The BadImageFormatException when loading a dll is caused 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

    Hopefully once you get the Activatable Buttons sample going, it should clear up your remaining doubts.

    Please let us know how you get on.

    #7060
    Profile photo of Devi
    Devi
    Participant

    Hello,
    I have changed the target platform to x86, but I am getting the same error. I am attaching the screen shot of the configuration and the error
    Error and Configuration image

    Thanks

    #7061
    Profile photo of Grant [Tobii]
    Grant [Tobii]
    Moderator

    Hi @devi, sorry the image was not sent.. can you send a link to imgur instead? thanks

    #7074
    Profile photo of Devi
    Devi
    Participant

    Hi @Grant[Tobii]
    Error
    Configuration

    #7075
    Profile photo of Devi
    Devi
    Participant
    #7078
    Profile photo of Grant [Tobii]
    Grant [Tobii]
    Moderator

    Hi @devi, thanks for that.. can you please confirm the location of the Tobii.EyeX.Client.dll and Tobii.EyeX.Client.Net20.dll files on your system and that you have added this location to the path directory in the Visual Studio project? It seems from the error, that VS simply cannot find the DLL as needed.

    #7080
    Profile photo of Grant [Tobii]
    Grant [Tobii]
    Moderator

    I would also advise you to have a look over a tutorial we produced detailing the steps to get up and running on Visual Studio @ http://developer.tobii.com/walkthrough-setting-cc-project-eyex-c-api/

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.