May 14, 2012 #1 J jawadali477 Member level 1 Joined Dec 23, 2010 Messages 41 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,286 Activity points 1,588 hi, i'm developing GUI using MFC in vs2008. i have developed code and it builds fine but when i debug my code, it gives system error 0000007B. part of the code that gives this error is given below + variable initialization. Code C++ - [expand]1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 int COMportNum= 3; portstream_fd COMstream; portstream_fd pstream; char COMportPrefix[10] = "COM"; char COMportName[256]; sprintf(COMportName, "%s%d", COMportPrefix, COMportNum); // initialize serial port COM3 strng = CString(COMportName); strng.Format(_T("%0.9s"), strng); SetDlgItemText(IDC_STAT, strng); set_baud_rate(BaudRate); COMstream = open_host_port(COMportName); //opens serial port COM3 if ( COMstream == PORT_NOT_OPENED ) //conditional check if COM3 is opened { stw.Format(_T("%08X"), GetLastError()); //generates error if any SetDlgItemText(IDC_PTUPORT, stw); } else SetDlgItemText(IDC_PTUPORT, (LPCTSTR) L"Ok"); can anyone please help me with this error. Regards Jawad
hi, i'm developing GUI using MFC in vs2008. i have developed code and it builds fine but when i debug my code, it gives system error 0000007B. part of the code that gives this error is given below + variable initialization. Code C++ - [expand]1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 int COMportNum= 3; portstream_fd COMstream; portstream_fd pstream; char COMportPrefix[10] = "COM"; char COMportName[256]; sprintf(COMportName, "%s%d", COMportPrefix, COMportNum); // initialize serial port COM3 strng = CString(COMportName); strng.Format(_T("%0.9s"), strng); SetDlgItemText(IDC_STAT, strng); set_baud_rate(BaudRate); COMstream = open_host_port(COMportName); //opens serial port COM3 if ( COMstream == PORT_NOT_OPENED ) //conditional check if COM3 is opened { stw.Format(_T("%08X"), GetLastError()); //generates error if any SetDlgItemText(IDC_PTUPORT, stw); } else SetDlgItemText(IDC_PTUPORT, (LPCTSTR) L"Ok"); can anyone please help me with this error. Regards Jawad
May 15, 2012 #2 mgate Full Member level 4 Joined Apr 2, 2012 Messages 197 Helped 36 Reputation 74 Reaction score 37 Trophy points 1,308 Location Portugal Activity points 2,717 Insert a debug point at line 16 to check if port opens before it crashes .... Check microsoft info about the error 0000007B https://support.microsoft.com/kb/324103 Last edited: May 15, 2012
Insert a debug point at line 16 to check if port opens before it crashes .... Check microsoft info about the error 0000007B https://support.microsoft.com/kb/324103