Click here to Skip to main content
       

C / C++ / MFC

 
AnswerRe: it's my first useful code.. and there's error that i can't understan :( PinmemberDavidCrow16-Jan-13 6:52 
AnswerRe: it's my first useful code.. and there's error that i can't understan :( PinmemberDean M. Sands, III17-Jan-13 4:11 
Questioncallback function gets called / executed with bad data PinmemberVaclav_Sal15-Jan-13 10:46 
QuestionDoes anyone know this c plus plus knowledge? Pingroupyu-jian15-Jan-13 6:16 
AnswerRe: Does anyone know this c plus plus knowledge? PinmvpRichard MacCutchan15-Jan-13 7:33 
AnswerRe: Does anyone know this c plus plus knowledge? PinmvpCPallini15-Jan-13 12:30 
GeneralRe: Does anyone know this c plus plus knowledge? Pingroupyu-jian16-Jan-13 4:17 
GeneralRe: Does anyone know this c plus plus knowledge? PinmvpCPallini16-Jan-13 5:04 
GeneralRe: Does anyone know this c plus plus knowledge? Pingroupyu-jian16-Jan-13 18:44 
GeneralRe: Does anyone know this c plus plus knowledge? Pinmemberjschell16-Jan-13 10:10 
AnswerRe: Does anyone know this c plus plus knowledge? [modified] PinmemberJackDingler16-Jan-13 12:19 
GeneralRe: Does anyone know this c plus plus knowledge? Pingroupyu-jian16-Jan-13 18:50 
GeneralRe: Does anyone know this c plus plus knowledge? PinmemberJackDingler17-Jan-13 6:15 
Questiondeque problem. Does this code has any problem? [solved] [modified] Pingroupyu-jian14-Jan-13 4:47 
{
    CTempLock tempLock(&m_FrameListLock);
    if (m_FrameQueue.size() == 0)  return 0L;
 
    pFrameData = m_FrameQueue.front();
    m_FrameQueue.pop_front();
}
 
if (WaitForSingleObject(this->m_hCloseEvent, 0) == WAIT_OBJECT_0)
{
    return ZMD_OK;
}
 
try
{
    if (pFrameData != NULL)
    {
        if (pFrameData->lpData != NULL)
        {
            try
            {
                this->DistributeFrame(pFrameData->lpData, pFrameData->iSize);
                byte*  pBuf = reinterpret_cast<byte*>(pFrameData->lpData);
                delete[] pBuf;
            }
            catch (CException* e)
            {
                e->Delete();
            }
        }
        delete pFrameData;
        pFrameData = NULL;
    }
}
catch (CException* e)
{
    e->Delete();
}
 
}
 

There is a error that happens in the following code.
byte*  pBuf = reinterpret_cast<byte*>(pFrameData->
 
The class is here.
 
class CStreamProcess
{
    HRESULT ProcessFrames();
 
    void DistributeFrame(const LPVOID const lpBuf, int  dwSize);
 
    HANDLE  m_hCloseEvent;
    HANDLE  m_hFrameProcessEvent;
    std::deque<SZMDFrameData>   m_FrameQueue;
    CCriticalSection    m_FrameListLock;
};
 
--------------------
I have resolved this problem. Its a mistake of using CCriticalSection.

modified 15-Jan-13 3:35am.

AnswerRe: deque problem. Does this code has any problem? PinmvpCPallini14-Jan-13 7:59 
GeneralRe: deque problem. Does this code has any problem? Pingroupyu-jian14-Jan-13 14:50 
GeneralRe: deque problem. Does this code has any problem? Pingroupyu-jian14-Jan-13 17:02 
QuestionCDC Problem with coordinates PinmemberArgonia14-Jan-13 2:50 
AnswerRe: CDC Problem with coordinates PinmemberArgonia14-Jan-13 22:39 
GeneralRe: CDC Problem with coordinates PinmemberVaclav_Sal15-Jan-13 10:53 
GeneralRe: CDC Problem with coordinates PinmemberArgonia15-Jan-13 22:23 
QuestionDhcpRequestParams() PinmemberMan in the mirror13-Jan-13 20:46 
AnswerRe: DhcpRequestParams() PinmvpRichard MacCutchan13-Jan-13 23:11 
QuestionSOLVED From HANDLE to BITMAPINFO - another basic question for gurus [modified] PinmemberVaclav_Sal13-Jan-13 6:30 
AnswerRe: From HANDLE to BITMAPINFO - another basic question for gurus PinmvpRichard MacCutchan13-Jan-13 6:44 
GeneralRe: From HANDLE to BITMAPINFO - another basic question for gurus PinmemberVaclav_Sal13-Jan-13 7:08 
GeneralRe: From HANDLE to BITMAPINFO - another basic question for gurus PinmvpRichard MacCutchan13-Jan-13 7:32 
QuestionHow to get detail error info from E_FAIL? PinmemberFalconapollo11-Jan-13 22:23 
AnswerRe: How to get detail error info from E_FAIL? Pinmember«_Superman_»12-Jan-13 0:43 
GeneralRe: How to get detail error info from E_FAIL? PinmemberFalconapollo12-Jan-13 1:00 
GeneralRe: How to get detail error info from E_FAIL? PinmemberJochen Arndt13-Jan-13 22:05 
AnswerRe: How to get detail error info from E_FAIL? PinmemberArgonia14-Jan-13 3:01 
QuestionVideo Capture using DirectShow only works for first time.? Pinmembermbatra3110-Jan-13 21:25 
AnswerRe: Video Capture using DirectShow only works for first time.? Pingroup_AnsHUMAN_ 11-Jan-13 3:05 
AnswerRe: Video Capture using DirectShow only works for first time.? PinmemberVaclav_Sal14-Jan-13 17:10 
Questionhow to unsigned int64 to two unsigned int32 values Pinmembervishalgpt9-Jan-13 23:22 
AnswerRe: how to unsigned int64 to two unsigned int32 values PinmemberJochen Arndt10-Jan-13 0:06 
GeneralRe: how to unsigned int64 to two unsigned int32 values Pinmembervishalgpt10-Jan-13 0:32 
GeneralRe: how to unsigned int64 to two unsigned int32 values PinmemberJochen Arndt10-Jan-13 0:58 
GeneralRe: how to unsigned int64 to two unsigned int32 values Pinmembervishalgpt10-Jan-13 1:08 
AnswerRe: [SOLVED] how to unsigned int64 to two unsigned int32 values Pinmember«_Superman_»10-Jan-13 19:39 
GeneralRe: [SOLVED] how to unsigned int64 to two unsigned int32 values Pinmembervishalgpt14-Jan-13 16:25 
GeneralRe: [SOLVED] how to unsigned int64 to two unsigned int32 values Pinmember«_Superman_»14-Jan-13 18:55 
GeneralRe: [SOLVED] how to unsigned int64 to two unsigned int32 values Pinmembervishalgpt14-Jan-13 20:01 
QuestionHTTP server in C. How to implement Keep-Alive? Pinmemberjohanm_29-Jan-13 21:02 
SuggestionRe: HTTP server in C. How to implement Keep-Alive? PinmvpRichard MacCutchan9-Jan-13 23:24 
GeneralRe: HTTP server in C. How to implement Keep-Alive? Pinmemberjohanm_210-Jan-13 2:17 
QuestionProblem loading non-default wab PinmemberMember 8689269-Jan-13 3:31 
AnswerRe: Problem loading non-default wab PinmemberCode-o-mat10-Jan-13 3:06 
GeneralRe: Problem loading non-default wab PinmemberMember 86892611-Jan-13 7:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 24 Nov 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid