728x90

[DllImport("coredll.dll", CharSet = CharSet.Unicode)]
        private static extern uint RegOpenKeyEx(
            uint HKEY,
            string lpSubKey,
            int ulOptions,
            uint samDesired,
            out uint phkResult);

        [DllImport("coredll.dll", CharSet = CharSet.Unicode)]
        private static extern uint RegQueryValueEx(
            uint hKey,
            string lpValueName,
            int lpReserved,
            ref int lpType,
            StringBuilder lpData,
            ref int lpcbData);

        [DllImport("coredll.dll")]
        private static extern int RegSetValueEx(
            uint hKey,
            [MarshalAs(UnmanagedType.LPArray)] byte[] lpValueName,
            int Reserved,
            Microsoft.Win32.RegistryValueKind dwType,
            [MarshalAs(UnmanagedType.LPArray)] byte[] lpData,
            int cbData);


        [DllImport("coredll.dll")]
        private static extern int RegCloseKey(uint hkey);

그런데 바로 적용되는 것이 있는가하면 재부팅 후 적용이 되는 녀석들도 많아 의도하는데로 사용하진 못했다.

728x90

+ Recent posts