Solved

GetGestureInfo entry point not in USER32.dll

Posted on 2014-03-19
2
856 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

If your app took Google’s lash recently, here are the 5 most likely reasons.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Video by: Tony
This video teaches viewers how to export a project from Adobe Premiere Pro and the various file types involved.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

821 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