JohnOne Posted July 1, 2012 Share Posted July 1, 2012 (edited) When I first used AutoItx It was with visual studio 2008, and this code worked fine #include <Windows.h> #include "AutoIt3.h" int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){ long xx = 0; long yy = 0; LPPOINT ptr = new POINT(); AU3_PixelSearch(0,0,1024,768,0xFFFFFF,0,1,ptr); xx = ptr->x; // at this point I get the exception as though ptr is NULL, exception will occur if ptr is referenced in any fashion yy = ptr->y; AU3_MouseMove(xx,yy,5); return 0; }Now I am using VS 2010 and I get an unhandled exception of access violation. The error is as follows Unhandled exception at 0x1001c86e in PSearch.exe: 0xC0000005: Access violation reading location 0x00000008. Which after a search seems to occur when referencing a NULL pointer. ptr can be accessed and referenced before the call to AU3_PixelSearch() which seems to have an undesired affect on it. Any Ideas what might cause this? OS = Win7 32 EDIT: Also during debugging I noticed that that ptr->x had been filled (for want of a better word) with a value but ptr->y had not. Edited July 1, 2012 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
AC130 Posted August 23, 2012 Share Posted August 23, 2012 Yes, PixelSearch just will not work in AutoItX. We've both referenced it correctly. I tried using older/newer DLL's, but still no success. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now