RIM.VSNDK_Package.Settings.Models.SettingsData.getNDKPath C# (CSharp) Method

getNDKPath() public method

Return the NDK Path from the registry
public getNDKPath ( ) : bool
return bool
        public bool getNDKPath()
        {
            bool success = false;

            RegistryKey rkHKCU = Registry.CurrentUser;
            RegistryKey rkNDKPath = null;

            try
            {
                rkNDKPath = rkHKCU.CreateSubKey("Software\\BlackBerry\\BlackBerryVSPlugin");
                HostPath = rkNDKPath.GetValue("NDKHostPath").ToString();
                TargetPath = rkNDKPath.GetValue("NDKTargetPath").ToString();
                rkNDKPath.Close();
                rkHKCU.Close();
                success = true;
            }
            catch
            {
                if (rkNDKPath != null)
                    rkNDKPath.Close();
                rkHKCU.Close();
                success = false;
            }

            return success;
        }