Hi All, My C++ console application is crashing randomly. I heard about a Visual Studio 2010(Ultimate) version's feature "IntelliTrace". But, sad part is that IntelliTrace in VS2010 is not available for debugging C++ applications. Does anybody know about any debugger which has similar feature? Or any suggestions about how to approach to solve this kind of random crash problems? Ramana G
ramana g
Posts
-
Regarding IntelliTrace equivalent tool in C++ -
Unhandled exceptionIf you are calling DLL functions, check whether you are passing correct parameters, if any?
-
AfxBeginThread and ON_THREAD_MESSAGE does not work using PostThreadMessageI think you are creating a worker thread. As per my knowledge, you may need to create a UI thread inorder to post messages to the new thread. See the other version of AfxBeginThread function.
-
CDaoRecordset Problem..ORDER BY can be achieved by setting the COLUMN_NAME by which you want to sort the records to the "m_strSort" member of the CDaoRecordset class.
-
Can we use registry for..Hi all, Is it ok if we write thousands of key-value entries into registry? How it will effect the performance of the system? Please suggest me.. (i know, this question is not related to this forum, but, i dont know where can i get exact information about this. i googled before posting the message to this forum, but, could not get proper information :( )
-
How can i make a application which can run on mac/linux/windows?simple is use Java :)
-
Want struct parameter by default set to NULLi used a pointer to class as default parameter in c++. i dont know about c
-
Want struct parameter by default set to NULLdefault parameter?? search for "default parameter"
-
Singleton using mutex for windows application (exe)you can add some code like this... in your application initinstance HANDLE hMutex = CreateMutex( NULL, TRUE, "MyMutex" ); if( GetLastError() == ERROR_ALREADY_EXISTS ) {//application is already running. dont proceed further CloseHandle( hMutex ); return FALSE; }
-
Query about "Fibers"the link answered all my questions thank you :)
-
Query about "Fibers"Hi All I heard the term "Fiber" for the first time. What is Fiber? Where exactly it is used (any example)? Is it a good technique to use Fibers in my program? Please provide any related links Thank you.
-
threadsMay be you can use something like this... DWORD dwMainThreadId = 0; DWORD dwProcessId = 0; dwMainThreadId = GetWindowThreadProcessId( hMainWnd, &dwProcessId); if( dwMainThreadId == GetCurrentThreadId() ) { //Main Thread } else { //Thread specialization code } I have not tested this snippet.
-
dll problemTo debug your DLL, Set DLL project as active and under Project->Settings->Executable for Debug session browse the exe which is using your DLL.
-
How to add Socket supportUse WinSock API (Win32APIs), and write some wrapper classes around SOCKET handle. Use a worker thread to receive data, Parse received data and frame the MESSAGE, which you use to communicate over network. MESSAGE can be something like... struct MESSAGE{ int nMsgId; //To describe data BOOL boolFlag; //Req / Res BYTE *pData; //Actual Data //Some more fields depending on your requirement ... ... }; i think this is enough to start with. You can explore and learn as you progress.
-
How to add Socket supportBefore using CSocket read this... http://tangentsoft.net/wskfaq/articles/csocket.html[^]
-
Method to get file pathOverride the CDocument::OnOpenDocument(LPCTSTR lpszPathName) function. The arguement contains the File Name which is selected in Open dialog
-
Is it okay to cast from int to unsigned char *?Another way is... int nNum = 10; char Data[4] = {0}; memcpy(&Data, &nNum, 4);
-
Strange string problem ..."the debugger shows some garbage at the end, since the string is not 0 terminated" as Pallini told, this what is happening in your case. you better increase your buffer length to 17 and check again, then the debugger shows the string properly.
-
Query about Tray Iconthank you David :)
-
Query about Tray IconHi all, I have developed a dialog based application. In CMyDialog::OnInitDialog() i wrote code to add TrayIcon. HICON hIcon = NULL; m_NotifyIconData.cbSize = sizeof(NOTIFYICONDATA); m_NotifyIconData.hWnd = m_hWnd; m_NotifyIconData.uID = IDR_MAINFRAME; m_NotifyIconData.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; m_NotifyIconData.uCallbackMessage = ID_TRAY_MESSAGE; //WM_USER + 1 hIcon = (HICON) LoadIcon(AfxGetInstanceHandl(),MAKEINTRESOURCE (IDR_MAINFRAME)); m_NotifyIconData.hIcon = hIcon; strcpy(m_NotifyIconData.szTip, "My Tray Icon"); Shell_NotifyIcon(NIM_ADD, &m_NotifyIconData); if (hIcon) DestroyIcon(hIcon); It successfully added Tray Icon to the Notification area. My sample application is running well. But, when i kill windows "explorer.exe" process from task manager and start "explorer" again, TrayIcon is missing in Notification area. I want Tray icon to be added again in this scenario. How to do this? Thank you...