Code:
/ 4.0 / 4.0 / 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. 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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- NetSectionGroup.cs
- ScalarType.cs
- DrawingContextDrawingContextWalker.cs
- SymbolEqualComparer.cs
- LineGeometry.cs
- SynchronizationValidator.cs
- BufferModeSettings.cs
- XmlParserContext.cs
- IsolatedStorageException.cs
- SEHException.cs
- TreeNodeCollectionEditor.cs
- SchemaAttDef.cs
- ListSortDescriptionCollection.cs
- RenderTargetBitmap.cs
- WindowHideOrCloseTracker.cs
- ArgumentNullException.cs
- CfgRule.cs
- EntryPointNotFoundException.cs
- ParseHttpDate.cs
- LocatorManager.cs
- IsolatedStoragePermission.cs
- CompleteWizardStep.cs
- NamedPipeConnectionPoolSettings.cs
- DataKeyArray.cs
- NotConverter.cs
- ExpressionNormalizer.cs
- LayoutTable.cs
- ExpressionEditorAttribute.cs
- Vector3DCollectionValueSerializer.cs
- ColumnBinding.cs
- FakeModelItemImpl.cs
- TextRangeEditTables.cs
- TableAdapterManagerNameHandler.cs
- Condition.cs
- Scene3D.cs
- NavigationHelper.cs
- Focus.cs
- shaperfactoryquerycachekey.cs
- TextCompositionEventArgs.cs
- EncoderParameters.cs
- _ShellExpression.cs
- Storyboard.cs
- TextServicesContext.cs
- AccessKeyManager.cs
- LoginCancelEventArgs.cs
- TaskbarItemInfo.cs
- Identifier.cs
- TypeSchema.cs
- XmlTextWriter.cs
- SafeBitVector32.cs
- COM2ICategorizePropertiesHandler.cs
- ItemList.cs
- TagNameToTypeMapper.cs
- SerTrace.cs
- BindingExpressionUncommonField.cs
- HybridDictionary.cs
- DataSourceHelper.cs
- EntitySqlQueryCacheKey.cs
- XmlTextWriter.cs
- CompilerWrapper.cs
- ObjectCloneHelper.cs
- OpCellTreeNode.cs
- GenericTextProperties.cs
- CounterSet.cs
- FullTextLine.cs
- GroupLabel.cs
- PasswordRecovery.cs
- EntityDataSourceSelectingEventArgs.cs
- BehaviorEditorPart.cs
- BinaryReader.cs
- MemoryPressure.cs
- COM2TypeInfoProcessor.cs
- ColumnMapVisitor.cs
- NameSpaceExtractor.cs
- AddInActivator.cs
- TextFindEngine.cs
- TaskHelper.cs
- InkCanvasAutomationPeer.cs
- DebugView.cs
- Rotation3DAnimationBase.cs
- PriorityBindingExpression.cs
- IEnumerable.cs
- UMPAttributes.cs
- ExtensionWindowResizeGrip.cs
- MetadataItemCollectionFactory.cs
- RegexCapture.cs
- WindowsTooltip.cs
- AstNode.cs
- ComplexBindingPropertiesAttribute.cs
- SqlNodeAnnotations.cs
- TextEffectResolver.cs
- SelectionGlyph.cs
- Icon.cs
- TypeBuilder.cs
- Bold.cs
- PresentationAppDomainManager.cs
- UserPreferenceChangedEventArgs.cs
- RectangleGeometry.cs
- DependentTransaction.cs
- RectConverter.cs