Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- XmlAtomErrorReader.cs
- DataObjectFieldAttribute.cs
- PersonalizationEntry.cs
- CodeObject.cs
- XmlAggregates.cs
- TimeoutValidationAttribute.cs
- _UriTypeConverter.cs
- IsolatedStorageException.cs
- Int32AnimationBase.cs
- WebChannelFactory.cs
- InheritanceService.cs
- ThrowHelper.cs
- AnimationStorage.cs
- ImageInfo.cs
- HierarchicalDataBoundControlAdapter.cs
- DataSourceSelectArguments.cs
- TransactionTraceIdentifier.cs
- BitmapMetadataBlob.cs
- RewritingPass.cs
- WeakHashtable.cs
- DataKeyArray.cs
- XmlSerializationWriter.cs
- DigestComparer.cs
- JsonEncodingStreamWrapper.cs
- XmlMapping.cs
- ToolStripItemRenderEventArgs.cs
- CreateUserWizard.cs
- SqlDataSource.cs
- AnnotationService.cs
- SHA1CryptoServiceProvider.cs
- SafeNativeMethods.cs
- AutomationPropertyInfo.cs
- OracleParameterBinding.cs
- HMACSHA512.cs
- ButtonAutomationPeer.cs
- StringInfo.cs
- IIS7UserPrincipal.cs
- SecurityContextSecurityTokenAuthenticator.cs
- GridViewRow.cs
- AttachedProperty.cs
- SelectedDatesCollection.cs
- DriveInfo.cs
- ParentQuery.cs
- XmlSchemaSimpleType.cs
- ImmComposition.cs
- ChannelBinding.cs
- ReversePositionQuery.cs
- EntitySqlQueryCacheEntry.cs
- XmlSerializer.cs
- MenuItem.cs
- Soap12ProtocolReflector.cs
- XmlIlVisitor.cs
- StringValidator.cs
- DbDataRecord.cs
- HtmlTableCellCollection.cs
- X509Certificate.cs
- MessageContractExporter.cs
- Grant.cs
- OdbcConnection.cs
- Transform3DGroup.cs
- NameValueCollection.cs
- ConvertTextFrag.cs
- WebPartDisplayModeCollection.cs
- AstTree.cs
- FieldMetadata.cs
- Symbol.cs
- HttpWriter.cs
- DoubleKeyFrameCollection.cs
- ObjectQueryExecutionPlan.cs
- ToolStripPanelRenderEventArgs.cs
- KeyedCollection.cs
- CqlBlock.cs
- RadioButton.cs
- DataGridViewRow.cs
- ObjectListItemCollection.cs
- RegexReplacement.cs
- IconHelper.cs
- HelpKeywordAttribute.cs
- HttpWrapper.cs
- FeatureSupport.cs
- BulletedListEventArgs.cs
- MSAAWinEventWrap.cs
- Vector.cs
- UserInitiatedNavigationPermission.cs
- ContextQuery.cs
- CompiledRegexRunnerFactory.cs
- followingquery.cs
- FloaterBaseParagraph.cs
- ReadOnlyAttribute.cs
- CounterSampleCalculator.cs
- WebColorConverter.cs
- Tag.cs
- Interlocked.cs
- __ConsoleStream.cs
- DataMemberConverter.cs
- AsymmetricSignatureFormatter.cs
- DataGridState.cs
- ObjectView.cs
- GeneralTransformCollection.cs
- ToolStripContentPanel.cs