Click here to Skip to main content
16,008,954 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: thread pool Pin
Daniel Turini3-Dec-02 9:22
Daniel Turini3-Dec-02 9:22 
Generalcreating .wav files Pin
chrishall33-Dec-02 8:32
chrishall33-Dec-02 8:32 
GeneralRe: creating .wav files Pin
Selevercin3-Dec-02 11:44
Selevercin3-Dec-02 11:44 
GeneralInjected code weirdness....VC 7 Pin
-=jarl=-3-Dec-02 8:28
-=jarl=-3-Dec-02 8:28 
Generalcheck if two process exist and close the last opened and show the first Pin
youssef3-Dec-02 8:21
youssef3-Dec-02 8:21 
GeneralRe: check if two process exist and close the last opened and show the first Pin
Paul M Watt3-Dec-02 9:02
mentorPaul M Watt3-Dec-02 9:02 
GeneralRe: check if two process exist and close the last opened and show the first Pin
valikac3-Dec-02 9:04
valikac3-Dec-02 9:04 
Generalwierd problems w/ vC++ , help ?! :) Pin
joshfl3-Dec-02 7:25
joshfl3-Dec-02 7:25 
im having this strange problem with a program im developing.

The program compiles & links with 0 errors, and 0 warnings on both Debug, and Release Configurations.

The Problem is midway thru execution of the main function on my Release Compile , I get one of those mysterious MFC error dialog boxes (send / dont send to microsoft) that doesnt really tell me much about the problem....

the code that this error is contained in is .......(sorry , i know its a little hard to read this way, this text box takes out the formatting... )


/// here will start the directory iteration
for (int ji=0;ji<fia.GetSize();ji++) {

char *c1 = new char[100000];

//read into c1
FILE *input;
if ( (input = fopen( fia[ji].GetFilePath(), "r" ) ) == NULL )
{
AfxMessageBox( "Could not open file....\n" );
}
numread = fread( c1, sizeof( char ), 100000, input );
c1[++numread] = '\0';
fclose( input );

// call api function
if(NULL != dllHandle)
{
// If the function address is valid, call the api's function.
if (runTimeLinkSuccess = (NULL != BounceCheckPtr))
{
result = BounceCheckPtr(*c1, *c2, len, *c3, *c4);
}
}

///// prepare database entry
UCHAR szSqlStr[128];
if (result == 0) {
sprintf((char*)szSqlStr,"INSERT into bouncetest Values ('GB', '%s')",c2);
}
if (result == 1) {
sprintf((char*)szSqlStr,"INSERT into bouncetest Values ('HB', '%s')",c2);
}
if (result == 2) {
sprintf((char*)szSqlStr,"INSERT into bouncetest Values ('SB', '%s')",c2);
}
if (result == 3) {
sprintf((char*)szSqlStr,"INSERT into bouncetest Values ('GB', '%s')",c2);
}
if (result == 9) {
sprintf((char*)szSqlStr,"INSERT into bouncetest Values ('GB', '%s')",c2);
}

// set return code
int m_iIdentification_Code = result;

// Switch Structure
switch( m_iIdentification_Code )
{

case 1:
// Allocate memory for the statement handle
retcode = SQLAllocStmt (hDBC, &hStmt);
// Prepare the SQL statement by assigning it to the statement handle
retcode = SQLPrepare (hStmt, szSqlStr, sizeof (szSqlStr));
// Execute the SQL statement handle
retcode = SQLExecute (hStmt);
// Project only column 1 which is the models
SQLBindCol (hStmt, 1, SQL_C_CHAR, szModel, sizeof(szModel), &cbModel);
// Get row of data from the result set defined above in the statement
retcode = SQLFetch (hStmt);
// Free the allocated statement handle
SQLFreeStmt (hStmt, SQL_DROP);
break;

default:;

}

// delete memory i create on heap
delete[] c1;
}


it loops once, and then it dies on the second file read section...
any ideas / suggestions... would be appreciated Smile | :)

GeneralRe: wierd problems w/ vC++ , help ?! :) Pin
-=jarl=-3-Dec-02 8:36
-=jarl=-3-Dec-02 8:36 
GeneralRe: wierd problems w/ vC++ , help ?! :) Pin
Christian Graus3-Dec-02 10:47
protectorChristian Graus3-Dec-02 10:47 
GeneralRe: wierd problems w/ vC++ , help ?! :) Pin
joshfl4-Dec-02 8:02
joshfl4-Dec-02 8:02 
GeneralRe: wierd problems w/ vC++ , help ?! :) Pin
Christian Graus4-Dec-02 8:47
protectorChristian Graus4-Dec-02 8:47 
QuestionHow to change caption of Property Page Pin
Alois Kraus3-Dec-02 6:57
Alois Kraus3-Dec-02 6:57 
AnswerRe: How to change caption of Property Page Pin
Navin3-Dec-02 7:30
Navin3-Dec-02 7:30 
AnswerYay, I figured it out! Pin
Navin3-Dec-02 7:45
Navin3-Dec-02 7:45 
GeneralRe: Yay, I figured it out! Pin
Alois Kraus4-Dec-02 0:58
Alois Kraus4-Dec-02 0:58 
AnswerRe: How to change caption of Property Page Pin
Andrew Hafen3-Dec-02 7:51
Andrew Hafen3-Dec-02 7:51 
GeneralMFC Sockets - Urgent!!! Pin
Vladimir Georgiev3-Dec-02 6:51
Vladimir Georgiev3-Dec-02 6:51 
GeneralRe: MFC Sockets - Urgent!!! Pin
Shamoon3-Dec-02 7:00
Shamoon3-Dec-02 7:00 
Questionhow to receive activity notification for dynamically created CComboBox? Pin
Anonymous3-Dec-02 6:39
Anonymous3-Dec-02 6:39 
AnswerRe: how to receive activity notification for dynamically created CComboBox? Pin
Roger Allen4-Dec-02 2:00
Roger Allen4-Dec-02 2:00 
GeneralWindows CE: adding popup menu to lower menubar (which is a toolbar) Pin
Anonymous3-Dec-02 6:34
Anonymous3-Dec-02 6:34 
GeneralRender html to image Pin
roel_3-Dec-02 6:25
roel_3-Dec-02 6:25 
GeneralRe: Render html to image Pin
Scott H. Settlemier3-Dec-02 6:39
Scott H. Settlemier3-Dec-02 6:39 
GeneralRe: Render html to image Pin
Scott H. Settlemier3-Dec-02 6:44
Scott H. Settlemier3-Dec-02 6:44 

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.