Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- KeyboardEventArgs.cs
- AttributeCollection.cs
- EntityWithKeyStrategy.cs
- ListViewSelectEventArgs.cs
- GroupBox.cs
- EntryPointNotFoundException.cs
- SerializationBinder.cs
- XmlSchemaSimpleContent.cs
- TextRangeAdaptor.cs
- Binding.cs
- TypePropertyEditor.cs
- RIPEMD160.cs
- FullTextLine.cs
- RelAssertionDirectKeyIdentifierClause.cs
- SqlAggregateChecker.cs
- PasswordRecovery.cs
- HttpCacheVary.cs
- TextBoxView.cs
- IApplicationTrustManager.cs
- FontStyles.cs
- EntityDataSourceUtil.cs
- HtmlInputSubmit.cs
- AdornerLayer.cs
- SequentialWorkflowHeaderFooter.cs
- LiteralTextContainerControlBuilder.cs
- FastPropertyAccessor.cs
- TopClause.cs
- SHA256Managed.cs
- TypeElementCollection.cs
- WebPartDisplayModeCancelEventArgs.cs
- HandleCollector.cs
- uribuilder.cs
- GeneralTransform3DGroup.cs
- QuotedStringFormatReader.cs
- PropertyPathWorker.cs
- ProfileSection.cs
- Figure.cs
- DataGridViewCellFormattingEventArgs.cs
- IntranetCredentialPolicy.cs
- StyleSelector.cs
- ValidationResult.cs
- LinkClickEvent.cs
- MediaEntryAttribute.cs
- Operator.cs
- RelationshipType.cs
- DiscoveryDocument.cs
- WindowAutomationPeer.cs
- ToolStripGripRenderEventArgs.cs
- _SslSessionsCache.cs
- Debug.cs
- ListBase.cs
- EventMetadata.cs
- HttpPostProtocolImporter.cs
- EntityDataSourceStatementEditor.cs
- XmlSchemaCompilationSettings.cs
- ActivityDesignerHighlighter.cs
- ConstraintCollection.cs
- InvokeWebServiceDesigner.cs
- RuleSetCollection.cs
- ToolStripManager.cs
- TraceContextEventArgs.cs
- FilterEventArgs.cs
- bindurihelper.cs
- EdmEntityTypeAttribute.cs
- CodeAssignStatement.cs
- HttpServerVarsCollection.cs
- MetadataArtifactLoaderCompositeFile.cs
- NumberEdit.cs
- Internal.cs
- DataBindingExpressionBuilder.cs
- TypeGenericEnumerableViewSchema.cs
- X509ChainElement.cs
- CancelEventArgs.cs
- _LocalDataStoreMgr.cs
- BindingGraph.cs
- XmlWriterSettings.cs
- IImplicitResourceProvider.cs
- RequestNavigateEventArgs.cs
- DBConnectionString.cs
- HtmlEmptyTagControlBuilder.cs
- Rotation3D.cs
- DataGridViewDataConnection.cs
- DBAsyncResult.cs
- OnOperation.cs
- PrimitiveType.cs
- InheritanceContextChangedEventManager.cs
- TextRunProperties.cs
- BitArray.cs
- NameTable.cs
- XmlSchemaInferenceException.cs
- AppDomainFactory.cs
- COAUTHINFO.cs
- HierarchicalDataTemplate.cs
- QilFunction.cs
- RequestResizeEvent.cs
- Gdiplus.cs
- _SafeNetHandles.cs
- LocalizableResourceBuilder.cs
- HttpListenerElement.cs
- HitTestDrawingContextWalker.cs