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
- CodeGotoStatement.cs
- EventsTab.cs
- LineProperties.cs
- PageHandlerFactory.cs
- TypeUtil.cs
- SapiRecognizer.cs
- UniqueIdentifierService.cs
- DiscoveryDocument.cs
- MessageEventSubscriptionService.cs
- HtmlHead.cs
- AccessorTable.cs
- DataKeyCollection.cs
- DbConnectionPool.cs
- ThemeConfigurationDialog.cs
- TypeUtil.cs
- HttpHeaderCollection.cs
- StringSource.cs
- ProviderConnectionPointCollection.cs
- SqlCacheDependencySection.cs
- SqlWriter.cs
- XPathSelectionIterator.cs
- TrackingStringDictionary.cs
- AmbiguousMatchException.cs
- ClientTargetSection.cs
- FrameworkElementFactoryMarkupObject.cs
- CodeTypeOfExpression.cs
- BitmapEffectOutputConnector.cs
- DelimitedListTraceListener.cs
- GiveFeedbackEvent.cs
- GenerateHelper.cs
- OpCodes.cs
- XmlCodeExporter.cs
- _ContextAwareResult.cs
- IntPtr.cs
- SatelliteContractVersionAttribute.cs
- RenamedEventArgs.cs
- MetadataCache.cs
- DbConnectionPoolGroupProviderInfo.cs
- SynchronizedDispatch.cs
- SmiTypedGetterSetter.cs
- CommonDialog.cs
- ConsumerConnectionPoint.cs
- SubMenuStyle.cs
- OdbcEnvironment.cs
- AssemblyHash.cs
- Point3DIndependentAnimationStorage.cs
- XXXInfos.cs
- Formatter.cs
- DbProviderFactories.cs
- XmlSchemaCompilationSettings.cs
- BasePattern.cs
- RequestTimeoutManager.cs
- CodeTypeMember.cs
- ExclusiveHandleList.cs
- DefaultParameterValueAttribute.cs
- XPathSingletonIterator.cs
- GreaterThan.cs
- Win32Native.cs
- BypassElement.cs
- Pen.cs
- DispatchWrapper.cs
- UnsafeNativeMethods.cs
- SimpleHandlerFactory.cs
- PauseStoryboard.cs
- RemoteWebConfigurationHostServer.cs
- XPathMultyIterator.cs
- Soap.cs
- StylusShape.cs
- PersonalizationState.cs
- Vector3DCollectionConverter.cs
- ACE.cs
- BuilderPropertyEntry.cs
- ClientRuntimeConfig.cs
- Ports.cs
- BuildProviderUtils.cs
- ModelItemCollection.cs
- InternalMappingException.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- CodeMemberField.cs
- QueryStack.cs
- FormsAuthentication.cs
- ConfigXmlAttribute.cs
- DataGridHelper.cs
- HttpPostLocalhostServerProtocol.cs
- ToolStripDropDownMenu.cs
- TimeoutException.cs
- TreeViewImageGenerator.cs
- CompiledQuery.cs
- VirtualDirectoryMapping.cs
- BitmapEffectDrawing.cs
- IriParsingElement.cs
- ValueProviderWrapper.cs
- EventBuilder.cs
- RunWorkerCompletedEventArgs.cs
- ResourceExpressionBuilder.cs
- AssemblyInfo.cs
- OdbcPermission.cs
- PresentationTraceSources.cs
- SqlSelectStatement.cs
- WSTransactionSection.cs