Exemplo n.º 1
0
        /// <summary>
        /// Unregisters the window class represented by classAtom
        /// </summary>
        /// <param name="arg">A ushort representing the class atom</param>
        internal static object UnregisterClass(object arg)
        {
            ushort classAtom = (ushort)arg;

            if (classAtom != 0)
            {
                IntPtr hInstance = UnsafeNativeMethods.GetModuleHandle(null);
                UnsafeNativeMethods.UnregisterClass(
                    new IntPtr(classAtom),             //* this function is defined as taking a type lpClassName - but this can be an atom. 2 Low Bytes are the atom*/
                    hInstance);
            }

            return(null);
        }