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
- HexParser.cs
- GeometryValueSerializer.cs
- WindowsServiceCredential.cs
- StorageComplexTypeMapping.cs
- DashStyle.cs
- TextEditorTyping.cs
- DoubleLinkList.cs
- ConfigUtil.cs
- TagPrefixAttribute.cs
- WebSysDisplayNameAttribute.cs
- Directory.cs
- MobileControlBuilder.cs
- AndCondition.cs
- Stacktrace.cs
- Size3DValueSerializer.cs
- TextLine.cs
- InputScopeAttribute.cs
- UpdateProgress.cs
- ToolStripButton.cs
- TriState.cs
- SmtpTransport.cs
- DictionarySurrogate.cs
- WmlListAdapter.cs
- ClosableStream.cs
- DataErrorValidationRule.cs
- ItemType.cs
- SafeTokenHandle.cs
- DrawingImage.cs
- StringFreezingAttribute.cs
- EasingQuaternionKeyFrame.cs
- ResourceSetExpression.cs
- FileSystemEnumerable.cs
- TouchesOverProperty.cs
- FormatterServices.cs
- XmlDocumentType.cs
- NotifyParentPropertyAttribute.cs
- ConfigurationLockCollection.cs
- TypefaceMap.cs
- VirtualPathProvider.cs
- SymDocumentType.cs
- ServerIdentity.cs
- Timeline.cs
- DbSetClause.cs
- HttpResponseBase.cs
- ObjectDataSourceDesigner.cs
- GcHandle.cs
- TextProviderWrapper.cs
- PathNode.cs
- ServiceModelDictionary.cs
- EncryptionUtility.cs
- TypedElement.cs
- CachedBitmap.cs
- BatchWriter.cs
- GridViewDeleteEventArgs.cs
- XmlDataCollection.cs
- BindingManagerDataErrorEventArgs.cs
- AddInControllerImpl.cs
- XmlSerializerNamespaces.cs
- HWStack.cs
- StylusPointCollection.cs
- FeatureSupport.cs
- BuildManagerHost.cs
- KnownIds.cs
- TextTrailingWordEllipsis.cs
- DurableInstanceProvider.cs
- UpdateCommand.cs
- DynamicPropertyHolder.cs
- ColorTranslator.cs
- DecimalAnimationUsingKeyFrames.cs
- HtmlCommandAdapter.cs
- TextSerializer.cs
- PathFigureCollection.cs
- SchemaElementLookUpTableEnumerator.cs
- HotSpotCollection.cs
- ObjectToIdCache.cs
- HttpRequestCacheValidator.cs
- WorkingDirectoryEditor.cs
- smtppermission.cs
- RemoteCryptoDecryptRequest.cs
- WebPartDescriptionCollection.cs
- FontCacheUtil.cs
- ServiceBusyException.cs
- BuildProviderCollection.cs
- MissingSatelliteAssemblyException.cs
- GraphicsPath.cs
- OrderingInfo.cs
- RepeaterDesigner.cs
- DoubleAnimationUsingKeyFrames.cs
- ValidationContext.cs
- ServiceNameCollection.cs
- StatusBarAutomationPeer.cs
- KeyEventArgs.cs
- UriScheme.cs
- Annotation.cs
- ping.cs
- ConfigurationSectionGroupCollection.cs
- MailWriter.cs
- XPathMultyIterator.cs
- TraceRecord.cs
- GeneralTransform3D.cs