示例#1
0
        /// <summary>
        /// ExtractKeyComponents
        /// </summary>
        /// <param name="key"></param>
        /// <param name="root"></param>
        /// <param name="subkey"></param>
        private static void ExtractKeyComponents(string key, out IntPtr root, out string subkey)
        {
            int firstBack = key.IndexOf(@"\");

            if (firstBack < 1)
            {
                throw (new ArgumentException("key"));
            }
            subkey = key.Substring(firstBack + 1);
            string rootName = key.Substring(0, firstBack);

            root = RootKey.FromString(rootName);
        }