Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Shared / MS / Internal / Registry.cs / 1606164 / Registry.cs
using System; using MS.Internal; using MS.Internal.WindowsBase; using System.Security; using System.Security.Permissions; using Microsoft.Win32; //****** // Keep in [....] with host\Inc\Registry.hxx namespace MS.Internal { [FriendAccessAllowed] internal static class RegistryKeys { internal const string WPF = @"Software\Microsoft\.NETFramework\Windows Presentation Foundation", WPF_Features = WPF+"\\Features", value_MediaImageDisallow = "MediaImageDisallow", value_MediaVideoDisallow = "MediaVideoDisallow", value_MediaAudioDisallow = "MediaAudioDisallow", value_WebBrowserDisallow = "WebBrowserDisallow", value_ScriptInteropDisallow = "ScriptInteropDisallow", value_AutomationWeakReferenceDisallow = "AutomationWeakReferenceDisallow", WPF_Hosting = WPF+"\\Hosting", value_DisableXbapErrorPage = "DisableXbapErrorPage", value_UnblockWebBrowserControl = "UnblockWebBrowserControl", HKCU_XpsViewer = @"HKEY_CURRENT_USER\Software\Microsoft\XPSViewer", value_IsolatedStorageUserQuota = "IsolatedStorageUserQuota", HKLM_XpsViewerLocalServer32 = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\CLSID\\{7DDA204B-2097-47C9-8323-C40BB840AE44}\\LocalServer32", HKLM_IetfLanguage = @"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\IetfLanguage", // These constants are cloned in // wpf\src\Shared\Cpp\Utils.cxx // Should these reg keys change the above file should be also modified to reflect that. FRAMEWORK_RegKey = @"Software\Microsoft\Net Framework Setup\NDP\v4\Client\", FRAMEWORK_RegKey_FullPath = @"HKEY_LOCAL_MACHINE\" + FRAMEWORK_RegKey, FRAMEWORK_InstallPath_RegValue = "InstallPath"; ////// Critical: Reads an arbitrary registry key. /// [SecurityCritical] internal static bool ReadLocalMachineBool(string key, string valueName) { string keyPath = "HKEY_LOCAL_MACHINE\\" + key; new RegistryPermission(RegistryPermissionAccess.Read, keyPath).Assert(); object value = Registry.GetValue(keyPath, valueName, null); return value is int && (int)value != 0; } }; } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- KnownColorTable.cs
- XmlStreamNodeWriter.cs
- MenuAutomationPeer.cs
- URL.cs
- HasCopySemanticsAttribute.cs
- XmlIterators.cs
- Model3DGroup.cs
- RequestCacheManager.cs
- ContentPropertyAttribute.cs
- XmlNamespaceManager.cs
- QueryContinueDragEventArgs.cs
- versioninfo.cs
- XmlSchemaImport.cs
- ListBoxItemWrapperAutomationPeer.cs
- DataSourceBooleanViewSchemaConverter.cs
- TimeZone.cs
- DataObjectCopyingEventArgs.cs
- SqlDataSourceCommandEventArgs.cs
- DataView.cs
- RadioButton.cs
- EntityTypeEmitter.cs
- AsyncCompletedEventArgs.cs
- OdbcStatementHandle.cs
- DescendantBaseQuery.cs
- PenThread.cs
- RenderTargetBitmap.cs
- AuthenticationService.cs
- SQLInt16.cs
- RegexGroup.cs
- XmlSerializerAssemblyAttribute.cs
- UnsafeNetInfoNativeMethods.cs
- CodeParameterDeclarationExpression.cs
- XsdBuildProvider.cs
- PasswordTextContainer.cs
- Composition.cs
- HttpCacheParams.cs
- AsyncStreamReader.cs
- XComponentModel.cs
- ManifestSignedXml.cs
- TcpClientChannel.cs
- NullReferenceException.cs
- validationstate.cs
- Quaternion.cs
- MessageContractMemberAttribute.cs
- ListControlConvertEventArgs.cs
- DbParameterHelper.cs
- InfoCardAsymmetricCrypto.cs
- BitmapFrameEncode.cs
- BuildProviderCollection.cs
- ParagraphResult.cs
- UnicodeEncoding.cs
- KnownIds.cs
- XmlSchemaFacet.cs
- AutomationPropertyChangedEventArgs.cs
- Unit.cs
- XmlHierarchyData.cs
- SqlConnectionFactory.cs
- BinHexEncoder.cs
- DataGridHeaderBorder.cs
- BooleanKeyFrameCollection.cs
- EntityCommandExecutionException.cs
- ConnectionStringSettingsCollection.cs
- LinkButton.cs
- Pts.cs
- ProtocolsConfigurationHandler.cs
- ResourcePool.cs
- PeerSecurityManager.cs
- DependencyPropertyAttribute.cs
- OrderByBuilder.cs
- FontUnit.cs
- XmlSignatureProperties.cs
- ActivityDesignerHelper.cs
- SqlCacheDependencySection.cs
- ApplicationServicesHostFactory.cs
- BufferAllocator.cs
- HitTestWithGeometryDrawingContextWalker.cs
- Point3DCollection.cs
- WindowsStatusBar.cs
- DiscoveryReferences.cs
- OutputWindow.cs
- FormViewPageEventArgs.cs
- Avt.cs
- ToolStripContainer.cs
- ProxyFragment.cs
- EntitySet.cs
- TextBoxView.cs
- WebPartEditVerb.cs
- ThemeDictionaryExtension.cs
- FixedTextPointer.cs
- HitTestResult.cs
- CryptoKeySecurity.cs
- AuthenticationConfig.cs
- TogglePattern.cs
- Transform3DCollection.cs
- TreeView.cs
- TextOnlyOutput.cs
- XmlSortKeyAccumulator.cs
- GridViewDeleteEventArgs.cs
- CqlBlock.cs
- EllipticalNodeOperations.cs