Пример #1
0
        private static void RegisterWindowClass()
        {
            WindowClassEx classEx = new WindowClassEx();
            classEx.ClassName = MessageWindowClassName;
            classEx.WndProc = wndProc;

            classEx.Size = (uint)Marshal.SizeOf(typeof(WindowClassEx));

            var atom = ShellObjectWatcherNativeMethods.RegisterClassEx(ref classEx);
            if (atom == 0)
            {
                throw new ShellException(LocalizedMessages.MessageListenerClassNotRegistered,
                    Marshal.GetExceptionForHR(Marshal.GetHRForLastWin32Error()));
            }
            _atom = atom;
        }
 public static extern uint RegisterClassEx(
     ref WindowClassEx windowClass
     );
 public static extern uint RegisterClassEx(
     ref WindowClassEx windowClass
     );