Click here to Skip to main content
11,640,599 members (60,355 online)

C / C++ / MFC

 
AnswerRe: it's my first useful code.. and there's error that i can't understan :( Pin
DavidCrow16-Jan-13 5:52
memberDavidCrow16-Jan-13 5:52 
AnswerRe: it's my first useful code.. and there's error that i can't understan :( Pin
Dean M. Sands, III17-Jan-13 3:11
memberDean M. Sands, III17-Jan-13 3:11 
Questioncallback function gets called / executed with bad data Pin
Vaclav_Sal15-Jan-13 9:46
memberVaclav_Sal15-Jan-13 9:46 
QuestionDoes anyone know this c plus plus knowledge? Pin
yu-jian15-Jan-13 5:16
groupyu-jian15-Jan-13 5:16 
AnswerRe: Does anyone know this c plus plus knowledge? Pin
Richard MacCutchan15-Jan-13 6:33
mvpRichard MacCutchan15-Jan-13 6:33 
AnswerRe: Does anyone know this c plus plus knowledge? Pin
CPallini15-Jan-13 11:30
mvpCPallini15-Jan-13 11:30 
GeneralRe: Does anyone know this c plus plus knowledge? Pin
yu-jian16-Jan-13 3:17
groupyu-jian16-Jan-13 3:17 
GeneralRe: Does anyone know this c plus plus knowledge? Pin
CPallini16-Jan-13 4:04
mvpCPallini16-Jan-13 4:04 
GeneralRe: Does anyone know this c plus plus knowledge? Pin
yu-jian16-Jan-13 17:44
groupyu-jian16-Jan-13 17:44 
GeneralRe: Does anyone know this c plus plus knowledge? Pin
jschell16-Jan-13 9:10
memberjschell16-Jan-13 9:10 
AnswerRe: Does anyone know this c plus plus knowledge? Pin
JackDingler16-Jan-13 11:19
memberJackDingler16-Jan-13 11:19 
GeneralRe: Does anyone know this c plus plus knowledge? Pin
yu-jian16-Jan-13 17:50
groupyu-jian16-Jan-13 17:50 
GeneralRe: Does anyone know this c plus plus knowledge? Pin
JackDingler17-Jan-13 5:15
memberJackDingler17-Jan-13 5:15 
Questiondeque problem. Does this code has any problem? [solved] Pin
yu-jian14-Jan-13 3:47
groupyu-jian14-Jan-13 3: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 6:59
mvpCPallini14-Jan-13 6:59 
GeneralRe: deque problem. Does this code has any problem? Pin
yu-jian14-Jan-13 13:50
groupyu-jian14-Jan-13 13:50 
GeneralRe: deque problem. Does this code has any problem? Pin
yu-jian14-Jan-13 16:02
groupyu-jian14-Jan-13 16:02 
QuestionCDC Problem with coordinates Pin
Argonia14-Jan-13 1:50
memberArgonia14-Jan-13 1:50 
AnswerRe: CDC Problem with coordinates Pin
Argonia14-Jan-13 21:39
memberArgonia14-Jan-13 21:39 
GeneralRe: CDC Problem with coordinates Pin
Vaclav_Sal15-Jan-13 9:53
memberVaclav_Sal15-Jan-13 9:53 
GeneralRe: CDC Problem with coordinates Pin
Argonia15-Jan-13 21:23
memberArgonia15-Jan-13 21:23 
QuestionDhcpRequestParams() Pin
Man in the mirror13-Jan-13 19:46
memberMan in the mirror13-Jan-13 19:46 
AnswerRe: DhcpRequestParams() Pin
Richard MacCutchan13-Jan-13 22:11
mvpRichard MacCutchan13-Jan-13 22:11 
QuestionSOLVED From HANDLE to BITMAPINFO - another basic question for gurus Pin
Vaclav_Sal13-Jan-13 5:30
memberVaclav_Sal13-Jan-13 5:30 
AnswerRe: From HANDLE to BITMAPINFO - another basic question for gurus Pin
Richard MacCutchan13-Jan-13 5:44
mvpRichard MacCutchan13-Jan-13 5:44 
GeneralRe: From HANDLE to BITMAPINFO - another basic question for gurus Pin
Vaclav_Sal13-Jan-13 6:08
memberVaclav_Sal13-Jan-13 6:08 
GeneralRe: From HANDLE to BITMAPINFO - another basic question for gurus Pin
Richard MacCutchan13-Jan-13 6:32
mvpRichard MacCutchan13-Jan-13 6:32 
QuestionHow to get detail error info from E_FAIL? Pin
Falconapollo11-Jan-13 21:23
memberFalconapollo11-Jan-13 21:23 
AnswerRe: How to get detail error info from E_FAIL? Pin
«_Superman_»11-Jan-13 23:43
member«_Superman_»11-Jan-13 23:43 
GeneralRe: How to get detail error info from E_FAIL? Pin
Falconapollo12-Jan-13 0:00
memberFalconapollo12-Jan-13 0:00 
GeneralRe: How to get detail error info from E_FAIL? Pin
Jochen Arndt13-Jan-13 21:05
memberJochen Arndt13-Jan-13 21:05 
AnswerRe: How to get detail error info from E_FAIL? Pin
Argonia14-Jan-13 2:01
memberArgonia14-Jan-13 2:01 
QuestionVideo Capture using DirectShow only works for first time.? Pin
mbatra3110-Jan-13 20:25
membermbatra3110-Jan-13 20:25 
AnswerRe: Video Capture using DirectShow only works for first time.? Pin
_AnsHUMAN_ 11-Jan-13 2:05
group_AnsHUMAN_ 11-Jan-13 2:05 
AnswerRe: Video Capture using DirectShow only works for first time.? Pin
Vaclav_Sal14-Jan-13 16:10
memberVaclav_Sal14-Jan-13 16:10 
Questionhow to unsigned int64 to two unsigned int32 values Pin
vishalgpt9-Jan-13 22:22
membervishalgpt9-Jan-13 22:22 
AnswerRe: how to unsigned int64 to two unsigned int32 values Pin
Jochen Arndt9-Jan-13 23:06
memberJochen Arndt9-Jan-13 23:06 
GeneralRe: how to unsigned int64 to two unsigned int32 values Pin
vishalgpt9-Jan-13 23:32
membervishalgpt9-Jan-13 23:32 
GeneralRe: how to unsigned int64 to two unsigned int32 values Pin
Jochen Arndt9-Jan-13 23:58
memberJochen Arndt9-Jan-13 23:58 
GeneralRe: how to unsigned int64 to two unsigned int32 values Pin
vishalgpt10-Jan-13 0:08
membervishalgpt10-Jan-13 0:08 
AnswerRe: [SOLVED] how to unsigned int64 to two unsigned int32 values Pin
«_Superman_»10-Jan-13 18:39
member«_Superman_»10-Jan-13 18:39 
GeneralRe: [SOLVED] how to unsigned int64 to two unsigned int32 values Pin
vishalgpt14-Jan-13 15:25
membervishalgpt14-Jan-13 15:25 
GeneralRe: [SOLVED] how to unsigned int64 to two unsigned int32 values Pin
«_Superman_»14-Jan-13 17:55
member«_Superman_»14-Jan-13 17:55 
GeneralRe: [SOLVED] how to unsigned int64 to two unsigned int32 values Pin
vishalgpt14-Jan-13 19:01
membervishalgpt14-Jan-13 19:01 
QuestionHTTP server in C. How to implement Keep-Alive? Pin
johanm_29-Jan-13 20:02
memberjohanm_29-Jan-13 20:02 
SuggestionRe: HTTP server in C. How to implement Keep-Alive? Pin
Richard MacCutchan9-Jan-13 22:24
mvpRichard MacCutchan9-Jan-13 22:24 
GeneralRe: HTTP server in C. How to implement Keep-Alive? Pin
johanm_210-Jan-13 1:17
memberjohanm_210-Jan-13 1:17 
QuestionProblem loading non-default wab Pin
Member 8689269-Jan-13 2:31
memberMember 8689269-Jan-13 2:31 
AnswerRe: Problem loading non-default wab Pin
Code-o-mat10-Jan-13 2:06
memberCode-o-mat10-Jan-13 2:06 
GeneralRe: Problem loading non-default wab Pin
Member 86892611-Jan-13 6:05
memberMember 86892611-Jan-13 6: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
Web04 | 2.8.150731.1 | Last Updated 1 Aug 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid