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
- RelationshipManager.cs
- BamlResourceContent.cs
- HtmlInputControl.cs
- ObjectItemAttributeAssemblyLoader.cs
- StructureChangedEventArgs.cs
- Context.cs
- CodeNamespaceCollection.cs
- AssociatedControlConverter.cs
- DataGridTextBoxColumn.cs
- XhtmlConformanceSection.cs
- DoubleAnimation.cs
- AuthenticationModuleElement.cs
- WrapPanel.cs
- oledbmetadatacolumnnames.cs
- EnumValAlphaComparer.cs
- ContainerTracking.cs
- ReadWriteSpinLock.cs
- DocumentGridContextMenu.cs
- ResourceExpression.cs
- BinaryObjectReader.cs
- ColumnWidthChangingEvent.cs
- CodeVariableDeclarationStatement.cs
- DataTableReaderListener.cs
- UiaCoreApi.cs
- DataGridViewCell.cs
- ETagAttribute.cs
- ExtendedProtectionPolicyElement.cs
- EndpointConfigContainer.cs
- Nodes.cs
- HandlerFactoryWrapper.cs
- EventNotify.cs
- AnnotationResourceChangedEventArgs.cs
- MustUnderstandBehavior.cs
- TileBrush.cs
- DbMetaDataFactory.cs
- ArrayConverter.cs
- TouchPoint.cs
- InvalidChannelBindingException.cs
- EnumMember.cs
- ADMembershipUser.cs
- VariableQuery.cs
- ApplicationInfo.cs
- UrlPath.cs
- Transform3D.cs
- UdpDiscoveryEndpointElement.cs
- SrgsRuleRef.cs
- util.cs
- OleDbEnumerator.cs
- CmsUtils.cs
- QueryCacheEntry.cs
- WindowsListViewGroupSubsetLink.cs
- EtwTrace.cs
- DataGridSortCommandEventArgs.cs
- OleDbErrorCollection.cs
- ContainerFilterService.cs
- SecurityContext.cs
- oledbmetadatacolumnnames.cs
- DataControlCommands.cs
- TriggerActionCollection.cs
- GlyphRun.cs
- CompilerState.cs
- ThaiBuddhistCalendar.cs
- UserControlBuildProvider.cs
- CompositeFontParser.cs
- TextControl.cs
- COSERVERINFO.cs
- DataDocumentXPathNavigator.cs
- ObservableCollection.cs
- SupportsEventValidationAttribute.cs
- ValidatedControlConverter.cs
- BaseAddressElementCollection.cs
- HttpModuleAction.cs
- DesignBinding.cs
- TextRangeProviderWrapper.cs
- WaitForChangedResult.cs
- ProfessionalColorTable.cs
- BitVector32.cs
- CreateParams.cs
- DefaultTextStore.cs
- CacheForPrimitiveTypes.cs
- PropertyRecord.cs
- SecurityTokenParameters.cs
- TextDecorationCollectionConverter.cs
- BuildManager.cs
- CodeAccessPermission.cs
- ConfigurationStrings.cs
- DataSourceView.cs
- RootProfilePropertySettingsCollection.cs
- RowUpdatingEventArgs.cs
- ElementAtQueryOperator.cs
- MissingFieldException.cs
- EventLogPermissionEntry.cs
- ClickablePoint.cs
- BooleanSwitch.cs
- PenThreadWorker.cs
- KnownTypesProvider.cs
- IsolatedStorage.cs
- FastEncoderWindow.cs
- CodeAttributeDeclaration.cs
- MsdtcClusterUtils.cs