Click here to Skip to main content
15,914,160 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWhich function called when drop file on Exe Pin
rp_suman10-Dec-06 13:54
rp_suman10-Dec-06 13:54 
AnswerRe: Which function called when drop file on Exe Pin
Michael Dunn10-Dec-06 14:27
sitebuilderMichael Dunn10-Dec-06 14:27 
GeneralRe: Which function called when drop file on Exe Pin
rp_suman10-Dec-06 14:42
rp_suman10-Dec-06 14:42 
GeneralRe: Which function called when drop file on Exe Pin
Michael Dunn10-Dec-06 14:47
sitebuilderMichael Dunn10-Dec-06 14:47 
GeneralThanks Pin
rp_suman10-Dec-06 14:52
rp_suman10-Dec-06 14:52 
QuestionHow coding to FrontMic setting in Mixer? Pin
boy21c10-Dec-06 12:59
boy21c10-Dec-06 12:59 
QuestionHeap Corruption Question Pin
Richard Andrew x6410-Dec-06 12:50
professionalRichard Andrew x6410-Dec-06 12:50 
AnswerRe: Heap Corruption Question Pin
Stephen Hewitt10-Dec-06 13:35
Stephen Hewitt10-Dec-06 13:35 
Stuff like this:
int *pInt = new int;
memset(pInt, 0, sizeof(6*sizeof(int)));


Here I only allocate enough space for one integer but write past the end of the memory I allocated.

My advice is to download WinDBG[^] and turn on the page heap for your application. Follow these steps to do so (after installing WinDBG).
1. In the start menu find "Debugging Tools for Windows" and run the "Global Flags" application that's within it.
2. Select the "Image File" tab.
3. In the "Image: (TAB to refresh)" edit control enter the name (not the full path) of your application including the file extension.
4. Press TAB.
5. Tick the following: "Enable heap tail checking", the "Enable heap free checking", "Enable heap parameter checking", ""Enable heap validation on call", "Disable heap coalesce on free" and "Enable page heap".
6. Click "Apply".
7. Debug the application and reproduce the fault. If all goes well a beakpoint will be generated near the code that actually caused the problem.

When done untick all the options and click "Apply". Another option (which I prefer) is to find the registry key "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options" and delete the key named after your application.

Be aware that turning on these options on will make you application run very slowly and consume heaps of memory. It's normally good to have a machine loaded up with RAM.


Steve

GeneralRe: Heap Corruption Question Pin
Richard Andrew x6410-Dec-06 13:59
professionalRichard Andrew x6410-Dec-06 13:59 
QuestionMFC Graphics Debug Assertation Error Pin
CoffeeAddict1910-Dec-06 12:32
CoffeeAddict1910-Dec-06 12:32 
AnswerRe: MFC Graphics Debug Assertation Error Pin
Michael Dunn10-Dec-06 13:17
sitebuilderMichael Dunn10-Dec-06 13:17 
AnswerRe: MFC Graphics Debug Assertation Error Pin
Mark Salsbery10-Dec-06 13:31
Mark Salsbery10-Dec-06 13:31 
GeneralRe: MFC Graphics Debug Assertation Error Pin
CoffeeAddict1910-Dec-06 14:53
CoffeeAddict1910-Dec-06 14:53 
GeneralRe: MFC Graphics Debug Assertation Error Pin
Mark Salsbery10-Dec-06 15:25
Mark Salsbery10-Dec-06 15:25 
Questionwin-like application [modified] Pin
arnluci10-Dec-06 8:40
arnluci10-Dec-06 8:40 
AnswerRe: win-like application Pin
Mark Salsbery10-Dec-06 9:39
Mark Salsbery10-Dec-06 9:39 
AnswerRe: win-like application Pin
Joe Woodbury10-Dec-06 9:53
professionalJoe Woodbury10-Dec-06 9:53 
Questionhow to allow horizontal scroll for picture or custom control? Pin
cyn810-Dec-06 1:39
cyn810-Dec-06 1:39 
AnswerRe: how to allow horizontal scroll for picture or custom control? Pin
Hamid_RT10-Dec-06 6:43
Hamid_RT10-Dec-06 6:43 
GeneralRe: how to allow horizontal scroll for picture or custom control? Pin
cyn810-Dec-06 13:34
cyn810-Dec-06 13:34 
QuestionAny help to merge multiple PDFs in a single PDF: Using any thing like VC++ or VB Pin
helpcode10-Dec-06 1:16
helpcode10-Dec-06 1:16 
QuestionHow can i play a wma file? Pin
Sina Parastgary9-Dec-06 19:18
Sina Parastgary9-Dec-06 19:18 
AnswerRe: How can i play a wma file? Pin
Mark Salsbery10-Dec-06 5:48
Mark Salsbery10-Dec-06 5:48 
Questionany idea to use CToolBar in this way? Pin
includeh109-Dec-06 6:38
includeh109-Dec-06 6:38 
AnswerRe: any idea to use CToolBar in this way? Pin
Mark Salsbery9-Dec-06 7:08
Mark Salsbery9-Dec-06 7:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.