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
- BitStack.cs
- _SpnDictionary.cs
- ToolStripOverflow.cs
- DataColumnMapping.cs
- DivideByZeroException.cs
- SudsParser.cs
- GifBitmapEncoder.cs
- BackgroundWorker.cs
- PasswordDeriveBytes.cs
- Geometry3D.cs
- TextTreeUndoUnit.cs
- COM2PictureConverter.cs
- FamilyTypefaceCollection.cs
- Constants.cs
- TextOnlyOutput.cs
- PersonalizationProviderHelper.cs
- DatePickerAutomationPeer.cs
- Line.cs
- ManipulationInertiaStartingEventArgs.cs
- PolicyLevel.cs
- BitmapEffectDrawing.cs
- DbConvert.cs
- StaticSiteMapProvider.cs
- PolyQuadraticBezierSegment.cs
- SpellerStatusTable.cs
- TripleDESCryptoServiceProvider.cs
- QueryAsyncResult.cs
- Rule.cs
- XmlSchemaCollection.cs
- MembershipSection.cs
- ReverseInheritProperty.cs
- NavigationProgressEventArgs.cs
- TreeNode.cs
- ArraySortHelper.cs
- PrimitiveXmlSerializers.cs
- ObjectTag.cs
- WebFaultException.cs
- ComponentEditorPage.cs
- EntityStoreSchemaFilterEntry.cs
- _ProxyChain.cs
- AnonymousIdentificationModule.cs
- DefaultEventAttribute.cs
- EntityDataSourceDesignerHelper.cs
- SmtpMail.cs
- DataViewManagerListItemTypeDescriptor.cs
- MaxMessageSizeStream.cs
- ContentValidator.cs
- EditingCommands.cs
- ThreadExceptionEvent.cs
- Int64Storage.cs
- ActivityUtilities.cs
- ResolveCriteria.cs
- ActivityDesignerAccessibleObject.cs
- OdbcConnectionStringbuilder.cs
- ListBoxChrome.cs
- ActivityInstanceReference.cs
- ViewGenerator.cs
- _HeaderInfoTable.cs
- DiagnosticTraceSource.cs
- ControlBuilderAttribute.cs
- OleCmdHelper.cs
- CallContext.cs
- RadioButtonPopupAdapter.cs
- QilCloneVisitor.cs
- XmlSchemaImport.cs
- TimeManager.cs
- LowerCaseStringConverter.cs
- SqlInfoMessageEvent.cs
- GridViewUpdateEventArgs.cs
- PageAsyncTask.cs
- DecimalStorage.cs
- RegistryKey.cs
- RichTextBoxConstants.cs
- FilterElement.cs
- AvTraceDetails.cs
- CqlParser.cs
- HideDisabledControlAdapter.cs
- BooleanExpr.cs
- CodeCompileUnit.cs
- TransformGroup.cs
- UIPropertyMetadata.cs
- SmtpAuthenticationManager.cs
- WindowsSysHeader.cs
- XmlDictionary.cs
- COM2Enum.cs
- DefaultParameterValueAttribute.cs
- Process.cs
- AutomationPropertyInfo.cs
- safesecurityhelperavalon.cs
- StyleXamlTreeBuilder.cs
- _CookieModule.cs
- sqlinternaltransaction.cs
- CodeNamespaceImportCollection.cs
- URLIdentityPermission.cs
- SqlDataAdapter.cs
- PenCursorManager.cs
- XmlSchemaSimpleType.cs
- TextEditorDragDrop.cs
- ClientBuildManagerCallback.cs
- TableLayoutPanelCodeDomSerializer.cs