#pragma once struct SSharedImageInfo { SSharedImageInfo() { nUpdated = 0; nSelected = 0; nCameraIndex = -1; nImageIndex = -1; nDigitalZoom = 0; dRulerGab = 100; dResolution = 4.4; nImageWidth = 0; nImageWidthStep = 0; nImageHeight = 0; nImageChannels = 0; } int nUpdated; int nSelected; int nCameraIndex; // 카메라 고유 번호 int nImageIndex; // 이미지 고유 인덱스 int nDigitalZoom; // Digital Zoom double dRulerGab; // Ruler 간격 double dResolution; // 배율 인덱스 int nImageWidth; // 영상 가로 크기 int nImageWidthStep; // 영상 가로 크기 Step int nImageHeight; // 영상 세로 크기 int nImageChannels; // 영상 세로 크기 }; class CSharedImageData { public: CSharedImageData(void); virtual ~CSharedImageData(void); BOOL CreateMemory(int nImageCount); void DeleteMemory(); int GetImageCount() { return m_nImageCount; } int GetUpdated(int nIndex); int GetSelected(int nIndex); BOOL LockImageData(int nIndex); BOOL UnlockImageData(int nIndex); const BYTE* GetImageData(int nIndex); const SSharedImageInfo* GetImageInfo(int nIndex); BOOL SetImageData(int nIndex, SSharedImageInfo *pImageInfo, BYTE* pImageData); private: HANDLE m_hAsignedMemory; CSemaphore** m_pSMImageData; BYTE *m_pSharedMemory; SSharedImageInfo **m_pImageInfo; BYTE **m_pImageData; int m_nImageCount; long m_nImageInfoSize; long m_nMaxImageSize; };