Click here to Skip to main content
16,005,552 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Vector Question Pin
Tomasz Sowinski14-Aug-02 4:24
Tomasz Sowinski14-Aug-02 4:24 
GeneralRe: Vector Question Pin
Brian Delahunty15-Aug-02 21:52
Brian Delahunty15-Aug-02 21:52 
Questionwhat path format does CFileDialog return? C:\ or C:\\? Pin
ns14-Aug-02 3:31
ns14-Aug-02 3:31 
AnswerRe: what path format does CFileDialog return? C:\ or C:\\? Pin
Nish Nishant14-Aug-02 3:35
sitebuilderNish Nishant14-Aug-02 3:35 
GeneralRe: what path format does CFileDialog return? C:\ or C:\\? Pin
ns14-Aug-02 3:59
ns14-Aug-02 3:59 
GeneralRe: what path format does CFileDialog return? C:\ or C:\\? Pin
Nish Nishant14-Aug-02 4:05
sitebuilderNish Nishant14-Aug-02 4:05 
GeneralRe: what path format does CFileDialog return? C:\ or C:\\? Pin
Chris Losinger14-Aug-02 4:08
professionalChris Losinger14-Aug-02 4:08 
GeneralException Handling Pin
BlackRider14-Aug-02 3:27
BlackRider14-Aug-02 3:27 
I'm TRYING to catch database exception and output that to an error file. Here's the CATCH code :

catch (CdbException)
{
FILE* errorfile;
errorfile=fopen("c:\\cristi\\error.err","a");
fprintf(errorfile,"v,dmlkvmdsv");
for (long ct = 0; ct < dben.Errors.GetCount(); ct++)
{
fprintf(errorfile,_T("\t Error #%ld: #%ld -- %s\n"),
ct,
DBERR(dben.Errors[ct].GetNumber()),
dben.Errors[ct].GetDescription());
}
fclose(errorfile);
return;
}

This code just won't work. I get nothing in the file. Nothing. It's not even accessed.

This other code below that prints the error data to the screen works.

catch (CdbException)
{
for (long ct = 0; ct < dben.Errors.GetCount(); ct++)
{
printf(_T("\t Error #%ld: #%ld -- %s\n"),
ct,
DBERR(dben.Errors[ct].GetNumber()),
dben.Errors[ct].GetDescription());
}
return;
}

Now. ---> In both cases I get this error message:
Debug Assertion Failed!
Program: ...program
File:dbgheap.c
Line:1044
Expression: _CrtIsValidHeapPointer(pUserData)

I belive the second code works because of the printf lack of buffering so that the error message that I display at the console displays faster than the debug assertion failed error. Anyway, this isn't the problem. The problem is why do I get that error message. What happend over there. Anyone encountered this problem before ?

Thank you!
GeneralRe: Exception Handling Pin
Niklas L14-Aug-02 4:57
Niklas L14-Aug-02 4:57 
GeneralCreateProcess Pin
Dave_14-Aug-02 3:20
Dave_14-Aug-02 3:20 
GeneralRe: CreateProcess Pin
Tomasz Sowinski14-Aug-02 4:51
Tomasz Sowinski14-Aug-02 4:51 
GeneralRe: CreateProcess Pin
Dave_14-Aug-02 4:56
Dave_14-Aug-02 4:56 
GeneralRe: CreateProcess Pin
Tomasz Sowinski14-Aug-02 4:59
Tomasz Sowinski14-Aug-02 4:59 
GeneralRe: CreateProcess Pin
Dave_14-Aug-02 5:02
Dave_14-Aug-02 5:02 
GeneralRe: CreateProcess Pin
Andreas Saurwein14-Aug-02 6:00
Andreas Saurwein14-Aug-02 6:00 
GeneralRe: CreateProcess Pin
Andreas Saurwein14-Aug-02 6:03
Andreas Saurwein14-Aug-02 6:03 
GeneralRe: CreateProcess Pin
Dave_14-Aug-02 6:25
Dave_14-Aug-02 6:25 
GeneralRe: CreateProcess Pin
Andreas Saurwein14-Aug-02 15:02
Andreas Saurwein14-Aug-02 15:02 
GeneralRe: CreateProcess Pin
Dave_15-Aug-02 1:57
Dave_15-Aug-02 1:57 
GeneralRe: CreateProcess Pin
Stuart Dootson14-Aug-02 21:03
professionalStuart Dootson14-Aug-02 21:03 
GeneralRe: CreateProcess Pin
Dave_15-Aug-02 1:55
Dave_15-Aug-02 1:55 
GeneralCFont query Pin
Nish Nishant14-Aug-02 2:34
sitebuilderNish Nishant14-Aug-02 2:34 
GeneralRe: CFont query Pin
Shog914-Aug-02 3:43
sitebuilderShog914-Aug-02 3:43 
GeneralRe: CFont query Pin
Roger Allen14-Aug-02 3:43
Roger Allen14-Aug-02 3:43 
GeneralThanks guys Pin
Nish Nishant14-Aug-02 3:51
sitebuilderNish Nishant14-Aug-02 3:51 

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.