Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- AsymmetricAlgorithm.cs
- InheritedPropertyChangedEventArgs.cs
- RenderTargetBitmap.cs
- WebServiceErrorEvent.cs
- XmlSchemaValidationException.cs
- _Events.cs
- SiteMapNodeCollection.cs
- SafeRightsManagementSessionHandle.cs
- CacheEntry.cs
- ApplicationDirectory.cs
- TemplatedMailWebEventProvider.cs
- StorageTypeMapping.cs
- RemoteWebConfigurationHostStream.cs
- ComboBoxDesigner.cs
- StackOverflowException.cs
- InteropExecutor.cs
- HtmlTableCell.cs
- ListChangedEventArgs.cs
- RayHitTestParameters.cs
- PeerToPeerException.cs
- DataGridViewCellParsingEventArgs.cs
- SynchronizedDispatch.cs
- WebBrowserSiteBase.cs
- DataSourceHelper.cs
- versioninfo.cs
- VectorValueSerializer.cs
- DesignerProperties.cs
- ModuleConfigurationInfo.cs
- IdentityValidationException.cs
- HtmlInputHidden.cs
- TargetInvocationException.cs
- OleDbReferenceCollection.cs
- GroupBoxRenderer.cs
- XPathNavigatorKeyComparer.cs
- AssemblyAttributes.cs
- PopupControlService.cs
- PreservationFileReader.cs
- MemberBinding.cs
- XmlValueConverter.cs
- MenuBase.cs
- XmlSchemaCollection.cs
- WebPartDeleteVerb.cs
- LinkedResourceCollection.cs
- ComponentConverter.cs
- GeneralTransform3DCollection.cs
- IntellisenseTextBox.cs
- ListViewDataItem.cs
- MenuItemCollectionEditorDialog.cs
- InteropBitmapSource.cs
- SystemIPv6InterfaceProperties.cs
- MessageSecurityOverHttp.cs
- HMACSHA256.cs
- FlowPanelDesigner.cs
- ImageDrawing.cs
- PrintDocument.cs
- ContentTypeSettingClientMessageFormatter.cs
- WebServiceReceiveDesigner.cs
- SafeThemeHandle.cs
- RestHandlerFactory.cs
- PageAsyncTask.cs
- Regex.cs
- Serialization.cs
- ReadOnlyDataSource.cs
- InfoCardProofToken.cs
- DataGridView.cs
- ByeOperationAsyncResult.cs
- ProfileEventArgs.cs
- SqlInternalConnectionTds.cs
- MeshGeometry3D.cs
- ExpressionLink.cs
- GeometryHitTestParameters.cs
- CroppedBitmap.cs
- RoutedCommand.cs
- LiteralControl.cs
- MapPathBasedVirtualPathProvider.cs
- TabControl.cs
- CommandManager.cs
- ListView.cs
- DatagridviewDisplayedBandsData.cs
- ParenthesizePropertyNameAttribute.cs
- VisualStateManager.cs
- CodeThrowExceptionStatement.cs
- TimelineClockCollection.cs
- GenericUI.cs
- _FixedSizeReader.cs
- Fonts.cs
- PolyLineSegmentFigureLogic.cs
- ReflectPropertyDescriptor.cs
- Model3DGroup.cs
- FileSystemEnumerable.cs
- LinqDataSourceHelper.cs
- DCSafeHandle.cs
- RoleManagerEventArgs.cs
- NavigationExpr.cs
- TypeConstant.cs
- DataTableMapping.cs
- SoapUnknownHeader.cs
- ValidationRule.cs
- SafeCertificateStore.cs
- DataViewSettingCollection.cs