Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / System / Windows / InterOp / CursorInteropHelper.cs / 1 / CursorInteropHelper.cs
//---------------------------------------------------------------------------- // // File: CursorInteropHelper.cs // // Description: Implements Avalon CursorInteropHelper class, which helps // interop b/w Cursor handles and Avalon Cursor objects. // // Copyright (C) 2005 by Microsoft Corporation. All rights reserved. // // History: // 06/30/05 [....] Created //--------------------------------------------------------------------------- using System; using System.Runtime.InteropServices; using System.Security; using System.Windows.Input; using MS.Internal.PresentationCore; // SecurityHelper namespace System.Windows.Interop { #region class CursorInteropHelper ////// Implements Avalon CursorInteropHelper classes, which helps /// interop b/w legacy Cursor handles and Avalon Cursor objects. /// public static class CursorInteropHelper { //--------------------------------------------------- // // Public Methods // //--------------------------------------------------- #region Public Methods ////// Creates a Cursor from a SafeHandle to a native Win32 Cursor /// /// /// SafeHandle to a native Win32 cursor /// ////// Callers must have UIPermission(UIPermissionWindow.AllWindows) to call this API. /// ////// Critical: This causes the cursor to change and accesses the SetHandleInternalMethod /// PublicOK: There is a demand. /// [SecurityCritical ] public static Cursor Create(SafeHandle cursorHandle) { SecurityHelper.DemandUIWindowPermission(); return CriticalCreate(cursorHandle); } #endregion Public Methods //---------------------------------------------------- // // Internal Methods // //--------------------------------------------------- #region Internal Methods ////// Creates a Cursor from a SafeHandle to a native Win32 Cursor /// /// /// SafeHandle to a native Win32 cursor /// ////// Critical: This causes the cursor to change and accesses the SetHandleInternalMethod /// [FriendAccessAllowed] [SecurityCritical] internal static Cursor CriticalCreate(SafeHandle cursorHandle) { return new Cursor(cursorHandle); } #endregion Internal Methods } #endregion class CursorInteropHelper } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Peer.cs
- CharacterShapingProperties.cs
- MonitoringDescriptionAttribute.cs
- WhitespaceRuleReader.cs
- XmlSchemaCompilationSettings.cs
- ViewgenGatekeeper.cs
- Vars.cs
- Vector3DCollectionConverter.cs
- WebConfigurationHostFileChange.cs
- ByteConverter.cs
- DefaultPrintController.cs
- ActivationProxy.cs
- ElementNotAvailableException.cs
- XmlQueryRuntime.cs
- Helper.cs
- DataContext.cs
- sqlcontext.cs
- DesignerToolStripControlHost.cs
- DesignerDataSourceView.cs
- Margins.cs
- IconHelper.cs
- Adorner.cs
- ClientSettingsProvider.cs
- CapabilitiesSection.cs
- _RegBlobWebProxyDataBuilder.cs
- MonitorWrapper.cs
- NumberSubstitution.cs
- HttpModuleCollection.cs
- XmlIterators.cs
- ObjectStateEntry.cs
- CssStyleCollection.cs
- SingleAnimationUsingKeyFrames.cs
- RelationshipWrapper.cs
- VariableQuery.cs
- ColorAnimation.cs
- DataGridViewCellStyleChangedEventArgs.cs
- SafeArchiveContext.cs
- QueryInterceptorAttribute.cs
- MasterPageCodeDomTreeGenerator.cs
- FlowPanelDesigner.cs
- DesignerExtenders.cs
- SplashScreenNativeMethods.cs
- webproxy.cs
- HostingEnvironmentException.cs
- ConfigurationElementProperty.cs
- CodeRegionDirective.cs
- ProcessModuleCollection.cs
- DPTypeDescriptorContext.cs
- ProcessModule.cs
- Typeface.cs
- GlyphsSerializer.cs
- ConfigurationSettings.cs
- DesignerSerializationOptionsAttribute.cs
- PresentationTraceSources.cs
- WorkItem.cs
- EntityViewGenerator.cs
- SmiRecordBuffer.cs
- AmbiguousMatchException.cs
- XamlVector3DCollectionSerializer.cs
- Soap.cs
- AdCreatedEventArgs.cs
- XPathException.cs
- SapiRecoInterop.cs
- RSAPKCS1SignatureDeformatter.cs
- RectangleGeometry.cs
- ConsoleEntryPoint.cs
- DateTimeValueSerializer.cs
- DataPagerFieldCommandEventArgs.cs
- ProfileGroupSettings.cs
- WorkflowDefinitionDispenser.cs
- HttpWebRequestElement.cs
- SecurityManager.cs
- CharEnumerator.cs
- EmbeddedMailObject.cs
- PersonalizableTypeEntry.cs
- ClientSession.cs
- RoleGroup.cs
- ListDictionaryInternal.cs
- Security.cs
- IDataContractSurrogate.cs
- AVElementHelper.cs
- StatusBar.cs
- OleStrCAMarshaler.cs
- SizeF.cs
- EmptyCollection.cs
- ExpressionBuilder.cs
- AsyncContentLoadedEventArgs.cs
- ISAPIApplicationHost.cs
- XPathDocument.cs
- XhtmlBasicPageAdapter.cs
- StylusShape.cs
- PointCollectionConverter.cs
- ServiceModelEnumValidatorAttribute.cs
- ApplicationHost.cs
- CollectionView.cs
- ICollection.cs
- ScriptResourceHandler.cs
- ExpressionList.cs
- _SslState.cs
- FamilyMap.cs