473,386 Members | 1,741 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Cannot run in debug mode, HEAP[...]: Heap block at ... modified at ... past requested

Hi, i have strange problem.
My code cannot run in debug mode (i use VS 2005).
When try to run debug, there is a dialog say

"HEAP[...]: Heap block at ... modified at ... past requested size of 1
Windows has triggered a breakpoint in TestBug.exe.
This may be due to a corruption of the heap, and indicates a bug in TestBug.exe
or any of the DLLs it has loaded.
The output window may have more diagnostic information"

My code just a default simple hello world, dialog type with this function only.

Expand|Select|Wrap|Line Numbers
  1. void CTestBugDlg::OnBnClickedOk()
  2. {
  3.     // TODO: Add your control notification handler code here
  4.     int a = 0;
  5.  
  6.     static LPDIRECTINPUTA pDirectInputA = NULL;
  7.     HRESULT hret = DirectInputCreateA(AfxGetInstanceHandle(),
  8.  
  9.                                                                      DIRECTINPUT_VERSION,
  10.  
  11.                                                                      &pDirectInputA,
  12.  
  13.                                                                      NULL);
  14.     OnOK();
  15. }
i just want to create direct input, but that make above error dialog.
I have proper correct setting path of .h and lib, dll of dinput already.
More over this code was run fine in this PC 2 week agos,
and i did not change the code until today. (that i want to continue my work)
And this code can run on another PC.
On my PC in cant run in my account only, if try to run it in another account it can run normally. It can also run without debugging.

And i notice strange order of loading required dll when start debug too.
Anyone know what happen to me, does my VS corrupt?
Mar 2 '07 #1
0 1492

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
22
by: Smutny30 | last post by:
Hello, I am preparing a database that will store 10 n * GBs - 100 n * GBs of data. I calculated to have 1,2 GB of bufferpools. I run the DB2 v. 8.2.1 alone on 4 GB box. I obtain : ...
3
by: Polvere | last post by:
Hello everybody, I'm experiencing a problem during debug with Microsoft Visual C++: wherever I set a breakpoint (and even if I disable all breakpoints) the debugger goes into disassembler mode,...
3
by: jt | last post by:
For some stupid reason, I can't get this to work in Release mode, but works well in Debug mode. Below is the function: Here is the line: pos=strpos(pszCmdLine,cmdLineStr); // in release mode...
15
by: Joe Van Dyk | last post by:
Can someone explain what a heap and what a stack is? And why I should care? I used to know, but then I forgot. And I can't seem to find it in the C++ FAQ. I keep reading how allocating from...
2
by: Joel | last post by:
Hi, I am pretty new to asp.net, and have recently taken over a project. I have gotten to the point where I am about to release my changes, but for some reason when i build the project in release...
4
by: ThunderMusic | last post by:
Hi, I have a custom form that works fine when I debug it or run it in release mode but cannot be loaded in the designer... Actually, it can be loaded in the designer when no control is on it, but...
2
by: Pushpa | last post by:
Hi All, This my part of the c++ program using threads in windows : //modified by pushpa struct structExrdDoc { CExrdDoc* spDoc; LPCTSTR sstrFileName;
5
by: kumarmdb2 | last post by:
Hi guys, For last few days we are getting out of private memory error. We have a development environment. We tried to figure out the problem but we believe that it might be related to the OS...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.