public void InitDisplay(IntPtr hVideo, IntPtr hEvent)
 {
     if (rdn==null)
         rdn = new RegisterDeviceNotifications(hEvent, KSCATEGORY_CAPTURE);
     if (camProcess == null)
         //camProcess = new CPreview(hVideo, hEvent);
         camProcess = new CCapture(hVideo, hEvent);
 }
        public void Dispose()
        {
            rdn?.Dispose();
            rdn = null;

            camProcess?.Dispose();
            camProcess = null;

            // Shut down MF
            MFExtern.MFShutdown();
        }