Hi All I am using MFC SDI application. We give release version of executable to the customer. Application get's crahses in real time. I heard through pdb file we can debug the release version. Can any one tell how to use the pdb file. In real time we cannot debug the executable via code. Also it occurs in rare case. Finding the solution is bit difficult. Can anyone assist me in resolving this issue.
VVVimal
Posts
-
Using pdb file -
Save web pageI am not using Webrowser control But it is an SDI appllication with CHtmlView..... I just want to save a web page and read them back. Could u give any information on this...........
-
Save web pageVisual C++ Solution Accomplishing this task from a Visual C++ host is very straightforward. You can use an IWebBrowser2 interface to call the QueryInterface method for the IHTMLDocument2 interface. After you obtain a pointer to the document, then call QueryInterface for the IPersistFile interface. After you obtain this interface pointer, you can call the save method to save the file to disk. HRESULT hr = E_FAIL; IDispatch* pDisp = NULL; IHTMLDocument2* pDoc = NULL; pDisp = m_webOC.GetDocument(); if(SUCCEEDED(hr = pDisp->QueryInterface(IID_IHTMLDocument2,(void**)&pDoc))) { IPersistFile* pFile = NULL; if(SUCCEEDED(pDoc->QueryInterface(IID_IPersistFile,(void**)&pFile))) { LPCOLESTR file = L"c:\\test1.htm"; pFile->Save(file,TRUE); } } Hi all I have seen this ariticle in MSDN. In that i don't know m_webOC belongs to which object. If so how to create that object.
-
Tree Ctrl// Add URL void LeftView::AddUrl(void) { CTreeCtrl& trCtrl = GetTreeCtrl(); HTREEITEM hitem,hitem1,hitem3; hitem = trCtrl.InsertItem(_T("URL"),TVI_ROOT,TVI_LAST); for(inti=0; i<arrLines.GetSize();i++) { CString str = arrLines.GetAt(i); trCtrl.InsertItem(str,hitem,TVI_LAST); intk; } } // REad text arrLines.RemoveAll(); CString pszFileName(_T("D:\\URL\\TextFile.txt")); CString strLine =_T(""); TRY { CStdioFile file(pszFileName, CFile::modeRead); while( file.ReadString(strLine)) { arrLines.Add(strLine); } } CATCH_ALL(e) { e->ReportError(); // shows what's going wrong } END_CATCH_ALL void LeftView::OnTvnSelchanged(NMHDR *pNMHDR, LRESULT *pResult) { /*
*/ CString str("Test"); sFullList=" "; sFullList += tTree.GetItemText(pNMTreeView->itemNew.hItem); if( sFullList.CompareNoCase("URL") == 0) { GetDocument ()->UpdateAllViews ( this, 1L, (CObject *) &sFullList ); } *pResult = 0; } BOOL LeftView::PreCreateWindow(CREATESTRUCT& cs) { // TODO: Add your specialized code here and/or call the base class cs.style |= TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESATROOT | TVS_EDITLABELS; returnCTreeView::PreCreateWindow(cs); } CSplitterWindowDoc* LeftView::GetDocument() // non-debug version is inline { ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSplitterWindowDoc))); return(CSplitterWindowDoc*)m_pDocument; } void CSplitterWindowView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) { // TODO: Add your specialized code here and/or call the base class if(lHint==1L) { CString sListToDisplay = ((CString*)pHint)->GetBuffer(0); Navigate2(sListToDisplay,NULL,NULL); } CSingleDocTemplate* pDocTemplate; pDocTemplate = newCSingleDocTemplate( IDR_MAINFRAME, RUNTIME_CLASS(CSplitterWindowDoc),*/ NM_TREEVIEW *pNMTreeView = (NM_TREEVIEW *) pNMHDR; CTreeCtrl &tTree = this->GetTreeCtrl (); /* -
How to save Web pageHi I have list of URL in a text file. I want to save all the URL in local mahcine and display in a HTmlView. Can any give idea on this
-
pdb VC++Can any one give tips in how to use pdb file. Currently i am working in real time project. Where we give only the executable to customer. Rare occasion the appilication crashes. Is analysing pdb is good procedure. If so how to generate pdb for release version VC++. What settings has to be made set . If any give me simple example it much helpful for me.Thanks in advance.......
-
CClientDcHi I am using CClientDc in OnTimer(). Sample Code: OnTimer() { CClientDc dc; DisplayAll(dc,xCor,Ycor); Release(&dc); } But When run the program through the Deleaker I am getting GDI leak in this part. I am not sure weather the CClientDc is released. Also my applicatin size increases continously. Pls help to resolve this problem.
-
Popup Menuwhen the context menu is dismissed my application takes a long time to redraw the area that was obscured by the menu. Can anyone give solution to this.
-
Context MenuExactly. But the other portions are ok.
-
Context MenuHi The project i am working currently draws collection of bitmaps in to screen. In the client area in some point it display a context menu on the screen. But once the popup menu is dropped and disappear , it taking more time to redraw the bitmaps. It happens only to context menu portion.Also if it runs for 24 hours the delay is increasing.l Thanks in advance.
-
SleepI just added WatiForSingleObject(threadHandle,INFINITE) now working fine. Can any one tell why does it so
-
Calling The Thread functionUNIT SimpleThread::ThreadFunc(LPARAM lp) { While(1) { printf("Test"); } } SimpleThread::Start() { DWORD dwThreadId, dwThrdParam = 1; threadHandle = CreateThread( NULL, 0, SimpleThread::ThreadFunc, dwThrdParam, 0, &dwThreadId); } When call the thread it does't get called. Also somtimes it called but the while loop terminate within a while.Can any give me solution to this
-
ThreadUNIT SimpleThread::ThreadFunc(LPARAM lp) { While(1) { printf("Test"); } } SimpleThread::Start() { DWORD dwThreadId, dwThrdParam = 1; threadHandle = CreateThread( NULL, 0, SimpleThread::ThreadFunc, dwThrdParam, 0, &dwThreadId); } When call the thread it does't get called. Also somtimes it called but the while loop terminate within a while.Can any give me solution to this
-
SleepBut i need a Sleep() function over there. Because i need a function to be get called every 1000 milliseconds
-
STL MapHi Here is sample code.... LocoDetails *locoValue = new LocoDetails(str1, ltime, latitude, longitude, speed, direction, trackPos, trackNum, alarmsNum, failsNum); Later i just add this to a STL map locoDetailsList.insert(pairstd::wstring,LocoDetails\*(locoValue->GetLocoID(),locoValue)); for(pastIterater = locoDetailsList.begin();pastIterater != locoDetailsList.end();pastIterater++) { locoDetailsList.erase(pastIterater++); } Will the memory occupied by locoValue get removed or there a memory leak. How can i solve this........ Thanks
-
SleepHi I just tried to call Sleep(1000) in a thread function But when i tried to Unit threadFun(LPVOID lparam) { while(1) { Sleep(1000); // When tried to give break point over here appliacation gets terminates ............ } } Can any one give me solution to this Thanks
-
SYSTEMTIMEHi Can anyone tell how to compare systemtime. SYSTEMTIME t1; SYSTEMTIME t2; GetSystemTime(&t1); GetSystemTime(&t2); Is this a good approach t1==t2 Thanks
-
SYSTEMTIMEHi Can anyone tell how to compare systemtime. SYSTEMTIME t1; SYSTEMTIME t2; GetSystemTime(&t1); GetSystemTime(&t2); Is this a good approach t1==t2 Thanks
-
Compare two different STL listHi I had two diffrent class Student { public: string name; int age; }; list _studentList1; list _studentList2; I just want to compare wheather the content of two list are same. Can any one tell me how to do that..... Below i have implemented one example for(std::list::iterator iterator1 =_studentList1.begin();studentList1.end() != iterator1; ++iterator1) { for(std::list::iterator iterator2 =_studentList2.begin();studentList2.end() != iterator2; ++iterator2) { Student* studentDetails1 = *iterator1; Student* studentDetails2 = *iterator2; if(!strcmp(studentDetails1->name ,studentDetails2->name) if(studentDetails1->age== studentDetails2->age) } } Is this is best approach to compare List ++iterator) Thanks in advance
-
XercesDomParserDOMElement* elementRoot = domDocumet->getDocumentElement(); DOMTreeWalker *walker =domDocumet->createTreeWalker(elementRoot,DOMNodeFilter::SHOW_ELEMENT,NULL, true); DOMNode *pCurrent = NULL; for ( pCurrent = walker->getCurrentNode();pCurrent != 0; pCurrent = walker->nextNode() ) { if(pCurrent->getNodeType() == DOMNode::ELEMENT_NODE) { char *str = XMLString::transcode(pCurrent->getNodeName()); if(!strcmp(str,"LocoId")) int i=0; //myDetails->LocoId = XMLString::transcode(text->getNodeValue()); if(!strcmp(str,"Latitude")) //myDetails->Lattitude = XMLString::transcode(text->getNodeValue()); XMLString::release(&str); } } Could you please tell me where to set the filter as Locomotive you also mentioned "From the root node, apply an XPath of "//Locomotive " what does it mean Thanks you also mentioned as