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
- DataSourceControl.cs
- DataSourceConverter.cs
- HitTestWithPointDrawingContextWalker.cs
- CachedPathData.cs
- FixedDocumentSequencePaginator.cs
- DataGridGeneralPage.cs
- ToolStripCustomTypeDescriptor.cs
- EpmContentSerializer.cs
- CodeMemberProperty.cs
- MulticastOption.cs
- SafeNativeMemoryHandle.cs
- List.cs
- formatter.cs
- ByteStreamMessageUtility.cs
- InputLanguageCollection.cs
- ObjectStorage.cs
- SafeReadContext.cs
- AdPostCacheSubstitution.cs
- SelectionGlyphBase.cs
- DataGridAddNewRow.cs
- ComponentChangedEvent.cs
- CurrencyManager.cs
- QuadraticBezierSegment.cs
- WSAddressing10ProblemHeaderQNameFault.cs
- DefaultHttpHandler.cs
- HeaderCollection.cs
- SrgsItemList.cs
- HealthMonitoringSectionHelper.cs
- FontStretches.cs
- InvokePattern.cs
- SqlDependencyUtils.cs
- DiscoveryInnerClientManaged11.cs
- CompensatableTransactionScopeActivityDesigner.cs
- Transform3DGroup.cs
- ProtocolsConfigurationEntry.cs
- TickBar.cs
- ApplicationDirectory.cs
- InvalidDataException.cs
- MetadataArtifactLoaderResource.cs
- TextRangeSerialization.cs
- EncryptedType.cs
- RoutedEventHandlerInfo.cs
- BamlReader.cs
- ZipIOModeEnforcingStream.cs
- ContextMenu.cs
- ProfileGroupSettingsCollection.cs
- UiaCoreApi.cs
- OdbcFactory.cs
- EntityClassGenerator.cs
- DataGridViewColumnStateChangedEventArgs.cs
- DetailsViewModeEventArgs.cs
- FunctionMappingTranslator.cs
- InkCanvasFeedbackAdorner.cs
- InvalidDataContractException.cs
- RefreshEventArgs.cs
- TextBlockAutomationPeer.cs
- LabelEditEvent.cs
- FormsAuthenticationUserCollection.cs
- SiteMapHierarchicalDataSourceView.cs
- InvalidPrinterException.cs
- FrameworkObject.cs
- EventLogPermissionAttribute.cs
- GrammarBuilderBase.cs
- ObjectDisposedException.cs
- MultilineStringConverter.cs
- OutputCacheSettingsSection.cs
- SynchronizedDispatch.cs
- CodeLabeledStatement.cs
- XmlSerializableServices.cs
- MimeXmlReflector.cs
- FrameworkElementAutomationPeer.cs
- Encoding.cs
- HelpProvider.cs
- ISAPIWorkerRequest.cs
- StrokeNodeOperations2.cs
- Vector3DCollectionValueSerializer.cs
- ExtractorMetadata.cs
- MsmqInputChannelListenerBase.cs
- HitTestResult.cs
- TextRange.cs
- _LazyAsyncResult.cs
- DataBoundControlDesigner.cs
- ToolStripDropDownMenu.cs
- PropertyRecord.cs
- OverflowException.cs
- brushes.cs
- DocumentViewerBase.cs
- CryptoHelper.cs
- BaseTreeIterator.cs
- DropTarget.cs
- RowParagraph.cs
- Encoder.cs
- ContainerUtilities.cs
- Int32RectConverter.cs
- DataMember.cs
- StylusPointCollection.cs
- Serializer.cs
- CurrentChangedEventManager.cs
- AQNBuilder.cs
- MemoryMappedFileSecurity.cs