AdvancedLauncher.Tools.Extensions.HwndHostExtensions.TryHookWndProc C# (CSharp) Метод

TryHookWndProc() приватный статический Метод

private static TryHookWndProc ( System.Windows.Interop.HwndHost hwndHost ) : bool
hwndHost System.Windows.Interop.HwndHost
Результат bool
        private static bool TryHookWndProc(HwndHost hwndHost)
        {
            if (hwndHost.Handle != IntPtr.Zero) {
                // Hook the window messages so we can intercept the
                // various messages.
                HwndHostExtensionsWindowHook hook = new HwndHostExtensionsWindowHook(hwndHost);

                // Keep our hook alive.
                hwndHost.SetValue(WindowHookProperty, hook);

                return true;
            } else {
                return false;
            }
        }