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
- __Filters.cs
- ReceiveMessageAndVerifySecurityAsyncResultBase.cs
- AdapterUtil.cs
- PointF.cs
- Publisher.cs
- InputMethod.cs
- HMACSHA512.cs
- SystemColors.cs
- XmlResolver.cs
- ToolZoneDesigner.cs
- DataGridViewHitTestInfo.cs
- ThreadExceptionEvent.cs
- OrderByQueryOptionExpression.cs
- DateTimeFormatInfoScanner.cs
- MessageCredentialType.cs
- OnOperation.cs
- SmtpDigestAuthenticationModule.cs
- CompiledScopeCriteria.cs
- PaperSize.cs
- BrowserDefinition.cs
- TableStyle.cs
- ReceiveParametersContent.cs
- ExpressionConverter.cs
- ExtenderControl.cs
- HttpAsyncResult.cs
- SpeakProgressEventArgs.cs
- BamlLocalizabilityResolver.cs
- CollectionViewProxy.cs
- Interlocked.cs
- PassportAuthenticationModule.cs
- MenuRenderer.cs
- EditorResources.cs
- PerspectiveCamera.cs
- PictureBox.cs
- DebugControllerThread.cs
- ModelFunction.cs
- EnumType.cs
- GridViewEditEventArgs.cs
- ColumnTypeConverter.cs
- StateMachineSubscriptionManager.cs
- CharUnicodeInfo.cs
- TableCell.cs
- TimeSpanFormat.cs
- Menu.cs
- NonSerializedAttribute.cs
- ProcessInfo.cs
- Int32RectValueSerializer.cs
- NoClickablePointException.cs
- SqlDataSourceView.cs
- FactoryGenerator.cs
- GlyphShapingProperties.cs
- NetworkInformationPermission.cs
- CodeTypeMember.cs
- CodeDOMProvider.cs
- ShadowGlyph.cs
- ClosureBinding.cs
- MultipleViewPatternIdentifiers.cs
- DataControlImageButton.cs
- SelectorItemAutomationPeer.cs
- TextBoxRenderer.cs
- ScrollPattern.cs
- ToolStripItem.cs
- tibetanshape.cs
- SafeMILHandle.cs
- IntersectQueryOperator.cs
- RC2CryptoServiceProvider.cs
- UnsafeNativeMethods.cs
- Invariant.cs
- ConfigXmlComment.cs
- Hashtable.cs
- TreeNodeBinding.cs
- StringConcat.cs
- RedistVersionInfo.cs
- SqlPersonalizationProvider.cs
- SoapExtensionImporter.cs
- configsystem.cs
- listitem.cs
- MethodBody.cs
- ExtensibleClassFactory.cs
- Point3D.cs
- ChtmlLinkAdapter.cs
- DataSetUtil.cs
- SettingsContext.cs
- __Filters.cs
- MultiTrigger.cs
- PageContentCollection.cs
- RegexFCD.cs
- NameScopePropertyAttribute.cs
- XamlInt32CollectionSerializer.cs
- SiteMapDataSourceDesigner.cs
- DependencyPropertyAttribute.cs
- UIElementHelper.cs
- UnsafeNativeMethods.cs
- StdValidatorsAndConverters.cs
- DesignerVerb.cs
- RootBuilder.cs
- _UriTypeConverter.cs
- SystemDiagnosticsSection.cs
- CallbackValidatorAttribute.cs
- LoginUtil.cs