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

C / C++ / MFC

 
GeneralRe: calltips in scintilla Pin
mirraa28-Aug-07 0:48
mirraa28-Aug-07 0:48 
GeneralRe: calltips in scintilla Pin
Russell'28-Aug-07 1:01
Russell'28-Aug-07 1:01 
GeneralRe: calltips in scintilla Pin
Russell'28-Aug-07 1:13
Russell'28-Aug-07 1:13 
GeneralRe: calltips in scintilla Pin
mirraa28-Aug-07 1:22
mirraa28-Aug-07 1:22 
GeneralRe: calltips in scintilla Pin
Russell'28-Aug-07 1:43
Russell'28-Aug-07 1:43 
QuestionIDispatch question Pin
themancer27-Aug-07 20:31
themancer27-Aug-07 20:31 
QuestionVideo Parameters Pin
tyagineha27-Aug-07 20:10
tyagineha27-Aug-07 20:10 
Questionabout _CRT_DEBUGGER_HOOK function. Pin
blackeye200427-Aug-07 19:10
blackeye200427-Aug-07 19:10 
My program crashed when it invoked one dll's function with debug mode.My code is below.

DVDErrorThrower err;

try {

err = m_session->BeginDiscAccess(hModule, device, DAM_READ_ONLY, 0, 0);

}

catch(dvd_eng_error e)

{

return E_FAIL;

}

The breakpoint is in _CRT_DEBUGGER_HOOK.

*******************************************************************************/

#include <dbgint.h>

#ifdef _DEBUG

#include <internal.h>
#include <limits.h>#include <mtdll.h>
#include <malloc.h>
#include <stdlib.h>

_CRT_ALLOC_HOOK _pfnAllocHook = _CrtDefaultAllocHook;

/***
*int _CrtDefaultAllocHook() - allow allocation
*
*Purpose:
* allow allocation
*
*Entry:
* all parameters ignored
*
*Exit:
* returns TRUE
*
*Exceptions:
*
*******************************************************************************/
int __cdecl _CrtDefaultAllocHook(
int nAllocType,
void * pvData,
size_t nSize,
int nBlockUse,
long lRequest,
const unsigned char * szFileName,
int nLine
)
{
return 1; /* allow all allocs/reallocs/frees */
}

#endif /* _DEBUG */

int _debugger_hook_dummy;

#ifdef _M_IA64
#undef _CRT_DEBUGGER_HOOK
#define _CRT_DEBUGGER_HOOK __crt_debugger_hook
#endif /* _M_IA64 */

__declspec(noinline)
void __cdecl _CRT_DEBUGGER_HOOK(int _Reserved)
{
/* assign 0 to _debugger_hook_dummy so that the function is not folded in retail */
(_Reserved);
_debugger_hook_dummy = 0;
}


and the callstack is like below:

> msvcr80.dll!_crt_debugger_hook(int _Reserved=) Line 65 C
msvcr80.dll!_invoke_watson(const wchar_t * pszExpression=0x00000000, const wchar_t * pszFunction=0x00000000, const wchar_t * pszFile=0x00000000, unsigned int nLine=0, unsigned int pReserved=0) Line 181 + 0x7 bytes C++
msvcr80.dll!_invalid_parameter_noinfo() Line 99 + 0xc bytes C++
TnAPIEngine.dll!05c0531e()
[Frames below may be incorrect and/or missing, no symbols loaded for NeroAPIEngine.dll]
TnAPIEngine.dll!05d920b0()
ntdll.dll!77b21843()
ntdll.dll!77b216dc()
msvcr80.dll!malloc(unsigned int size=189077260) Line 163 + 0x63 bytes C
mfc80u.dll!operator new(unsigned int nSize=0) Line 349 + 0x3 bytes C++
TnAPIEngine.dll!05d925e9()
TnAPIEngine.dll!05dc89fe()


And my Pc's environoment is :

Vista ultimate.

visual stdio 2005 sp1



but if I ran my program step by step ,it would catch the exception the function threw. And also with release mode.the program worked well!

I'm crazy.

Can anybody help me?
AnswerRe: about _CRT_DEBUGGER_HOOK function. Pin
Naveen27-Aug-07 19:48
Naveen27-Aug-07 19:48 
GeneralRe: about _CRT_DEBUGGER_HOOK function. Pin
blackeye200427-Aug-07 20:03
blackeye200427-Aug-07 20:03 
AnswerRe: about _CRT_DEBUGGER_HOOK function. Pin
jk chan27-Aug-07 19:52
jk chan27-Aug-07 19:52 
GeneralRe: about _CRT_DEBUGGER_HOOK function. Pin
blackeye200427-Aug-07 19:58
blackeye200427-Aug-07 19:58 
GeneralRe: about _CRT_DEBUGGER_HOOK function. Pin
jk chan27-Aug-07 20:51
jk chan27-Aug-07 20:51 
GeneralRe: about _CRT_DEBUGGER_HOOK function. Pin
blackeye200427-Aug-07 21:35
blackeye200427-Aug-07 21:35 
Questionhow to set the tree control using deffrent sizes picture Pin
johe_vc27-Aug-07 18:35
johe_vc27-Aug-07 18:35 
AnswerRe: how to set the tree control using deffrent sizes picture Pin
Nishad S27-Aug-07 21:51
Nishad S27-Aug-07 21:51 
QuestionHow to get the CWnd* of the dialog? Pin
whiteclouds27-Aug-07 16:31
whiteclouds27-Aug-07 16:31 
AnswerRe: How to get the CWnd* of the dialog? Pin
nicholas_cui27-Aug-07 17:11
nicholas_cui27-Aug-07 17:11 
GeneralRe: How to get the CWnd* of the dialog? Pin
whiteclouds27-Aug-07 17:28
whiteclouds27-Aug-07 17:28 
GeneralRe: How to get the CWnd* of the dialog? Pin
Naveen27-Aug-07 17:55
Naveen27-Aug-07 17:55 
GeneralRe: How to get the CWnd* of the dialog? Pin
whiteclouds27-Aug-07 18:04
whiteclouds27-Aug-07 18:04 
GeneralRe: How to get the CWnd* of the dialog? Pin
Naveen27-Aug-07 18:05
Naveen27-Aug-07 18:05 
GeneralRe: How to get the CWnd* of the dialog? Pin
whiteclouds27-Aug-07 20:50
whiteclouds27-Aug-07 20:50 
GeneralRe: How to get the CWnd* of the dialog? Pin
Naveen27-Aug-07 21:39
Naveen27-Aug-07 21:39 
GeneralRe: How to get the CWnd* of the dialog? Pin
Naveen27-Aug-07 21:49
Naveen27-Aug-07 21:49 

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.