MissionPlanner.OSDVideo.GetBitMap C# (CSharp) 메소드

GetBitMap() 공개 메소드

capture the next image
public GetBitMap ( ) : IntPtr
리턴 IntPtr
        public IntPtr GetBitMap()
        {
            if (m_handle == IntPtr.Zero)
                m_handle = Marshal.AllocCoTaskMem(m_stride*m_videoHeight);

            try
            {
                // Start waiting
                //  if (!m_PictureReady.WaitOne(5000, false))
                {
                    //throw new Exception("Timeout waiting to get picture");
                }
            }
            catch
            {
                Marshal.FreeCoTaskMem(m_handle);
                throw;
            }

            // Got one
            return m_handle;
        }