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
- TextEditorParagraphs.cs
- WeakEventTable.cs
- ExpressionVisitor.cs
- BadImageFormatException.cs
- RolePrincipal.cs
- DetailsViewDeletedEventArgs.cs
- DispatcherEventArgs.cs
- OverlappedAsyncResult.cs
- ProtocolState.cs
- designeractionbehavior.cs
- AnnotationDocumentPaginator.cs
- Query.cs
- safelink.cs
- ToolboxBitmapAttribute.cs
- ConvertEvent.cs
- TargetFrameworkUtil.cs
- PersonalizableAttribute.cs
- input.cs
- TimeSpanConverter.cs
- SecurityToken.cs
- FixedSOMGroup.cs
- ButtonFieldBase.cs
- RegexTypeEditor.cs
- DeviceSpecificChoiceCollection.cs
- StdValidatorsAndConverters.cs
- Crypto.cs
- ChildTable.cs
- _NativeSSPI.cs
- EdmItemCollection.cs
- GlobalizationAssembly.cs
- mediaclock.cs
- SqlDataReader.cs
- TextSegment.cs
- UserControl.cs
- HTMLTextWriter.cs
- ColumnResizeUndoUnit.cs
- SQLByte.cs
- TypeConstant.cs
- MailHeaderInfo.cs
- XmlSchemaValidator.cs
- TypeCodeDomSerializer.cs
- TrackingProfileCache.cs
- Annotation.cs
- ReadOnlyHierarchicalDataSource.cs
- ConnectionInterfaceCollection.cs
- TreeNodeEventArgs.cs
- DescriptionAttribute.cs
- CodeStatementCollection.cs
- SingleSelectRootGridEntry.cs
- CommonDialog.cs
- HtmlShim.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- BreadCrumbTextConverter.cs
- FileDialogPermission.cs
- Registry.cs
- ToolZone.cs
- mediaeventargs.cs
- FlowLayoutPanelDesigner.cs
- SqlConnectionString.cs
- RTTypeWrapper.cs
- Library.cs
- WorkflowView.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- PropertyEmitterBase.cs
- AttributeAction.cs
- CoTaskMemUnicodeSafeHandle.cs
- RootBrowserWindowProxy.cs
- QueryReaderSettings.cs
- XmlNavigatorFilter.cs
- Separator.cs
- ExecutionContext.cs
- WebServiceAttribute.cs
- SymbolEqualComparer.cs
- SmiConnection.cs
- RegexParser.cs
- IteratorFilter.cs
- XmlChoiceIdentifierAttribute.cs
- BindingSource.cs
- KnownBoxes.cs
- ListViewSortEventArgs.cs
- CssTextWriter.cs
- DataViewSettingCollection.cs
- ExternalFile.cs
- Vector3D.cs
- pingexception.cs
- TcpChannelListener.cs
- Figure.cs
- XsltInput.cs
- DataObjectPastingEventArgs.cs
- MarshalByValueComponent.cs
- OutputCacheProfile.cs
- WebService.cs
- HttpVersion.cs
- AppSecurityManager.cs
- SByteStorage.cs
- Vector3D.cs
- ScriptRegistrationManager.cs
- ListViewItem.cs
- DiscoveryClientOutputChannel.cs
- NonSerializedAttribute.cs