my ipcam have SDK,there is a callback function to read the image data,below is the code.When I use opencv read and display the picture, it will display an error,Unhandled exception .But I use printf ("% lld", pBuffer); does not make mistakes,why?
//CODE-----------------------------------
void CALLBACK RealDataCallBackEx(LONG lRealHandle, DWORD dwDataType, BYTE *pBuffer,DWORD dwBufSize, LONG lParam,
DWORD dwUser)
{ IplImage* frame; frame = cvCreateImageHeader(cvSize(1280,720),IPL_DEPTH_8U,3);
cvSetData(frame,pBuffer,1280*3);
printf("%lld",pBuffer);
printf("\n");
printf("%lld",frame);
//The following code will go wrong
cvNamedWindow("img");
cvShowImage("img",frame);
}