Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I program in VC++, I put an invalid instruction such as

*(long*)0=0;

In the window proc of my dialogs. for some messages such as VM_INITDIALOG this instruction causes an access violation writing at location 0X00000000 as expected. But putting any invalid instruction in most messages such as WM_PAINT,... does not terminate my program and this causes me not to notice bugs in my program. can anyone tell me why is this?
This problem did not accure when I used Windows XP and Windows Vista on 32bit platforms.
I use Visual Studio 2008 32bit on Windows7 64bit and my hardware is HP notebook DV6-2020EV
Posted
Updated 18-Jan-10 22:59pm
v3

1 solution

Why dont you use assert for the purpose?
:)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900