struct tagBITMAPINFO {
BITMAPINFOHEADER bmiHeader;
RGBQUAD bmiColors[1];
} BITMAPINFO;
tagBITMAPINFOHEADER{
DWORD biSize;
LONG biWidth;
LONG biHeight;
} BITMAPINFOHEADER
BITMAPINFO bmiCurrWindow;
capGetVideoFormat((*m_pCapWndArray)[i].hCapWnd, &bmiCurrWindow, formatsize);
CopyMemory(&(*m_pCapWndArray)[i].bmiHeader, &(bmiCurrWindow.bmiHeader), sizeof(BITMAPINFOHEADER));
bmiCurrWindow is a structure 'BITMAPINFO' which has member 'bmiHeader' of type BITMAPINFOHEADER;
after copy memory i want to change the value of bmiCurrWindow. i.e i want bmiCurrWindow.bmiHeader.biWidth=480; bmiCurrWindow.bmiHeader.biHeight=640;
But if i write the above code,while executing it gives me access voilation error.
How do i resove it ?