12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- #include <stdio.h>
- int main(int argc, char *argv[])
- {
- printf("Hello, world\n");
-
- return 0;
- }
- typedef struct tagresdata2
- {
- BOOL bHasBk;
- int nPicCount;
- int nPicCount2;
- DWORD nPicBmpCount[50];
- CRect rect[50];
- }RESDATA2;
- BYTE *pData = NULL;
- DWORD dwCount = 0;
- CStringArray AryRect;
- memcpy(&dwCount, pData, sizeof(DWORD));
- pData += sizeof(DWORD);
- BYTE *pRealData = new BYTE[dwCount];
- memcpy(pRealData, pData, dwCount);
- CMemFile memfile;
- memfile.Attach(pRealData, dwCount);
- CArchive ar(&memfile, CArchive::load);
- AryRect.Serialze(ar);
- ar.Close();
- memfile.Detach();
- if ( pRealData )
- {
- delete []pRealData;
- }
- RESDATA2 tagResData;
- pData += dwCount;
- memcpy(&tagResData, pData, sizeof(RESDATA2));
- pData += sizeof(RESDATA2);
- if ( tagResData.bHasBk )
- {
- DWORD dwleng = 0;
- BYTE *pSaveBk = NULL;
- }
|