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
- X509UI.cs
- CharacterBufferReference.cs
- ListItem.cs
- ProfilePropertyNameValidator.cs
- ServiceOperationInvoker.cs
- UIElementPropertyUndoUnit.cs
- BufferedGraphicsContext.cs
- ContextStaticAttribute.cs
- ExpressionPrefixAttribute.cs
- OptimisticConcurrencyException.cs
- CompositeActivityValidator.cs
- PropertyEntry.cs
- SubclassTypeValidatorAttribute.cs
- ScriptingSectionGroup.cs
- StringUtil.cs
- AtlasWeb.Designer.cs
- Accessible.cs
- _LoggingObject.cs
- TextTreeTextElementNode.cs
- SqlProcedureAttribute.cs
- NullableDecimalAverageAggregationOperator.cs
- SqlGenericUtil.cs
- DataChangedEventManager.cs
- SQLGuidStorage.cs
- ActivationServices.cs
- ReadContentAsBinaryHelper.cs
- AdornerLayer.cs
- _NegoStream.cs
- SignHashRequest.cs
- ChannelTokenTypeConverter.cs
- EventDescriptorCollection.cs
- PolyLineSegment.cs
- COM2EnumConverter.cs
- NetworkInterface.cs
- Choices.cs
- PropertyRef.cs
- UrlAuthorizationModule.cs
- PerformanceCounter.cs
- ControlBindingsConverter.cs
- DesignColumnCollection.cs
- SafeThreadHandle.cs
- ServiceModelInstallComponent.cs
- SystemPens.cs
- EpmContentSerializerBase.cs
- FtpCachePolicyElement.cs
- SchemaCollectionCompiler.cs
- MouseWheelEventArgs.cs
- TextElementAutomationPeer.cs
- MsmqTransportReceiveParameters.cs
- OracleString.cs
- SecurityUtils.cs
- EntityDataSourceViewSchema.cs
- HotSpot.cs
- XmlCodeExporter.cs
- DriveInfo.cs
- Transform.cs
- FormsAuthenticationTicket.cs
- Clipboard.cs
- StylusPointPropertyId.cs
- BufferedGraphics.cs
- HtmlInputSubmit.cs
- TextBoxAutoCompleteSourceConverter.cs
- LogicalCallContext.cs
- HMACSHA256.cs
- QuerySubExprEliminator.cs
- XXXInfos.cs
- BindStream.cs
- EventHandlersStore.cs
- ApplicationSecurityManager.cs
- XmlSchemaComplexContentExtension.cs
- RectangleConverter.cs
- EntityKey.cs
- TabItemAutomationPeer.cs
- ComponentResourceManager.cs
- FreezableOperations.cs
- While.cs
- BinaryMessageEncodingBindingElement.cs
- CircleHotSpot.cs
- LocatorGroup.cs
- UnsafeNativeMethods.cs
- BitmapFrame.cs
- GroupStyle.cs
- DisplayNameAttribute.cs
- MaskedTextBoxTextEditor.cs
- BitmapFrame.cs
- MeasureItemEvent.cs
- TraceUtility.cs
- MultiAsyncResult.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- IdentifierService.cs
- DataBindEngine.cs
- InvariantComparer.cs
- connectionpool.cs
- Script.cs
- SystemTcpConnection.cs
- MergeFailedEvent.cs
- BrowserDefinition.cs
- StorageEndPropertyMapping.cs
- BlockExpression.cs
- ParserStreamGeometryContext.cs