Hi everyone, here I have a problem which is very urgent and I couldn't resolve during the past three days. It can be simplified as below:
typedef struct _tagBufferStatus
int nIndex = 0;
StructCurrentImageSize structCurImg = MS_GetCurrentImageSize(g_CameraID,&status);
int cxWidth = structCurImg.ImageWidthFromCamera;
int cyHeight = structCurImg.ImageHeightFromCamera;
DWORD memSize = cxWidth*cyHeight;
byte *pOut= new byte[memSize];
DWORD dwSize = lpbmi->bmiHeader.biSizeImage;
static StructBufferStatus structBufStatus = MS_GetBufferStatus(g_CameraID,&status);
StructCaptureStatus structCapStatus = MS_GetCaptureStatus(g_CameraID,&status);
nIndex = structBufStatus.LastValidFrame;
byte **pTemp = structBufStatus.ImageBuffers;
pIn = pTemp[nIndex];
bmfHdr.bfOffBits = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + 256*sizeof(RGBQUAD);
bmfHdr.bfSize = memSize +sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + 256*sizeof(RGBQUAD);
bmfHdr.bfType = 0x4d42;
In this case, function StructImageBuffer GetImageBuffer(long CameraID)
is provided for the purpose of retrieving a pointer to a series of image buffer. As each image buffer is represented by a pointer,we need a pointer pointer to get the starting address of image buffer series.
use functionGetImage(long CameraID,byte *pSrc,byte *pDst)
to store an image data in pDst, where pSrc points to one of the image buffer in the image buffer series.
here,the problem is : the two functions is provdied by DLL,and ImageBuffer is reserved by DLL,and I can't copy data from Buffer to pDst. Is there anyone who has encountered the same problem and is kindly enough to give me a hand? All the thanks!