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
- PageThemeParser.cs
- remotingproxy.cs
- RelatedPropertyManager.cs
- TransformDescriptor.cs
- ValidationRule.cs
- Content.cs
- ZipArchive.cs
- UnmanagedMarshal.cs
- NavigationWindow.cs
- PixelFormat.cs
- ComponentCommands.cs
- EventEntry.cs
- _LocalDataStoreMgr.cs
- DataSetMappper.cs
- SQLByte.cs
- Int16Converter.cs
- PropertyPathConverter.cs
- IteratorDescriptor.cs
- PageThemeCodeDomTreeGenerator.cs
- SqlUDTStorage.cs
- MemberDescriptor.cs
- XmlSchemaInfo.cs
- WindowsListViewScroll.cs
- GuidelineSet.cs
- ExtendedProtectionPolicy.cs
- RawStylusActions.cs
- BaseProcessor.cs
- ReversePositionQuery.cs
- StreamInfo.cs
- GatewayDefinition.cs
- SafeReversePInvokeHandle.cs
- _LoggingObject.cs
- XmlNodeList.cs
- NegotiateStream.cs
- Form.cs
- _LoggingObject.cs
- LoadRetryAsyncResult.cs
- SQLInt64.cs
- DESCryptoServiceProvider.cs
- SQLSingleStorage.cs
- RequiredAttributeAttribute.cs
- SafeRegistryKey.cs
- DeflateStream.cs
- ParentUndoUnit.cs
- ImageUrlEditor.cs
- XmlWhitespace.cs
- XmlnsCompatibleWithAttribute.cs
- OdbcParameterCollection.cs
- wgx_commands.cs
- ValidatorCollection.cs
- CrossContextChannel.cs
- DesignBindingEditor.cs
- Win32.cs
- CompleteWizardStep.cs
- WindowsIdentity.cs
- LogicalTreeHelper.cs
- AffineTransform3D.cs
- HierarchicalDataBoundControlAdapter.cs
- StylusPlugInCollection.cs
- DownloadProgressEventArgs.cs
- BitmapDownload.cs
- ImageListImageEditor.cs
- BaseDataBoundControlDesigner.cs
- BooleanAnimationUsingKeyFrames.cs
- Rijndael.cs
- ContentIterators.cs
- BevelBitmapEffect.cs
- ChildrenQuery.cs
- XsdDuration.cs
- HyperLink.cs
- CalculatedColumn.cs
- DataGridViewCellStyleBuilderDialog.cs
- PropertyPathWorker.cs
- ServiceObjectContainer.cs
- SingleObjectCollection.cs
- BitmapSource.cs
- MessageHeaders.cs
- LabelAutomationPeer.cs
- HtmlTableRowCollection.cs
- AsymmetricKeyExchangeFormatter.cs
- EntitySetBase.cs
- ListViewInsertedEventArgs.cs
- Point3DValueSerializer.cs
- ValidationResult.cs
- RuntimeArgumentHandle.cs
- TreeNodeStyle.cs
- EntityStoreSchemaGenerator.cs
- BitmapDecoder.cs
- EventPrivateKey.cs
- SmtpCommands.cs
- ButtonAutomationPeer.cs
- __Filters.cs
- ToolBarDesigner.cs
- OptimisticConcurrencyException.cs
- JsonGlobals.cs
- BitSet.cs
- BrowserDefinition.cs
- NameObjectCollectionBase.cs
- VScrollProperties.cs
- SystemKeyConverter.cs