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
- TranslateTransform.cs
- HandlerBase.cs
- AppDomainFactory.cs
- ImportException.cs
- Adorner.cs
- ImageField.cs
- RenderTargetBitmap.cs
- RadioButtonList.cs
- URL.cs
- XmlILIndex.cs
- SafeArrayTypeMismatchException.cs
- TdsParserStateObject.cs
- InstanceHandleReference.cs
- TypeSystem.cs
- ScrollBarAutomationPeer.cs
- FrugalList.cs
- Parameter.cs
- FrameworkElement.cs
- GridViewCancelEditEventArgs.cs
- WebChannelFactory.cs
- RelationshipEndMember.cs
- PriorityQueue.cs
- DrawListViewItemEventArgs.cs
- Effect.cs
- DataGridSortCommandEventArgs.cs
- CodeTypeConstructor.cs
- DataGridViewImageColumn.cs
- Point3D.cs
- PlanCompiler.cs
- DesignerVerbCollection.cs
- DllNotFoundException.cs
- KerberosSecurityTokenAuthenticator.cs
- Highlights.cs
- ProcessHostMapPath.cs
- DefaultEventAttribute.cs
- mediapermission.cs
- ProxyWebPartManager.cs
- Root.cs
- EntityContainerEmitter.cs
- ObjectQueryProvider.cs
- FragmentNavigationEventArgs.cs
- ButtonFieldBase.cs
- EtwProvider.cs
- CustomAttributeBuilder.cs
- URLMembershipCondition.cs
- EndOfStreamException.cs
- CodeValidator.cs
- XmlDocumentType.cs
- WebPartAuthorizationEventArgs.cs
- XmlTypeAttribute.cs
- KeyNotFoundException.cs
- CellPartitioner.cs
- WindowsPrincipal.cs
- CompilationUtil.cs
- MenuItem.cs
- sqlnorm.cs
- Scheduling.cs
- GridViewSortEventArgs.cs
- CompilerScopeManager.cs
- TabControl.cs
- PeerNodeTraceRecord.cs
- IdentityHolder.cs
- Monitor.cs
- ClosableStream.cs
- validation.cs
- xsdvalidator.cs
- WmlCalendarAdapter.cs
- ContractSearchPattern.cs
- XmlSchemaSimpleTypeList.cs
- Rfc4050KeyFormatter.cs
- NativeCompoundFileAPIs.cs
- Matrix.cs
- XDeferredAxisSource.cs
- SQLDoubleStorage.cs
- WebPartVerbsEventArgs.cs
- MouseOverProperty.cs
- BindingExpression.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- PLINQETWProvider.cs
- ModelVisual3D.cs
- ItemDragEvent.cs
- StandardToolWindows.cs
- TextSelectionHelper.cs
- UIElement.cs
- ApplicationServicesHostFactory.cs
- MemoryResponseElement.cs
- RulePatternOps.cs
- JournalEntry.cs
- Border.cs
- MimeParameter.cs
- DataGridHeaderBorder.cs
- Win32PrintDialog.cs
- DataGridTableCollection.cs
- FormCollection.cs
- CompilationUtil.cs
- HandlerFactoryWrapper.cs
- LoadWorkflowByKeyAsyncResult.cs
- NavigationService.cs
- BevelBitmapEffect.cs
- _RequestCacheProtocol.cs