1. This Software is no longer supported by us. Please download the new motion control software SimTools.
    Dismiss Notice
  2. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  3. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  4. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  5. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

VC++ 2005/8 Yoda buffer.dll crash

Discussion in 'Yoda - ForceFeedback Scanner' started by liquid sky, May 2, 2008.

  1. liquid sky

    liquid sky New Member

    Joined:
    Apr 16, 2008
    Messages:
    9
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    My test appl crashes when making a call to GetExport in VC++ 2005. Is there a fully working sample that uses buffer.dll that I can see?

    If someone can review it, I can post my VC++ 2005 code ...
  2. liquid sky

    liquid sky New Member

    Joined:
    Apr 16, 2008
    Messages:
    9
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    good point .. VC++ Demo.exe from Oct-2004 works ok with either the Yoda1 52KB buffer.dll from Oct-2004, or the Yoda2 196KB buffer.dll from Dec-2006

    Is there a VC++ 2005 source code skeleton I can use to build my appl on top of?
  3. liquid sky

    liquid sky New Member

    Joined:
    Apr 16, 2008
    Messages:
    9
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Attached is my VC++2005 test application.

    It compiles and links ok; dll loads ok, call to EndYoda is ok, but it crashes upon call to GetExport.

    I am a C++ beginner so there may be something obviously wrong with the code. Would love to complete this and post a fully working source code!!

    Hope you can help.

    YodaTest2005v1.zip
  4. liquid sky

    liquid sky New Member

    Joined:
    Apr 16, 2008
    Messages:
    9
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Thanks .. I am using VC++2005 Express and none of the New Project templates had a UNICODE checkbox option.

    Are you using VC++2005? if yes, can you pls walk me through how to open a new project of type that allows to change UNICODE setting?

    The only unicode setting option I found is shown in attached pic, but changing it did not resolve the appl crash when making GetExport call.

    unicode setting.JPG
  5. liquid sky

    liquid sky New Member

    Joined:
    Apr 16, 2008
    Messages:
    9
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Thanks again .. I changed the option to Use Multi-Byte Character Set. The appl still crashes when trying to make GetExport dll call.

    Couple of things I noticed:

    1) debugger does not show the address obtained for GetExport, like it does for EndYoda (see pic1)
    GetExport.JPG
    2) just before doing the GetExport, I try an initialize myYoda struct, but Watch shows access to array is offset by 1 (see pic2)
    GetExport.JPG
    Not sure if these two observations are clues to what's going wrong?

    Attached Files:

  6. liquid sky

    liquid sky New Member

    Joined:
    Apr 16, 2008
    Messages:
    9
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Think I had the much needed breakthrough!! both EndYoda and GetExport DLL fcns now get an address back from GetProcAddress (see pic).

    Also - GetExport call no longer crashes the appl.
    GetProcAddress.JPG

    Your recommendation to encapsulate dll access within a class seemed to do the magic :clap:

    I placed break points before and after GetExport - the Export struct now cleanly initializes all elements.

    Still working on printing the GetExport data onto the form's listbox from within the class. Do you have a quick way to tell if the GetExport returns force feedback data from games (any game you may have) ?

    Solution attached; I'm very excited about latest progress!!
    GetProcAddress.JPG
  7. liquid sky

    liquid sky New Member

    Joined:
    Apr 16, 2008
    Messages:
    9
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Nothing will give me more pleasure!! you have my concent to add this express edition code as sample to x-sim.

    Your assistance in bringing this to life was invaluable!!

    :highfive: