Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / System / Windows / InterOp / CursorInteropHelper.cs / 1 / 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 MS.Internal.PresentationCore; // 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 /// [FriendAccessAllowed] [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. //---------------------------------------------------------------------------- // // 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 MS.Internal.PresentationCore; // 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 /// [FriendAccessAllowed] [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
- LazyTextWriterCreator.cs
- CustomMenuItemCollection.cs
- RuntimeVariablesExpression.cs
- ZoneMembershipCondition.cs
- DataPointer.cs
- XmlUnspecifiedAttribute.cs
- NumberFunctions.cs
- util.cs
- DataChangedEventManager.cs
- SystemResourceHost.cs
- DataConnectionHelper.cs
- TableItemStyle.cs
- WebPartHelpVerb.cs
- WebPartConnectionsCancelEventArgs.cs
- LocalValueEnumerator.cs
- BulletedListEventArgs.cs
- Publisher.cs
- DocumentPageView.cs
- KnownBoxes.cs
- QilIterator.cs
- DefaultProfileManager.cs
- XmlText.cs
- GetPageCompletedEventArgs.cs
- WebUtil.cs
- ExportOptions.cs
- ContentDefinition.cs
- UidPropertyAttribute.cs
- AstNode.cs
- QueueProcessor.cs
- DtrList.cs
- InsufficientExecutionStackException.cs
- AttributeTableBuilder.cs
- WorkflowInstanceProvider.cs
- RtfToken.cs
- QueryableDataSource.cs
- KeyValuePairs.cs
- SHA384Managed.cs
- RuntimeConfigLKG.cs
- FormViewInsertedEventArgs.cs
- SeparatorAutomationPeer.cs
- NativeMethods.cs
- SqlPersonalizationProvider.cs
- ResXResourceWriter.cs
- MouseBinding.cs
- FixedSOMTableRow.cs
- DateTimeUtil.cs
- DataControlFieldCell.cs
- SchemaManager.cs
- SuppressMessageAttribute.cs
- TreeViewCancelEvent.cs
- InvalidCastException.cs
- BooleanFunctions.cs
- BaseTemplateBuildProvider.cs
- NetCodeGroup.cs
- LinqDataSourceDeleteEventArgs.cs
- ComboBoxRenderer.cs
- XmlSchemaImporter.cs
- PrimitiveXmlSerializers.cs
- AppDomainManager.cs
- DateTimeSerializationSection.cs
- XmlRawWriterWrapper.cs
- CodeCompileUnit.cs
- Setter.cs
- EncoderNLS.cs
- WebPartEditorCancelVerb.cs
- WebConfigurationManager.cs
- TableLayoutPanelBehavior.cs
- TreeNodeStyleCollectionEditor.cs
- EncryptedData.cs
- PersistNameAttribute.cs
- TrackingExtract.cs
- SystemMulticastIPAddressInformation.cs
- BitStack.cs
- _HeaderInfoTable.cs
- DomNameTable.cs
- AnnouncementInnerClient11.cs
- XmlSchemaSimpleTypeUnion.cs
- DrawToolTipEventArgs.cs
- IPAddressCollection.cs
- ReferencedCollectionType.cs
- DocumentGridContextMenu.cs
- SystemColorTracker.cs
- XPathDocumentIterator.cs
- GenericIdentity.cs
- Deserializer.cs
- ImpersonationContext.cs
- DataColumnMapping.cs
- xmlsaver.cs
- ProgressBar.cs
- RowToFieldTransformer.cs
- MetadataCache.cs
- EmulateRecognizeCompletedEventArgs.cs
- SiteOfOriginPart.cs
- Point3DCollection.cs
- FixedBufferAttribute.cs
- ClientSideProviderDescription.cs
- SubstitutionList.cs
- NotImplementedException.cs
- RectIndependentAnimationStorage.cs
- HMACSHA1.cs