/[H9]/trunk/FlisServer/FlisServerDlg.cpp
ViewVC logotype

Diff of /trunk/FlisServer/FlisServerDlg.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 113 by kevin, Sat Dec 1 14:18:33 2007 UTC revision 132 by kevin, Mon Dec 3 11:46:03 2007 UTC
# Line 5  Line 5 
5  #include "FlisServer.h"  #include "FlisServer.h"
6  #include "FlisServerDlg.h"  #include "FlisServerDlg.h"
7  #include <vector>  #include <vector>
8    #include ".\flisserverdlg.h"
9    
10  #ifdef _DEBUG  #ifdef _DEBUG
11  #define new DEBUG_NEW  #define new DEBUG_NEW
# Line 64  BEGIN_MESSAGE_MAP(CFlisServerDlg, CDialo Line 65  BEGIN_MESSAGE_MAP(CFlisServerDlg, CDialo
65          ON_WM_QUERYDRAGICON()          ON_WM_QUERYDRAGICON()
66          ON_MESSAGE(UWM_MYMESSAGE, OnShowString)          ON_MESSAGE(UWM_MYMESSAGE, OnShowString)
67          //}}AFX_MSG_MAP          //}}AFX_MSG_MAP
         ON_BN_CLICKED(IDC_test, OnBnClickedtest)  
68          ON_BN_CLICKED(IDCLOSE, OnBnClickedClose)          ON_BN_CLICKED(IDCLOSE, OnBnClickedClose)
69          ON_BN_CLICKED(IDC_GSMPIN, OnBnClickedGsmpin)          ON_BN_CLICKED(IDC_GSMPIN, OnBnClickedGsmpin)
70            ON_BN_CLICKED(IDC_Start, OnBnClickedStart)
71  END_MESSAGE_MAP()  END_MESSAGE_MAP()
72    
73    
# Line 102  BOOL CFlisServerDlg::OnInitDialog() Line 103  BOOL CFlisServerDlg::OnInitDialog()
103          // TODO: Add extra initialization here          // TODO: Add extra initialization here
104          StartSerial();          StartSerial();
105          DBConnect();          DBConnect();
         continueThread = 1;  
106          ResetSms = 0;          ResetSms = 0;
         /*  
 ////////////Start Tråd////////////////////////  
         MyThread *t = new MyThread(AfxGetMainWnd());  
         t->start();  
 ////////////Start Tråd////////////////////////  
 */  
         AfxBeginThread(threadWrapper,AfxGetMainWnd());  
107                    
108          return TRUE;  // return TRUE  unless you set the focus to a control          return TRUE;  // return TRUE  unless you set the focus to a control
109  }  }
# Line 169  int CFlisServerDlg::StartSerial(void) Line 162  int CFlisServerDlg::StartSerial(void)
162          CString SerialPort = "COM3";          CString SerialPort = "COM3";
163    
164          Baud = 1200;          Baud = 1200;
165          if( Serial.isOpen() ){          if( Serial.isOpen() )
166            {
167                  Serial.close();                  Serial.close();
168                  Serial.open( SerialPort, Baud );                  Serial.open( SerialPort, Baud );
169          }          }
170          else {          else
171            {
172                  Serial.open( SerialPort, Baud );                  Serial.open( SerialPort, Baud );
173          }          }
174    
# Line 185  std::vector<unsigned char> CFlisServerDl Line 180  std::vector<unsigned char> CFlisServerDl
180          std::vector<unsigned char> buf;          std::vector<unsigned char> buf;
181          while(Serial.getComstat().cbInQue > 0)          while(Serial.getComstat().cbInQue > 0)
182          {          {
183          unsigned char data = Serial.readByte();                  unsigned char data = Serial.readByte();
184    
185          buf.push_back(data);                  buf.push_back(data);
186          }          }
187          return buf;          return buf;
188  }  }
 void CFlisServerDlg::OnBnClickedtest()  
 {  
         // TODO: Add your control notification handler code here  
   
 /*        
 ///////////////Send sms stuff/////////////////  
         vector<unsigned char> tlfnr;  
         vector<unsigned char> smsdata;  
         tlfnr.push_back('2');  
         tlfnr.push_back('9');  
         tlfnr.push_back('7');  
         tlfnr.push_back('2');  
         tlfnr.push_back('2');  
         tlfnr.push_back('6');  
         tlfnr.push_back('0');  
         tlfnr.push_back('3');  
   
         SendSmsHead(tlfnr);  
   
          //35:29860132:75 <--- demo pakke;  
          vector<unsigned char> smsdata;  
         smsdata.push_back('3');  
         smsdata.push_back('5');  
         smsdata.push_back(':');  
         smsdata.push_back('2');  
         smsdata.push_back('9');  
         smsdata.push_back('8');  
         smsdata.push_back('6');  
         smsdata.push_back('0');  
         smsdata.push_back('1');  
         smsdata.push_back('3');  
         smsdata.push_back('2');  
         smsdata.push_back(':');  
         smsdata.push_back('7');  
         smsdata.push_back('5');  
   
         SendSmsData(smsdata);  
 ///////////////Send sms stuff/////////////////  
 */  
189    
 }  
190  void CFlisServerDlg::writeFrame(std::vector<unsigned char> data)  void CFlisServerDlg::writeFrame(std::vector<unsigned char> data)
191  {  {
192          for (int i=0; i<data.size(); i++)          for (int i=0; i<data.size(); i++)
# Line 261  void CFlisServerDlg::SetPin() Line 216  void CFlisServerDlg::SetPin()
216          data.push_back('5');          data.push_back('5');
217    
218          writeFrame(data);          writeFrame(data);
 /*      Sleep(750);  
         if(Serial.getComstat().cbInQue > 0)  
         {  
                 std::vector<unsigned char> answer = readFrame();  
                 Sleep(50);  
                         char array1[25];  
                         int i;  
                         for (int i=0; i<answer.size(); i++)  
                         {  
                                 array1[i] = answer[i];  
                         }  
                   
                         for (int i=0; i<answer.size(); i++)  
                         {  
                                 if ((array1[i] != 0x0A) && (array1[i] != 0x0D))  
                                 {  
                                         tekst.AppendChar(array1[i]);  
                                 }  
                         }  
                         m_Textwindow.SetWindowText(tekst);  
         }  
 */  
219  }  }
220  void CFlisServerDlg::SendSmsData(std::vector<unsigned char> data)  void CFlisServerDlg::SendSmsData(std::vector<unsigned char> data)
221  {        {      
# Line 299  void CFlisServerDlg::SendSmsData(std::ve Line 232  void CFlisServerDlg::SendSmsData(std::ve
232                  CString tekst;                  CString tekst;
233                  std::vector<unsigned char> answer = readFrame();                  std::vector<unsigned char> answer = readFrame();
234                  Sleep(50);                  Sleep(50);
235                          char array1[25];                          char array1[150];
236                          int i;                          int i;
237                          for (int i=0; i<answer.size(); i++)                          for (int i=0; i<answer.size(); i++)
238                          {                          {
# Line 349  void CFlisServerDlg::SendSmsHead(std::ve Line 282  void CFlisServerDlg::SendSmsHead(std::ve
282  void CFlisServerDlg::DBConnect()  void CFlisServerDlg::DBConnect()
283  {  {
284          CString dsn;          CString dsn;
285          dsn.Format("ODBC;Description=asd;DRIVER=PostgreSQL ANSI;SERVER=t-hoerup.dk; uid=serrenab;password=furnacemonitor;database=flisfyr;sslmode=prefer");          //dsn.Format("ODBC;Description=asd;DRIVER=PostgreSQL ANSI;SERVER=t-hoerup.dk; uid=serrenab;password=furnacemonitor;database=flisfyr;sslmode=prefer");   //Torben
286          //dsn.Format("ODBC;Description=asd;DRIVER=PostgreSQL ANSI;SERVER=192.168.134.132; uid=serrenab;password=furnacemonitor;database=flisfyr;sslmode=prefer");   //skole server          dsn.Format("ODBC;Description=asd;DRIVER=PostgreSQL ANSI;SERVER=192.168.134.132; uid=serrenab;password=furnacemonitor;database=flisfyr;sslmode=prefer");   //skole server
287          db.OpenEx(dsn, CDatabase::noOdbcDialog);          db.OpenEx(dsn, CDatabase::noOdbcDialog);
288  }  }
289  vector<Commands> CFlisServerDlg::DBRead(void)  vector<Commands> CFlisServerDlg::DBRead(void)
# Line 366  vector<Commands> CFlisServerDlg::DBRead( Line 299  vector<Commands> CFlisServerDlg::DBRead(
299                  rs.MoveFirst();                  rs.MoveFirst();
300                  while(!rs.IsEOF())                  while(!rs.IsEOF())
301                  {                  {
302                  Commands Mycom;                          Commands Mycom;
303                  rs.GetFieldValue((short)0, IDnr);                          rs.GetFieldValue((short)0, IDnr);
304                  rs.GetFieldValue(3, CommandID);                          rs.GetFieldValue(3, CommandID);
305                  rs.GetFieldValue(4, InstallationsID);                          rs.GetFieldValue(4, InstallationsID);
306                                            
307                  Mycom.IDnr = IDnr;                          Mycom.IDnr = IDnr;
308                  Mycom.CommandID = CommandID;                          Mycom.CommandID = CommandID;
309                  Mycom.InstallationsID = InstallationsID;                          Mycom.InstallationsID = InstallationsID;
310    
311                  buffer.push_back(Mycom);                          buffer.push_back(Mycom);
312                  rs.MoveNext();                          rs.MoveNext();
313                  }                  }
314          }          }
315          rs.Close();          rs.Close();
# Line 437  void CFlisServerDlg::SmsSplit(CString da Line 370  void CFlisServerDlg::SmsSplit(CString da
370          Flis = Splitter(FyrData);          Flis = Splitter(FyrData);
371          FremFejl = Splitter(FyrData);          FremFejl = Splitter(FyrData);
372          PowerFail = Splitter(FyrData);          PowerFail = Splitter(FyrData);
373  ///////////////////////////////////////////////////////////////////////////////////////////////////////                  
374  ///////////////////// Her skal sendes data til databasen //////////////////////////////////////////////                  CString SQL, Textwindow, InstallNR;
375                  m_Textwindow.GetWindowText(oldtekst);                  SQL.Format("select ID from installation where installationphonenr=%s",TlfNr);
376                  oldtekst.Append("\r\n");          
377                  oldtekst.Append("På næste linie kommer SmsCount. \r\n");                  CRecordset rs(&db);
378                  oldtekst.Append(SmsCount);                  rs.Open(AFX_DB_USE_DEFAULT_TYPE, SQL);
379                  oldtekst.Append("\r\n");                  if (rs.GetRecordCount()>0)
380                  oldtekst.Append("På næste linie kommer Temper. \r\n");                  {
381                  oldtekst.Append(Temper);                          rs.MoveFirst();        
382                  oldtekst.Append("\r\n");                          rs.GetFieldValue((short)0,InstallNR);
383                  oldtekst.Append("På næste linie kommer Flamme. \r\n");                  }
384                  oldtekst.Append(Flamme);                  rs.Close();
385                  oldtekst.Append("\r\n");  
386                  oldtekst.Append("På næste linie kommer Flis. \r\n");                  SQL.Format("insert into logtable (logtime,temperature,flamedetector,solidfuelempty,conveyorerror,powerfailure,messagenr,installationnr) Values (now(),%s,'%s','%s','%s','%s',%s,%s)",Temper, Flamme, Flis, FremFejl, PowerFail, SmsCount,InstallNR);
387                  oldtekst.Append(Flis);                  db.ExecuteSQL(SQL);
388                  oldtekst.Append("\r\n");  
389                  oldtekst.Append("På næste linie kommer FremFejl. \r\n");                  m_Textwindow.GetWindowText(Textwindow);
390                  oldtekst.Append(FremFejl);                  Textwindow.Append("\r\n");
391                  oldtekst.Append("\r\n");                  Textwindow.Append("Sms added to Log");
392                  oldtekst.Append("På næste linie kommer PowerFail. \r\n");                  m_Textwindow.SetWindowText(Textwindow);
393                  oldtekst.Append(PowerFail);                  Sleep(150);
394                  oldtekst.Append("\r\n");  
                 oldtekst.Append("På næste linie kommer TlfNR. \r\n");  
                 oldtekst.Append(TlfNr);  
                 m_Textwindow.SetWindowText(oldtekst);  
395  ///////////////////////////////////////////////////////////////////////////////////////////////////////  ///////////////////////////////////////////////////////////////////////////////////////////////////////
396  ///////////////////// Her skal sendes data til databasen //////////////////////////////////////////////  ///////////////////// Her skal sendes data til databasen //////////////////////////////////////////////
397  }  }
# Line 481  void CFlisServerDlg::OnBnClickedClose() Line 411  void CFlisServerDlg::OnBnClickedClose()
411  {  {
412          // TODO: Add your control notification handler code here          // TODO: Add your control notification handler code here
413          continueThread = 0;          continueThread = 0;
414          DeleteSms();   //<--- crasher, men gider ikke bruge flere af mine penge på at teste det med sms'er, hele close laver crash, bare ikke når jeg stepper. :S          DeleteSms();
415    
416          Sleep(500);          Sleep(500);
417          if( Serial.isOpen() )          if( Serial.isOpen() )
# Line 491  void CFlisServerDlg::OnBnClickedClose() Line 421  void CFlisServerDlg::OnBnClickedClose()
421                    
422          if(db.IsOpen())          if(db.IsOpen())
423          {          {
424          db.Close();                  db.Close();
425          }          }
426                    
427          OnOK();          OnOK();
# Line 501  void CFlisServerDlg::OnBnClickedClose() Line 431  void CFlisServerDlg::OnBnClickedClose()
431  void CFlisServerDlg::OnBnClickedGsmpin()  void CFlisServerDlg::OnBnClickedGsmpin()
432  {  {
433          // TODO: Add your control notification handler code here          // TODO: Add your control notification handler code here
434            m_Textwindow.SetWindowText("Indsætter Pinkode, efterfuldt af 60sec pause");
435            UpdateWindow();
436          SetPin();          SetPin();
437          //Sleep(5000);          Sleep(50000);
438    
439            while (Serial.getComstat().cbInQue > 0)
440            {
441                    Serial.readByte(); //Flush the incoming queue
442            }
443    
444            OnBnClickedStart();
445  }  }
446  void CFlisServerDlg::DeleteSms()  void CFlisServerDlg::DeleteSms()
447  {  {
# Line 629  void CFlisServerDlg::Reader() Line 568  void CFlisServerDlg::Reader()
568                                                  {                                                  {
569                                                          data.push_back(smscount[i]);                                                          data.push_back(smscount[i]);
570                                                  }                                                  }
571                                                    m_Textwindow.GetWindowText(oldteskst);
572                                                    oldteskst.Append("\r\n");
573                                                  for (int i=0; i<data.size();i++)                                                  for (int i=0; i<data.size();i++)
574                                                  {                                                  {
575                                                  oldteskst.AppendChar(data[i]);                                                          oldteskst.AppendChar(data[i]);
576                                                  }                                                  }
577                                                  m_Textwindow.SetWindowText(oldteskst);                                                  m_Textwindow.SetWindowText(oldteskst);
578                                                  writeFrame(data);                                                  writeFrame(data);
579                                                  Sleep(200);                                                  Sleep(200);
580                                                  ReadSms();                                                  ReadSms();
581                                                    ResetSms++;
582    
583                                  }                                  }
584                                  else if(command = "wind")                                  else if(command = "wind")
# Line 648  void CFlisServerDlg::Reader() Line 590  void CFlisServerDlg::Reader()
590                                          m_Textwindow.SetWindowText(oldtekst);                                          m_Textwindow.SetWindowText(oldtekst);
591                                  }                                  }
592                          }                          }
593                          if(ResetSms == 50)                          else
594                            {
595                                    m_Textwindow.GetWindowText(oldtekst);
596                                    oldtekst.Append("\r\n");
597                                    oldtekst.Append("Anden tekst end forventet");
598                                    oldtekst.Append("\r\n");
599                                    oldtekst.Append(tekst);
600                                    m_Textwindow.SetWindowText(oldtekst);
601                            }
602                            if(ResetSms == 20)
603                          {                          {
604                                  DeleteSms();                                  DeleteSms();
605                                    m_Textwindow.GetWindowText(oldtekst);
606                                    oldtekst.Append("\r\n");
607                                    oldtekst.Append("Slettet Sendte og læste beskeder da vi nåede grænsen.");
608                                    m_Textwindow.SetWindowText(oldtekst);
609                          }                          }
610    
611                  }                  }
612                  if (continueThread = 1)                  if (continueThread = 1)
613                  {                  {
614                                                    
615                          ////////////////DBRead stuff//////////////////                          CString testdata, dataframe,testprint, sIDnr, sCommandID, sInstallationsID, sImei;
616                          CString testdata, dataframe,testprint, sIDnr, sCommandID, sInstallationsID;                          int commandtest = 0;
617                            int iAll = 1;
618                          std::vector<Commands> data;                          std::vector<Commands> data;
619                          data = DBRead();                          data = DBRead();
620                          for (int i=0; i<data.size(); i++)                          for (int i=0; i<data.size(); i++)
# Line 667  void CFlisServerDlg::Reader() Line 623  void CFlisServerDlg::Reader()
623                                  testdata.Append(":");                                  testdata.Append(":");
624                                  testdata.Append(data[i].CommandID);                                  testdata.Append(data[i].CommandID);
625                                  testdata.Append(":");                                  testdata.Append(":");
626                                  testdata.Append(data[i].InstallationsID);                                  commandtest = atoi(data[i].CommandID);
627                                  testdata.Append(":");  
628                                    if(commandtest > 1)
629                                    {
630                                            testdata.Append(data[i].InstallationsID);
631                                            testdata.Append(":");
632                                    }
633                          }                          }
634                          sIDnr = Splitter(testdata);                          sIDnr = Splitter(testdata);
635                          sCommandID = Splitter(testdata);                          sCommandID = Splitter(testdata);
636                          sInstallationsID = Splitter(testdata);                          sInstallationsID = "0";
637                            if (commandtest > 1)
638                            {
639                                    sInstallationsID = Splitter(testdata);
640                                    iAll = 0;
641                            }
642    
                         testprint.Append("sIDnr på næste linie\r\n");  
                         testprint.Append(sIDnr);  
                         testprint.Append("\r\n");  
                         testprint.Append("sCommandID på næste linie\r\n");  
                         testprint.Append(sCommandID);  
                         testprint.Append("\r\n");  
                         testprint.Append("sInstallationsID på næste linie\r\n");  
                         testprint.Append(sInstallationsID);  
                         m_Textwindow.SetWindowText(testprint);  
                           
                           
643                          if (sIDnr.GetLength() > 0)                          if (sIDnr.GetLength() > 0)
644                          {                          {
645                                  DBReadData(sIDnr,sCommandID,sInstallationsID);                                  DBReadData(sIDnr,sCommandID,sInstallationsID);
646                          }                          }
647                          Sleep(500);                          Sleep(500);
                         ////////////////DBRead stuff//////////////////    
648                  }                  }
649  }  }
650  void CFlisServerDlg::DBReadData(CString IDnr,CString CommandID,CString InstallationsID)  void CFlisServerDlg::DBReadData(CString IDnr,CString CommandID,CString InstallationsID)
651  {  {
652          CString TlfNr;          CString ServerTlfNr;
653            int i = 0;
654            ServerTlfNr = "29860132";
655                                    
656          //kald dbreadphone som du kalder dbread          
657          std::vector<Installation> inst;          std::vector<Installation> inst;
658          inst = DBReadPhone(InstallationsID);          inst = DBReadPhone(InstallationsID);
659          for (int i=0; i<inst.size(); i++)          while (i < inst.size())
660          {          {
661                    CString TlfNr, Imei, updaterate;
662                    TlfNr.Empty();
663                    Imei.Empty();
664                    updaterate.Empty();
665    
666                  CString dataen = inst[i].InstPhoneNr;                  CString dataen = inst[i].InstPhoneNr;
667                  TlfNr.Append(dataen);                  TlfNr.Append(dataen);
668          }                  CString Imeidata = inst[i].Imei;
669                    Imei.Append(Imeidata);
670                    CString updaterat = inst[i].Updaterate;
671                    updaterate.Append(updaterat);
672                    i++;
673            
674          vector<unsigned char> tlfnr;          vector<unsigned char> tlfnr;
675          for (int i=0; i<TlfNr.GetLength(); i++)          for (int i=0; i<TlfNr.GetLength(); i++)
676          {          {
677                  tlfnr.push_back(TlfNr[i]);                  tlfnr.push_back(TlfNr[i]);
678          }          }
679            
680            int calcimei;
681            __int64 buf;
682    
683            buf = atof(Imei);
684            
685            calcimei = tversum(buf);
686            
687            Imei.Format("%d",calcimei);
688            
689          SendSmsHead(tlfnr);          SendSmsHead(tlfnr);
690          Sleep(500);          Sleep(250);
691          //35:29860132:75 <--- demo pakke;          
692          vector<unsigned char> smsdata;          vector<unsigned char> smsdata;
693          smsdata.push_back('3');          
694          smsdata.push_back('5');          for (int i=0; i<Imei.GetLength(); i++)
695            {
696                    smsdata.push_back(Imei[i]);
697            }
698          smsdata.push_back(':');          smsdata.push_back(':');
699          smsdata.push_back('2');          for (int i=0; i<ServerTlfNr.GetLength(); i++)
700          smsdata.push_back('9');          {
701          smsdata.push_back('8');                  smsdata.push_back(ServerTlfNr[i]);
702          smsdata.push_back('6');          }
         smsdata.push_back('0');  
         smsdata.push_back('1');  
         smsdata.push_back('3');  
         smsdata.push_back('2');  
703          smsdata.push_back(':');          smsdata.push_back(':');
704          smsdata.push_back('7');          for (int i=0; i<updaterate.GetLength(); i++)
705          smsdata.push_back('5');          {
706                    smsdata.push_back(updaterate[i]);
707            }
708    
709          SendSmsData(smsdata);          SendSmsData(smsdata);
710          Sleep(250);          Sleep(500);
711            
712          CString SQL;          }
713                    CString SQL, Textwindow;
714                    SQL.Format("update command set executed=now() where id=%s",IDnr);
715                    db.ExecuteSQL(SQL);
716                    m_Textwindow.GetWindowText(Textwindow);
717                    Textwindow.Append("\r\n");
718                    Textwindow.Append("Command executed");
719                    m_Textwindow.SetWindowText(Textwindow);
720                    Sleep(150);
721    
         SQL.Format("update command set executed=now() where id=%s",IDnr);  
         db.ExecuteSQL(SQL);  
         Sleep(150);  
722  }  }
723  vector<Installation> CFlisServerDlg::DBReadPhone(CString sInstallationsID)  vector<Installation> CFlisServerDlg::DBReadPhone(CString sInstallationsID)
724  {  {
725          vector<Installation> buffer;          vector<Installation> buffer;
726    
727          CString SQL, phonenr;          CString SQL, phonenr, imei, updaterate;
728          SQL.Format("select installationphonenr from installation WHERE id = %s",sInstallationsID);          int installernull;
729            Installation Myinst;
730            installernull = atoi(sInstallationsID);
731            if (installernull > 1)
732            {
733                    SQL.Format("select installationphonenr, imei, updaterate from installation WHERE id = %s", sInstallationsID);
734            }
735            else if(installernull < 2)
736            {
737                    SQL.Format("select installationphonenr, imei, updaterate from installation");
738            }
739          CRecordset rs(&db);          CRecordset rs(&db);
740          rs.Open(AFX_DB_USE_DEFAULT_TYPE, SQL);          rs.Open(AFX_DB_USE_DEFAULT_TYPE, SQL);
741          if (rs.GetRecordCount()>0)          if (rs.GetRecordCount()>0)
# Line 752  vector<Installation> CFlisServerDlg::DBR Line 743  vector<Installation> CFlisServerDlg::DBR
743                  rs.MoveFirst();                  rs.MoveFirst();
744                  while(!rs.IsEOF())                  while(!rs.IsEOF())
745                  {                  {
746                  Installation Myinst;                  
747                  rs.GetFieldValue((short)0,phonenr);                          rs.GetFieldValue((short)0,phonenr);
748                            rs.GetFieldValue(1,imei);
749                  Myinst.InstPhoneNr.Append(phonenr);                          rs.GetFieldValue(2,updaterate);
750    
751                            Myinst.InstPhoneNr = phonenr;
752                            Myinst.Imei = imei;
753                            Myinst.Updaterate = updaterate;
754    
755                  buffer.push_back(Myinst);                          buffer.push_back(Myinst);
756                  rs.MoveNext();                          rs.MoveNext();
757                  }                  }
758          }          }
759          rs.Close();          rs.Close();
760          return buffer;          return buffer;
 }  
761    }
762    int CFlisServerDlg::tversum(__int64 input)
763    {
764            int sum = 0;
765            while (input > 0)
766            {
767                    sum += (input %10);
768                    input /= 10;
769            }
770            return sum;
771    }
772    void CFlisServerDlg::OnBnClickedStart()
773    {
774    // TODO: Add your control notification handler code here
775    
776            continueThread = 1;
777            m_Textwindow.SetWindowText("Started");
778            AfxBeginThread(threadWrapper,AfxGetMainWnd());
779    }

Legend:
Removed from v.113  
changed lines
  Added in v.132

  ViewVC Help
Powered by ViewVC 1.1.20