public Msn(IMsnGetter msnHandler)
        {
            _msnHandler = msnHandler;
            lpWndClass = new WNDCLASS
            {
                lpszClassName = lpClassName,
                lpfnWndProc = new WndProc(this.CustomWndProc)
            };

            ushort num = RegisterClassW(ref lpWndClass);
            int num2 = Marshal.GetLastWin32Error();
            if ((num == 0) && (num2 != 0x582))
            {
                throw new Exception("Could not register window class");
            }
            this.m_hwnd = CreateWindowExW(0, lpClassName, string.Empty, 0, 0, 0, 0, 0, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
        }
Exemple #2
0
        public Msn(IMsnGetter msnHandler)
        {
            _msnHandler = msnHandler;
            lpWndClass  = new WNDCLASS
            {
                lpszClassName = lpClassName,
                lpfnWndProc   = new WndProc(this.CustomWndProc)
            };

            ushort num  = RegisterClassW(ref lpWndClass);
            int    num2 = Marshal.GetLastWin32Error();

            if ((num == 0) && (num2 != 0x582))
            {
                throw new Exception("Could not register window class");
            }
            this.m_hwnd = CreateWindowExW(0, lpClassName, string.Empty, 0, 0, 0, 0, 0, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
        }