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
- UITypeEditor.cs
- DataSpaceManager.cs
- WebPartUserCapability.cs
- DataServiceRequestArgs.cs
- CodeTryCatchFinallyStatement.cs
- RelationshipDetailsRow.cs
- Block.cs
- DbConnectionOptions.cs
- CommandDevice.cs
- ImmComposition.cs
- FeatureAttribute.cs
- EvidenceBase.cs
- SqlGatherProducedAliases.cs
- ProjectionPath.cs
- HtmlImageAdapter.cs
- DtdParser.cs
- SQLInt32Storage.cs
- VectorAnimationUsingKeyFrames.cs
- safelink.cs
- IsolatedStorage.cs
- RegionIterator.cs
- HtmlInputRadioButton.cs
- SchemaRegistration.cs
- WebBrowserNavigatingEventHandler.cs
- Native.cs
- objectquery_tresulttype.cs
- TimeoutException.cs
- GridView.cs
- SessionEndingEventArgs.cs
- EntityCommandDefinition.cs
- EmptyStringExpandableObjectConverter.cs
- ColorContextHelper.cs
- SectionRecord.cs
- ISO2022Encoding.cs
- Control.cs
- TextServicesManager.cs
- ProfileManager.cs
- AssemblyBuilderData.cs
- ContextMenuService.cs
- ModelPropertyCollectionImpl.cs
- WorkflowPersistenceService.cs
- InvokeHandlers.cs
- OleStrCAMarshaler.cs
- ListViewInsertionMark.cs
- MessageSecurityVersionConverter.cs
- ServiceEndpointAssociationProvider.cs
- RotateTransform3D.cs
- SafeLocalMemHandle.cs
- CachedTypeface.cs
- DataGridViewElement.cs
- SendKeys.cs
- FieldAccessException.cs
- WaitHandleCannotBeOpenedException.cs
- GuidTagList.cs
- TcpHostedTransportConfiguration.cs
- QilScopedVisitor.cs
- Properties.cs
- ObjectDataSourceSelectingEventArgs.cs
- DefaultParameterValueAttribute.cs
- LabelExpression.cs
- Sql8ExpressionRewriter.cs
- ListViewContainer.cs
- BinaryFormatterWriter.cs
- IndicCharClassifier.cs
- SchemaInfo.cs
- SystemThemeKey.cs
- CustomErrorCollection.cs
- PaperSize.cs
- DataIdProcessor.cs
- HttpResponseWrapper.cs
- HtmlInputCheckBox.cs
- GetPageNumberCompletedEventArgs.cs
- ByteRangeDownloader.cs
- FileStream.cs
- WebConfigurationHost.cs
- XmlReader.cs
- VisualStyleTypesAndProperties.cs
- SecurityKeyType.cs
- ClosableStream.cs
- CalendarSelectionChangedEventArgs.cs
- ParamArrayAttribute.cs
- Rect3DValueSerializer.cs
- LocationReferenceValue.cs
- StdRegProviderWrapper.cs
- EditorAttribute.cs
- SystemIPAddressInformation.cs
- ObjectListComponentEditor.cs
- XsltSettings.cs
- SerializationHelper.cs
- CompModHelpers.cs
- HyperLinkField.cs
- SByte.cs
- MenuItemStyleCollection.cs
- MatrixUtil.cs
- Pens.cs
- AuthenticationModulesSection.cs
- ImageClickEventArgs.cs
- QueryPageSettingsEventArgs.cs
- AudioFileOut.cs
- RequiredFieldValidator.cs