public bool Initialize() { logger.Debug("SystemManager::Initialize() " + Initialized); if (!Initialized) { try { SystemEvents.DisplaySettingsChanged += SystemEvents_DisplaySettingsChanged; SystemEvents.SessionSwitch += SystemEvents_SessionSwitch; notifyWindow = new NotifyWindow(this); notifyWindow.CreateWindow(); var hWnd = notifyWindow.Handle; Debug.Assert(hWnd != IntPtr.Zero, "hWnd != IntPtr.Zero"); RegisterNotification(hWnd, UsbCategory.VideoCamera); RegisterNotification(hWnd, UsbCategory.Audio); Initialized = true; } catch (Exception ex) { logger.Error(ex.Message); Shutdown(); } } return(Initialized); }
public void Init() { if (nativeWindow == null) { nativeWindow = new NotifyWindow(this); nativeWindow.CreateWindow(); } if (ShowMainWindowMessage == 0) { ShowMainWindowMessage = NativeMethods.RegisterWindowMessage(SHOW_POLYWALL_STREAMER_MAIN_WINDOW); } }
public bool Init() { logger.Debug("WTSSessionManager::Init()"); if (nativeWindow == null) { nativeWindow = new NotifyWindow(this); nativeWindow.CreateWindow(); } var hWnd = nativeWindow.Handle; return(RegisterNotification(hWnd)); }
public bool Init(Guid classGuid) { logger.Debug("UsbDeviceManager::Init()"); if (nativeWindow == null) { nativeWindow = new NotifyWindow(this); nativeWindow.CreateWindow(); } var hWnd = nativeWindow.Handle; var handle = RegisterNotification(hWnd, classGuid); return(handle != IntPtr.Zero); }