Problem: OLE Error 80030002

Problem: OLE Error 80030002 I am coding a Program in Borland C++ Builder 5.  I am using ADO Connections, queries, datasets, and command components.  I am initializing the COM Objects with CoInitialize(NULL), but i am always getting a return value of S_FALSE.  I realize that this means that the COM Library is already open, but I only do this call once and have a corresponding CoUninitialize for the CoInitialize.  Everything Continue Reading →

Resize/scroll flicker in ownerdraw CListCtrl

Question : Resize/scroll flicker in ownerdraw CListCtrl I have an ownerdrawn list control which resizes and scrolls just fine, but is there a way to reduce the noticeable flicker?   Solution: Resize/scroll flicker in ownerdraw CListCtrl Have you tried looking at the SetRedraw method in CWnd? You can temporarily turn off redrawing, until the size if fully known and then redraw everything.

Async InternetReadFileEx() problem

Question : Async InternetReadFileEx() problem Hi! I need to do async communications using HttpSendRequest() and InternetReadFile(). HttpSendRequest() returns ERROR_IO_PENDING and I wait for INTERNET_STATUS_REQUEST_COMPLETE event in OnStatusCallback(), then I call InternetReadFileEx() which returns incomplete data (usually a few hundreds bites short). I would apreciate any help. DWORD CAsyncSession::SendRequestAsync( CString& strHeaders, LPVOID lpOptional, DWORD dwOptionalLen ) { HINTERNET hHttpFile = m_HttpFile->GetFileHandle(); if ( ::HttpSendRequest( hHttpFile, strHeaders, strHeaders.GetLength(), lpOptional, dwOptionalLen ) ) return Continue Reading →

Program freezes when AfxGetApp()->PumpMessage( ) is called

Question : Program freezes when AfxGetApp()->PumpMessage( ) is called Hello I’m still fairly new to MFC programming and especially multithreading, but my multithreaded application is now freezing when PumpMessage is called. Here is the code where it freezes: BOOL CMyClass::Open() { //some code while (currtime GetConnected()) { //processes normal messages MSG msg; while ( ::PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE ) ) { if ( !AfxGetApp()->PumpMessage( ) ) { break; } Continue Reading →