Click here to Skip to main content
15,907,497 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ctrl+alt+del Pin
r i s h a b h s29-Dec-02 23:09
r i s h a b h s29-Dec-02 23:09 
GeneralRe: ctrl+alt+del Pin
jmkhael30-Dec-02 1:56
jmkhael30-Dec-02 1:56 
GeneralRe: ctrl+alt+del Pin
Dominik Reichl30-Dec-02 7:32
Dominik Reichl30-Dec-02 7:32 
GeneralVirtual list VS Text Callbacks Pin
alex.barylski29-Dec-02 17:54
alex.barylski29-Dec-02 17:54 
Questioncrash in debug, but ok in release? Pin
zecodela29-Dec-02 17:01
zecodela29-Dec-02 17:01 
AnswerRe: crash in debug, but ok in release? Pin
zecodela29-Dec-02 17:04
zecodela29-Dec-02 17:04 
AnswerRe: crash in debug, but ok in release? Pin
Todd C. Wilson29-Dec-02 17:08
Todd C. Wilson29-Dec-02 17:08 
GeneralRe: crash in debug, but ok in release? Pin
zecodela29-Dec-02 17:16
zecodela29-Dec-02 17:16 
part "add to list"

/*** add A to list A (code is the same inside AddToCommandList) ***/
AddToCommandList(tar_moni_id, tar_port_num, control, priv);

/*** add B to list B ***/
binding_ack_list *pAck = new binding_ack_list;
pAck->moni_id = moni_id;
pAck->tar_moni_id = tar_moni_id;
pAck->tar_port = tar_port_num;
pAck->done = false;
sysinfo.bindingacklist.AddTail(pAck);


part "use the list"
void CPooling::CommandControl()
{
byte data[16];
data[0] = 0xff;
data[2] = 0x34;
data[3] = 0 ;
data[8] = 0xfe;

cmd_list *pCommand;
POSITION pos1, pos2;
CString temp;

m_CS.Lock();
for (pos1 = sysinfo.cmdlist.GetHeadPosition(); (pos2 = pos1) != NULL;)
{
pCommand = sysinfo.cmdlist.GetNext(pos1);

if (pCommand->trial > 2)
{// remove
sysinfo.cmdlist.RemoveAt(pos2); //remove in list if trial > 3
delete pCommand;
}
else
{// read
data[1] = pCommand->moni_id;
data[4] = pCommand->port;
data[5] = pCommand->control;
data[6] = pCommand->priv;
data[7] = genChkSum(data, 6);
pCommand->trial++;
for (int i=0; i<9; i++)
{
p232->WriteComm(&data[i], 1);
Sleep(100);
}
//p232->WriteComm(data, 9);
Sleep(timeout);
}
}
m_CS.Unlock();
}


Once it return from this function, the program crash!!!
GeneralRe: crash in debug, but ok in release? Pin
Todd C. Wilson29-Dec-02 17:49
Todd C. Wilson29-Dec-02 17:49 
GeneralRe: crash in debug, but ok in release? Pin
zecodela29-Dec-02 20:14
zecodela29-Dec-02 20:14 
GeneralRe: crash in debug, but ok in release? Pin
Todd C. Wilson30-Dec-02 1:36
Todd C. Wilson30-Dec-02 1:36 
AnswerRe: crash in debug, but ok in release? Pin
Adi Shavit30-Dec-02 4:44
Adi Shavit30-Dec-02 4:44 
AnswerRe: crash in debug, but ok in release? Pin
Ted Ferenc30-Dec-02 10:27
Ted Ferenc30-Dec-02 10:27 
GeneralNew to C++, compile problems. Pin
king_ezela29-Dec-02 16:44
king_ezela29-Dec-02 16:44 
GeneralRe: New to C++, compile problems. Pin
Todd C. Wilson29-Dec-02 16:53
Todd C. Wilson29-Dec-02 16:53 
GeneralRe: New to C++, compile problems. Pin
Michael Dunn29-Dec-02 18:07
sitebuilderMichael Dunn29-Dec-02 18:07 
GeneralRe: New to C++, compile problems. Pin
Ravi Bhavnani29-Dec-02 16:54
professionalRavi Bhavnani29-Dec-02 16:54 
GeneralRe: New to C++, compile problems. Pin
king_ezela29-Dec-02 17:07
king_ezela29-Dec-02 17:07 
GeneralRe: New to C++, compile problems. Pin
S O S29-Dec-02 22:21
S O S29-Dec-02 22:21 
GeneralRe: New to C++, compile problems. Pin
Nick Parker29-Dec-02 17:05
protectorNick Parker29-Dec-02 17:05 
GeneralRe: New to C++, compile problems. Pin
Michael Dunn29-Dec-02 18:10
sitebuilderMichael Dunn29-Dec-02 18:10 
GeneralRe: New to C++, compile problems. Pin
Florin Ochiana30-Dec-02 10:59
Florin Ochiana30-Dec-02 10:59 
GeneralA tricky one :o) Pin
RaulGonzalez29-Dec-02 16:20
RaulGonzalez29-Dec-02 16:20 
GeneralRe: A tricky one :o) Pin
Nick Parker29-Dec-02 16:37
protectorNick Parker29-Dec-02 16:37 
GeneralRe: A tricky one :o) Pin
RaulGonzalez29-Dec-02 16:41
RaulGonzalez29-Dec-02 16:41 

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.