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
- OwnerDrawPropertyBag.cs
- AppModelKnownContentFactory.cs
- AbsoluteQuery.cs
- ClassDataContract.cs
- CompositionDesigner.cs
- ContentElementAutomationPeer.cs
- MetadataArtifactLoaderResource.cs
- ChtmlSelectionListAdapter.cs
- OpenTypeLayout.cs
- ErrorWrapper.cs
- VarRefManager.cs
- GridViewUpdateEventArgs.cs
- CustomValidator.cs
- DnsEndpointIdentity.cs
- EmptyCollection.cs
- OpacityConverter.cs
- IISUnsafeMethods.cs
- DynamicPropertyHolder.cs
- OverlappedAsyncResult.cs
- ExtentJoinTreeNode.cs
- Adorner.cs
- TrackingMemoryStreamFactory.cs
- ResourcesBuildProvider.cs
- SqlConnectionPoolProviderInfo.cs
- QualifierSet.cs
- ForwardPositionQuery.cs
- GifBitmapDecoder.cs
- QilParameter.cs
- GiveFeedbackEvent.cs
- HtmlTitle.cs
- DataSetMappper.cs
- XmlElementList.cs
- MinimizableAttributeTypeConverter.cs
- PerformanceCounterLib.cs
- LinkClickEvent.cs
- SymmetricSecurityBindingElement.cs
- ToolStripControlHost.cs
- CheckBox.cs
- CompilationLock.cs
- NativeMethods.cs
- MethodImplAttribute.cs
- ExtensibleClassFactory.cs
- OracleInternalConnection.cs
- SubqueryTrackingVisitor.cs
- CollectionViewGroupRoot.cs
- Rectangle.cs
- ToolStripItemImageRenderEventArgs.cs
- StringPropertyBuilder.cs
- ToolStripGrip.cs
- WebPartVerbsEventArgs.cs
- TemplateAction.cs
- srgsitem.cs
- TrackPoint.cs
- PeerApplicationLaunchInfo.cs
- DataGridViewCellStyleConverter.cs
- QilGenerator.cs
- ConnectionConsumerAttribute.cs
- XPathNodeList.cs
- RotateTransform3D.cs
- ListBoxChrome.cs
- PropertyMap.cs
- HttpDigestClientCredential.cs
- ReversePositionQuery.cs
- SoapSchemaExporter.cs
- FixedHyperLink.cs
- ProfileSection.cs
- ConfigViewGenerator.cs
- Msec.cs
- SoapMessage.cs
- BuildResult.cs
- SelectionChangedEventArgs.cs
- WebPartConnectVerb.cs
- TabletCollection.cs
- FontUnit.cs
- ComplusEndpointConfigContainer.cs
- Maps.cs
- RangeValidator.cs
- SoundPlayerAction.cs
- CheckBoxFlatAdapter.cs
- SoapFault.cs
- HtmlUtf8RawTextWriter.cs
- WebConfigManager.cs
- Point3D.cs
- PatternMatcher.cs
- FontStyles.cs
- UnsafeMethods.cs
- PostBackTrigger.cs
- ReflectionServiceProvider.cs
- OutputCacheSettingsSection.cs
- OracleDateTime.cs
- HitTestResult.cs
- BufferedGraphicsManager.cs
- DataRow.cs
- CodeExporter.cs
- VirtualDirectoryMapping.cs
- DataListItemCollection.cs
- oledbmetadatacolumnnames.cs
- EmptyImpersonationContext.cs
- TextBoxBaseDesigner.cs
- MouseActionConverter.cs