Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / InterOp / CursorInteropHelper.cs / 1305600 / 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 jdmack Created //--------------------------------------------------------------------------- using System; using System.Runtime.InteropServices; using System.Security; using System.Windows.Input; using SecurityHelper=MS.Internal.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 /// [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
- CacheAxisQuery.cs
- PersonalizableAttribute.cs
- MimeFormatter.cs
- LayoutSettings.cs
- ThicknessAnimation.cs
- RIPEMD160.cs
- X509Certificate2.cs
- ReadOnlyDictionary.cs
- Point3DAnimationBase.cs
- DetailsViewDeleteEventArgs.cs
- CroppedBitmap.cs
- PenCursorManager.cs
- DataListComponentEditor.cs
- MessageSecurityProtocolFactory.cs
- LabelAutomationPeer.cs
- VerificationException.cs
- TextTabProperties.cs
- XsltArgumentList.cs
- AttachmentCollection.cs
- HttpCachePolicyElement.cs
- DecimalAverageAggregationOperator.cs
- Rule.cs
- SHA256Managed.cs
- XmlAtomicValue.cs
- BinHexEncoder.cs
- TryExpression.cs
- TranslateTransform.cs
- CertificateReferenceElement.cs
- TabPanel.cs
- WebPartVerbCollection.cs
- LocalizabilityAttribute.cs
- EventLogPermissionEntry.cs
- TransactedBatchingElement.cs
- WmlTextViewAdapter.cs
- RefExpr.cs
- Vars.cs
- SecurityElement.cs
- WriteFileContext.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- RowToParametersTransformer.cs
- Span.cs
- TreeChangeInfo.cs
- GridViewColumnCollectionChangedEventArgs.cs
- _SSPISessionCache.cs
- ProfileSettingsCollection.cs
- Panel.cs
- RelationshipFixer.cs
- Material.cs
- MobileControlsSection.cs
- ServiceOperationHelpers.cs
- ActivityScheduledRecord.cs
- MouseButtonEventArgs.cs
- EndpointDispatcher.cs
- Variant.cs
- SchemaMerger.cs
- PagerSettings.cs
- BaseInfoTable.cs
- ThicknessAnimationBase.cs
- SafeSecurityHelper.cs
- _NegoState.cs
- IDispatchConstantAttribute.cs
- CompilerErrorCollection.cs
- CaseInsensitiveOrdinalStringComparer.cs
- TimeIntervalCollection.cs
- ConsoleKeyInfo.cs
- input.cs
- XmlCompatibilityReader.cs
- WindowsFormsHost.cs
- _LocalDataStore.cs
- GuidelineCollection.cs
- Paragraph.cs
- AsyncOperationManager.cs
- Lasso.cs
- AutomationPropertyInfo.cs
- DiagnosticTrace.cs
- XMLSyntaxException.cs
- LineGeometry.cs
- CursorInteropHelper.cs
- ToolboxBitmapAttribute.cs
- IISUnsafeMethods.cs
- DodSequenceMerge.cs
- OneToOneMappingSerializer.cs
- CroppedBitmap.cs
- StreamWithDictionary.cs
- Point3D.cs
- IteratorFilter.cs
- Win32Exception.cs
- SendMailErrorEventArgs.cs
- RectAnimationClockResource.cs
- PathSegment.cs
- _SSPISessionCache.cs
- TcpChannelFactory.cs
- CompositeKey.cs
- InlineCollection.cs
- StringFormat.cs
- LinqDataSourceSelectEventArgs.cs
- HierarchicalDataTemplate.cs
- XMLDiffLoader.cs
- Brush.cs
- BitmapVisualManager.cs