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
- CroppedBitmap.cs
- LogWriteRestartAreaAsyncResult.cs
- ListControlBuilder.cs
- XmlElementList.cs
- TimerElapsedEvenArgs.cs
- _Connection.cs
- BaseDataBoundControl.cs
- ToolboxItemAttribute.cs
- Padding.cs
- BitConverter.cs
- PropertyRecord.cs
- FileStream.cs
- DisableDpiAwarenessAttribute.cs
- ProfileParameter.cs
- SqlNotificationEventArgs.cs
- IndexedString.cs
- EdmFunction.cs
- LicenseManager.cs
- ListBoxChrome.cs
- EventManager.cs
- XmlSchemaChoice.cs
- FormView.cs
- FileDialog_Vista_Interop.cs
- FileUpload.cs
- RichTextBoxConstants.cs
- SessionState.cs
- SqlTypeConverter.cs
- EdmSchemaError.cs
- MediaPlayerState.cs
- AttributeEmitter.cs
- HandlerMappingMemo.cs
- ObjectAnimationUsingKeyFrames.cs
- ItemAutomationPeer.cs
- ItemCollection.cs
- SqlGatherConsumedAliases.cs
- HttpException.cs
- ThousandthOfEmRealPoints.cs
- UpdateCommand.cs
- IsolatedStoragePermission.cs
- ConfigurationElementProperty.cs
- HostVisual.cs
- XmlSchemaProviderAttribute.cs
- IdentitySection.cs
- GlyphingCache.cs
- EmbossBitmapEffect.cs
- TrackingProfileCache.cs
- BaseCodeDomTreeGenerator.cs
- CompilationRelaxations.cs
- WebControl.cs
- BitSet.cs
- SoapMessage.cs
- coordinatorfactory.cs
- ProcessInfo.cs
- PageTheme.cs
- DataServiceStreamResponse.cs
- ExtensionFile.cs
- InheritanceAttribute.cs
- PolygonHotSpot.cs
- TrackBarRenderer.cs
- RegexCompiler.cs
- WebServiceEnumData.cs
- ChtmlTextWriter.cs
- TypedColumnHandler.cs
- EffectiveValueEntry.cs
- EncoderFallback.cs
- CompoundFileIOPermission.cs
- TargetControlTypeAttribute.cs
- Mapping.cs
- Literal.cs
- dbdatarecord.cs
- MarginCollapsingState.cs
- TextSimpleMarkerProperties.cs
- XmlSchemaComplexContentRestriction.cs
- XmlSchemaValidationException.cs
- Win32SafeHandles.cs
- TraceXPathNavigator.cs
- TeredoHelper.cs
- DesignerToolboxInfo.cs
- ReverseInheritProperty.cs
- SwitchElementsCollection.cs
- UnknownWrapper.cs
- InternalBufferOverflowException.cs
- ComplexTypeEmitter.cs
- LineInfo.cs
- CharConverter.cs
- ValidationErrorCollection.cs
- SecurityUtils.cs
- ContentElementAutomationPeer.cs
- SolidColorBrush.cs
- SortAction.cs
- NonVisualControlAttribute.cs
- MtomMessageEncoder.cs
- SystemTcpStatistics.cs
- ClientBuildManager.cs
- UntypedNullExpression.cs
- TextBounds.cs
- CapabilitiesUse.cs
- GPStream.cs
- OdbcEnvironment.cs
- BrowserDefinitionCollection.cs