Visual C++ & User32.dll

krwell

Senior member
Feb 11, 2001
454
0
0
Hey guys I just got a new job and was given a program to finish. Its a Windows CE program written in Emebbed C++. I keep getting a "Unhandled exception in Prog.exe (USER32.DLL) 0xC0000005: Access Violation". i'm not sure where to start looking for the error. Any help?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Well access violations are usually bad pointer references, doesn't your IDE have a debugger that you can step through the code in/
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
Yes, bad pointer refs or going off the end of an array or buffer (the infamous "buffer overruns" that allow all the hacks into MS products).

Step through. If it only happens in release mode it could also be caused by using a variable without initializing it. If you can't step, add writes to a log file or messageboxes so you can narrow down where it's crashing.

If you can run your code on the emulator, do a BoundsChecker build and run that. Change jobs if they don't have BC (or something comparable) and won't buy it for you.