Click here to Skip to main content
12,751,306 members (35,287 online)

C / C++ / MFC

 
GeneralRe: Does anyone know this c plus plus knowledge? Pin
yu-jian16-Jan-13 4:17
groupyu-jian16-Jan-13 4:17 
GeneralRe: Does anyone know this c plus plus knowledge? Pin
CPallini16-Jan-13 5:04
mvpCPallini16-Jan-13 5:04 
GeneralRe: Does anyone know this c plus plus knowledge? Pin
yu-jian16-Jan-13 18:44
groupyu-jian16-Jan-13 18:44 
GeneralRe: Does anyone know this c plus plus knowledge? Pin
jschell16-Jan-13 10:10
memberjschell16-Jan-13 10:10 
AnswerRe: Does anyone know this c plus plus knowledge? Pin
JackDingler16-Jan-13 12:19
memberJackDingler16-Jan-13 12:19 
GeneralRe: Does anyone know this c plus plus knowledge? Pin
yu-jian16-Jan-13 18:50
groupyu-jian16-Jan-13 18:50 
GeneralRe: Does anyone know this c plus plus knowledge? Pin
JackDingler17-Jan-13 6:15
memberJackDingler17-Jan-13 6:15 
Questiondeque problem. Does this code has any problem? [solved] Pin
yu-jian14-Jan-13 4:47
groupyu-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? Pin
CPallini14-Jan-13 7:59
mvpCPallini14-Jan-13 7:59 
GeneralRe: deque problem. Does this code has any problem? Pin
yu-jian14-Jan-13 14:50
groupyu-jian14-Jan-13 14:50 
GeneralRe: deque problem. Does this code has any problem? Pin
yu-jian14-Jan-13 17:02
groupyu-jian14-Jan-13 17:02 
QuestionCDC Problem with coordinates Pin
Argonia14-Jan-13 2:50
memberArgonia14-Jan-13 2:50 
AnswerRe: CDC Problem with coordinates Pin
Argonia14-Jan-13 22:39
memberArgonia14-Jan-13 22:39 
GeneralRe: CDC Problem with coordinates Pin
Vaclav_Sal15-Jan-13 10:53
memberVaclav_Sal15-Jan-13 10:53 
GeneralRe: CDC Problem with coordinates Pin
Argonia15-Jan-13 22:23
memberArgonia15-Jan-13 22:23 
QuestionDhcpRequestParams() Pin
Man in the mirror13-Jan-13 20:46
memberMan in the mirror13-Jan-13 20:46 
AnswerRe: DhcpRequestParams() Pin
Richard MacCutchan13-Jan-13 23:11
mvpRichard MacCutchan13-Jan-13 23:11 
QuestionSOLVED From HANDLE to BITMAPINFO - another basic question for gurus Pin
Vaclav_Sal13-Jan-13 6:30
memberVaclav_Sal13-Jan-13 6:30 
AnswerRe: From HANDLE to BITMAPINFO - another basic question for gurus Pin
Richard MacCutchan13-Jan-13 6:44
mvpRichard MacCutchan13-Jan-13 6:44 
GeneralRe: From HANDLE to BITMAPINFO - another basic question for gurus Pin
Vaclav_Sal13-Jan-13 7:08
memberVaclav_Sal13-Jan-13 7:08 
GeneralRe: From HANDLE to BITMAPINFO - another basic question for gurus Pin
Richard MacCutchan13-Jan-13 7:32
mvpRichard MacCutchan13-Jan-13 7:32 
QuestionHow to get detail error info from E_FAIL? Pin
Falconapollo11-Jan-13 22:23
memberFalconapollo11-Jan-13 22:23 
AnswerRe: How to get detail error info from E_FAIL? Pin
«_Superman_»12-Jan-13 0:43
member«_Superman_»12-Jan-13 0:43 
GeneralRe: How to get detail error info from E_FAIL? Pin
Falconapollo12-Jan-13 1:00
memberFalconapollo12-Jan-13 1:00 
GeneralRe: How to get detail error info from E_FAIL? Pin
Jochen Arndt13-Jan-13 22:05
memberJochen Arndt13-Jan-13 22:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    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.170215.1 | Last Updated 21 Feb 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid