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(); 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(); HResult hr = MFExtern.MFStartup(0x20070, MFStartup.Lite); MFError.ThrowExceptionForHR(hr); hr = m_draw.CreateDevice(hVideo); MFError.ThrowExceptionForHR(hr); }