示例#1
0
            public static void t復元する()
            {
                int    cb  = Marshal.SizeOf(stored);
                IntPtr ptr = Marshal.AllocCoTaskMem(cb);

                Marshal.StructureToPtr(stored, ptr, false);
                CWin32.SystemParametersInfo(0x3b, (uint)cb, ptr, 0);
                Marshal.FreeCoTaskMem(ptr);
            }
示例#2
0
            //-----------------
            static Cトグルキー機能()
            {
                int    cb  = Marshal.SizeOf(stored);
                IntPtr ptr = Marshal.AllocCoTaskMem(cb);

                Marshal.StructureToPtr(stored, ptr, false);
                CWin32.SystemParametersInfo(0x34, (uint)cb, ptr, 0);
                stored = (CWin32.TOGGLEKEYS)Marshal.PtrToStructure(ptr, typeof(CWin32.TOGGLEKEYS));
                Marshal.FreeCoTaskMem(ptr);
            }
示例#3
0
            //-----------------
            static C固定キー機能()
            {
                stored.cbSize  = 0;
                stored.dwFlags = 0;
                int    cb  = Marshal.SizeOf(stored);
                IntPtr ptr = Marshal.AllocCoTaskMem(cb);

                Marshal.StructureToPtr(stored, ptr, false);
                CWin32.SystemParametersInfo(0x3a, (uint)cb, ptr, 0);
                stored = (CWin32.STICKYKEYS)Marshal.PtrToStructure(ptr, typeof(CWin32.STICKYKEYS));
                Marshal.FreeCoTaskMem(ptr);
            }
示例#4
0
 public static void t無効化する()
 {
     if ((stored.dwFlags & 1L) == 0L)
     {
         CWin32.STICKYKEYS structure = new CWin32.STICKYKEYS();
         structure.dwFlags  = stored.dwFlags;
         structure.cbSize   = stored.cbSize;
         structure.dwFlags &= -5;
         structure.dwFlags &= -9;
         int    cb  = Marshal.SizeOf(structure);
         IntPtr ptr = Marshal.AllocCoTaskMem(cb);
         Marshal.StructureToPtr(structure, ptr, false);
         CWin32.SystemParametersInfo(0x3b, (uint)cb, ptr, 0);
         Marshal.FreeCoTaskMem(ptr);
     }
 }