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
- TextWriterTraceListener.cs
- Subordinate.cs
- WindowCollection.cs
- WebBaseEventKeyComparer.cs
- TimelineGroup.cs
- WsatServiceAddress.cs
- EmptyEnumerable.cs
- LinqToSqlWrapper.cs
- _HeaderInfoTable.cs
- PromptStyle.cs
- GridViewColumnCollection.cs
- WindowsAltTab.cs
- PathFigure.cs
- ClientProxyGenerator.cs
- HttpListenerContext.cs
- Viewport3DAutomationPeer.cs
- DataGridViewToolTip.cs
- AccessibleObject.cs
- WebPartRestoreVerb.cs
- DynamicDiscoveryDocument.cs
- MemoryMappedViewStream.cs
- BaseTemplateParser.cs
- StrokeRenderer.cs
- ClientOperationFormatterProvider.cs
- ModelPropertyImpl.cs
- Stylesheet.cs
- VisualTreeUtils.cs
- BamlLocalizableResource.cs
- SQLGuid.cs
- HttpPostedFileBase.cs
- UIElementIsland.cs
- SequenceQuery.cs
- AnnotationHelper.cs
- Stylesheet.cs
- TempFiles.cs
- LicenseProviderAttribute.cs
- WebPartManager.cs
- ImageDesigner.cs
- XsltCompileContext.cs
- FrameworkName.cs
- panel.cs
- XsdCachingReader.cs
- ThreadAbortException.cs
- OrderToken.cs
- DataBindEngine.cs
- HtmlWindow.cs
- XmlEncodedRawTextWriter.cs
- XhtmlTextWriter.cs
- FunctionUpdateCommand.cs
- MatrixAnimationBase.cs
- GenericEnumConverter.cs
- EditorZone.cs
- UnknownBitmapEncoder.cs
- StylusDevice.cs
- ISSmlParser.cs
- TextTreeDeleteContentUndoUnit.cs
- RowType.cs
- _CookieModule.cs
- BuildProvidersCompiler.cs
- SocketInformation.cs
- GenericWebPart.cs
- DictionaryEntry.cs
- HatchBrush.cs
- DataServiceStreamResponse.cs
- Oci.cs
- EpmSyndicationContentDeSerializer.cs
- PeerChannelFactory.cs
- TextEditor.cs
- BooleanFunctions.cs
- WindowsContainer.cs
- Ray3DHitTestResult.cs
- webeventbuffer.cs
- TiffBitmapEncoder.cs
- ObjectConverter.cs
- TriggerActionCollection.cs
- LayoutEditorPart.cs
- OdbcConnectionOpen.cs
- RtfControls.cs
- SymmetricSecurityProtocol.cs
- XmlWriterSettings.cs
- Matrix3D.cs
- ReferenceConverter.cs
- Vector3DIndependentAnimationStorage.cs
- ProcessHostConfigUtils.cs
- XmlWhitespace.cs
- ScrollProviderWrapper.cs
- ToolStripProgressBar.cs
- CodeBinaryOperatorExpression.cs
- InkCollectionBehavior.cs
- ISFTagAndGuidCache.cs
- DayRenderEvent.cs
- ProtocolsConfigurationHandler.cs
- AtomParser.cs
- PeerResolverMode.cs
- COM2PropertyPageUITypeConverter.cs
- WindowsGrip.cs
- ComboBoxItem.cs
- BaseValidatorDesigner.cs
- Membership.cs
- ContentElement.cs