Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / System / Windows / Media / SafeNativeMethodsMilCoreApi.cs / 1 / SafeNativeMethodsMilCoreApi.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // // // ABOUT THIS FILE: // -- This file contains native methods which are deemed SAFE for partial trust callers // -- These methods DO have the SuppressUnmanagedCodeSecurity attribute which means // stalk walks for unmanaged // code will stop with the immediate caler. // -- Put methods in here which are needed in partial trust scenarios // -- If you have questions about how to use this file, email avsee //----------------------------------------------------------------------------- namespace MS.Win32.PresentationCore { using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; using System; using System.Security; using System.Security.Permissions; using System.Collections; using System.IO; using System.Text; using System.Windows.Media.Composition; using Microsoft.Internal; using IComDataObject = System.Runtime.InteropServices.ComTypes.IDataObject; internal static partial class SafeNativeMethods { ////// TreatAsSafe: The security model here is that these APIs could be publicly exposed to partial trust /// callers - no risk. /// Critical: This code elevates priviliges by adding a SuppressUnmanagedCodeSecurity /// [SecurityCritical,SecurityTreatAsSafe] internal static int MilCompositionEngine_InitializePartitionManager(int nPriority, MIL_SCHEDULE_TYPE schedType) { return SafeNativeMethodsPrivate.MilCompositionEngine_InitializePartitionManager(nPriority, schedType); } ////// TreatAsSafe: The security model here is that these APIs could be publicly exposed to partial trust /// callers - no risk. /// Critical: This code elevates priviliges by adding a SuppressUnmanagedCodeSecurity /// [SecurityCritical,SecurityTreatAsSafe] internal static int MilCompositionEngine_DeinitializePartitionManager() { return SafeNativeMethodsPrivate.MilCompositionEngine_DeinitializePartitionManager(); } ////// This code does not have a critical attribute since the rest of the partial class /// has the attribute (UnsafeNativeMethodsOther) /// [SuppressUnmanagedCodeSecurity] private static partial class SafeNativeMethodsPrivate { [DllImport(DllImport.MilCore)] internal static extern int MilCompositionEngine_InitializePartitionManager(int nPriority, MIL_SCHEDULE_TYPE schedType); [DllImport(DllImport.MilCore)] internal static extern int MilCompositionEngine_DeinitializePartitionManager(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // // // ABOUT THIS FILE: // -- This file contains native methods which are deemed SAFE for partial trust callers // -- These methods DO have the SuppressUnmanagedCodeSecurity attribute which means // stalk walks for unmanaged // code will stop with the immediate caler. // -- Put methods in here which are needed in partial trust scenarios // -- If you have questions about how to use this file, email avsee //----------------------------------------------------------------------------- namespace MS.Win32.PresentationCore { using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; using System; using System.Security; using System.Security.Permissions; using System.Collections; using System.IO; using System.Text; using System.Windows.Media.Composition; using Microsoft.Internal; using IComDataObject = System.Runtime.InteropServices.ComTypes.IDataObject; internal static partial class SafeNativeMethods { ////// TreatAsSafe: The security model here is that these APIs could be publicly exposed to partial trust /// callers - no risk. /// Critical: This code elevates priviliges by adding a SuppressUnmanagedCodeSecurity /// [SecurityCritical,SecurityTreatAsSafe] internal static int MilCompositionEngine_InitializePartitionManager(int nPriority, MIL_SCHEDULE_TYPE schedType) { return SafeNativeMethodsPrivate.MilCompositionEngine_InitializePartitionManager(nPriority, schedType); } ////// TreatAsSafe: The security model here is that these APIs could be publicly exposed to partial trust /// callers - no risk. /// Critical: This code elevates priviliges by adding a SuppressUnmanagedCodeSecurity /// [SecurityCritical,SecurityTreatAsSafe] internal static int MilCompositionEngine_DeinitializePartitionManager() { return SafeNativeMethodsPrivate.MilCompositionEngine_DeinitializePartitionManager(); } ////// This code does not have a critical attribute since the rest of the partial class /// has the attribute (UnsafeNativeMethodsOther) /// [SuppressUnmanagedCodeSecurity] private static partial class SafeNativeMethodsPrivate { [DllImport(DllImport.MilCore)] internal static extern int MilCompositionEngine_InitializePartitionManager(int nPriority, MIL_SCHEDULE_TYPE schedType); [DllImport(DllImport.MilCore)] internal static extern int MilCompositionEngine_DeinitializePartitionManager(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SafeLibraryHandle.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- ScrollItemPattern.cs
- ConfigurationException.cs
- DataTemplateKey.cs
- DataExchangeServiceBinder.cs
- SendingRequestEventArgs.cs
- FlowDocumentFormatter.cs
- WebPartEditorApplyVerb.cs
- PolyBezierSegmentFigureLogic.cs
- XsdBuilder.cs
- StyleCollection.cs
- StringKeyFrameCollection.cs
- TimeoutValidationAttribute.cs
- GridToolTip.cs
- AutomationPropertyInfo.cs
- AssemblyGen.cs
- ThaiBuddhistCalendar.cs
- Visual3D.cs
- SystemInfo.cs
- TextViewSelectionProcessor.cs
- SchemaImporterExtensionElementCollection.cs
- XmlSchemaAppInfo.cs
- ButtonBaseAutomationPeer.cs
- WebDisplayNameAttribute.cs
- VersionPair.cs
- PointAnimation.cs
- NativeMethods.cs
- WebPartDescription.cs
- NamespaceTable.cs
- ObjectListTitleAttribute.cs
- DropShadowEffect.cs
- FieldNameLookup.cs
- RuntimeVariableList.cs
- StyleSelector.cs
- XmlNodeList.cs
- RuleElement.cs
- SettingsSection.cs
- IntSecurity.cs
- NativeMethods.cs
- XmlName.cs
- DocumentGridContextMenu.cs
- oledbmetadatacolumnnames.cs
- RoutedEventConverter.cs
- Message.cs
- NamedPipeHostedTransportConfiguration.cs
- UntypedNullExpression.cs
- StaticSiteMapProvider.cs
- IconBitmapDecoder.cs
- ResourceCategoryAttribute.cs
- MemberPath.cs
- FontCollection.cs
- XmlComplianceUtil.cs
- PtsHost.cs
- ConnectionInterfaceCollection.cs
- Byte.cs
- XamlReader.cs
- ClockController.cs
- CodeMemberMethod.cs
- SettingsBindableAttribute.cs
- Random.cs
- BinaryFormatterWriter.cs
- ReverseInheritProperty.cs
- XmlTextAttribute.cs
- FloaterBaseParaClient.cs
- RowUpdatingEventArgs.cs
- WebRequest.cs
- ArglessEventHandlerProxy.cs
- QueryOptionExpression.cs
- DataTableNameHandler.cs
- ReadOnlyNameValueCollection.cs
- HttpFormatExtensions.cs
- CodeSubDirectoriesCollection.cs
- ResXDataNode.cs
- PageSettings.cs
- VectorCollectionConverter.cs
- XsdBuilder.cs
- CultureNotFoundException.cs
- SafeNativeMethodsMilCoreApi.cs
- RuntimeConfigLKG.cs
- DefaultValueAttribute.cs
- DoWhile.cs
- Rect.cs
- Assert.cs
- SoapCommonClasses.cs
- SqlDelegatedTransaction.cs
- KerberosSecurityTokenProvider.cs
- EnumType.cs
- PageCatalogPart.cs
- XPathAxisIterator.cs
- StateItem.cs
- XD.cs
- ITextView.cs
- PriorityBinding.cs
- CodeAttributeArgument.cs
- TemplateControlParser.cs
- WebPartConnectionsCancelEventArgs.cs
- Expressions.cs
- StatusBarPanel.cs
- TextRange.cs