public void Dispose() { CloseDevice(); m_draw.DestroyDevice(); m_draw = null; GC.SuppressFinalize(this); }
// Constructor public CPreview(IntPtr hVideo, IntPtr hEvent) { m_pReader = null; m_hwndEvent = hEvent; m_pwszSymbolicLink = null; m_draw = new DrawDevice(); m_pWriter = null; m_bFirstSample = false; m_llBaseTime = 0; int hr = MFExtern.MFStartup(0x20070, MFStartup.Lite); MFError.ThrowExceptionForHR(hr); hr = m_draw.CreateDevice(hVideo); MFError.ThrowExceptionForHR(hr); }
// Constructor public CPreview(IntPtr hVideo, IntPtr hEvent) { m_pReader = null; m_hwndEvent = hEvent; m_pwszSymbolicLink = null; m_draw = new DrawDevice(); m_pWriter = null; m_bFirstSample = false; m_llBaseTime = 0; HResult hr = MFExtern.MFStartup(0x20070, MFStartup.Lite); MFError.ThrowExceptionForHR(hr); hr = m_draw.CreateDevice(hVideo); MFError.ThrowExceptionForHR(hr); }