Solved

GetGestureInfo entry point not in USER32.dll

Posted on 2014-03-19
2
849 Views
Last Modified: 2014-04-08
I make reference to GetGestureInfo in my app so that I can do some touchscreen things when the PC is so-enabled.  I only need it to work on win7 and win8.  But I can't even run my app on XP now because of the "entry point not found" error as in the title of this question.   So, what is a good way to avoid this?  I don't want a solution that requires a separate build for XP if at all possible.   Can I do something like put my call to GetGestureInfo in a DLL and then dynamically link that DLL only if I see I'm running on win7/8 ?  Something like that?  What is best/easiest way?  Thanks!

My app is MS C++ using a bit of MFC and using VS2010.
0
Comment
Question by:tullhead
2 Comments
 

Author Comment

by:tullhead
ID: 39946851
Further to this.  So now I'm trying to put the call to GetGestureInfo in a dynamically linked DLL.  Then I just won't load it if I see that I'm on XP.  But I'm not too good at DLL and passing arguments to functions in them, and whats allowed and what isn't.

I try to allocate dynamically the GESTUREINFO in my main program, so that I have a pointer to it to pass to the function in the DLL -- is this going to work safely?  SO, in main program something like:
   
        GESTUREINFO* pgi = new GESTUREINFO();
         ZeroMemory(pgi, sizeof(GESTUREINFO));
         pgi->cbSize = sizeof(GESTUREINFO);

Then I try to call the function which is in the DLL:

        BOOL bResult = theApp.CallGetGestureInfo(lParam, pgi);

But its crashing.  Even if, in the DLL I don't even call GetGestureInfo -- as a test, I simply
have the function in the DLL return the BOOL "false".  Still, main program crashes.

What am I doing wrong?
0
 
LVL 34

Accepted Solution

by:
Duncan Roe earned 500 total points
ID: 39951778
You must expect this kind of problem when you develop for one revision and then seek to run on an older revision. The way you have approached it looks fine to me.
You need to debug this: after executing line 1, does pgi contain a valid memory pointer? What is sizeof GESTUREINFO? Does your GESTUREINFO::GESTUREINFO() allocate that much memory? Is pgi still good at the start of line 3? and so on.
After that, you need to debug your DLL
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If your app took Google’s lash recently, here are the 5 most likely reasons.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Viewers will learn how to use the Hootsuite Dashboard.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question