public void Dispose() { CloseDevice(); Draw.DestroyDevice(); Draw = null; GC.SuppressFinalize(this); }
// Constructor protected CProcess(IntPtr hVideo, IntPtr hEvent) { this.hVideo = hVideo; PReader = null; HwndEvent = hEvent; PwszSymbolicLink = null; var hr = MFExtern.MFStartup(0x20070, MFStartup.Lite); MFError.ThrowExceptionForHR(hr); Draw = new DrawDevice(); hr = Draw.CreateDevice(hVideo); MFError.ThrowExceptionForHR(hr); }