Link to home
Start Free TrialLog in
Avatar of tullhead
tullheadFlag for United States of America

asked on

GetGestureInfo entry point not in USER32.dll

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.
Avatar of tullhead
tullhead
Flag of United States of America image

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of Duncan Roe
Duncan Roe
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial