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
- CommonBehaviorsSection.cs
- BaseUriHelper.cs
- X509RawDataKeyIdentifierClause.cs
- SupportingTokenChannel.cs
- RowsCopiedEventArgs.cs
- GridLengthConverter.cs
- SchemaElementLookUpTable.cs
- ToggleButtonAutomationPeer.cs
- ProtectedProviderSettings.cs
- IPipelineRuntime.cs
- BasePattern.cs
- AttachInfo.cs
- UTF32Encoding.cs
- TableHeaderCell.cs
- MulticastOption.cs
- MenuEventArgs.cs
- ToolBarTray.cs
- RowToParametersTransformer.cs
- SelfIssuedTokenFactoryCredential.cs
- FlowDocumentView.cs
- TextDecorationCollection.cs
- SimpleHandlerFactory.cs
- DataSourceView.cs
- WsdlInspector.cs
- HttpModuleAction.cs
- DashStyle.cs
- SimpleMailWebEventProvider.cs
- CreateUserWizardStep.cs
- TypeUsageBuilder.cs
- XmlWriterDelegator.cs
- TreeViewItem.cs
- recordstatefactory.cs
- CommandID.cs
- BreakSafeBase.cs
- DataGridViewColumnHeaderCell.cs
- WebSysDisplayNameAttribute.cs
- ExpressionBindingCollection.cs
- PackWebResponse.cs
- unsafenativemethodstextservices.cs
- dataobject.cs
- WMICapabilities.cs
- MissingMethodException.cs
- NativeObjectSecurity.cs
- ArraySortHelper.cs
- RuntimeConfigLKG.cs
- ImageMap.cs
- QilTargetType.cs
- Vertex.cs
- BitmapInitialize.cs
- ComponentEditorPage.cs
- GeneralTransform3DGroup.cs
- MiniMapControl.xaml.cs
- StreamWriter.cs
- RectAnimationUsingKeyFrames.cs
- CellParagraph.cs
- BindableTemplateBuilder.cs
- EqualityArray.cs
- EventLogPermissionAttribute.cs
- ImmutableCollection.cs
- XmlSchemaType.cs
- AspNetSynchronizationContext.cs
- SmiMetaData.cs
- HatchBrush.cs
- ProbeMatchesMessageCD1.cs
- FunctionNode.cs
- ToolZone.cs
- TemplatedWizardStep.cs
- WebBrowserPermission.cs
- DesignerDataStoredProcedure.cs
- CqlErrorHelper.cs
- EntitySqlQueryCacheEntry.cs
- AudioBase.cs
- ScriptManager.cs
- BevelBitmapEffect.cs
- Int16Animation.cs
- EntityConnection.cs
- XmlWrappingReader.cs
- PeerInvitationResponse.cs
- DynamicResourceExtension.cs
- WebBrowserContainer.cs
- PasswordRecovery.cs
- TextElementEnumerator.cs
- EventEntry.cs
- CultureSpecificStringDictionary.cs
- ExpandCollapsePattern.cs
- RouteValueDictionary.cs
- SupportingTokenListenerFactory.cs
- StyleCollectionEditor.cs
- XsltSettings.cs
- UrlPropertyAttribute.cs
- FileUtil.cs
- _WebProxyDataBuilder.cs
- SafeUserTokenHandle.cs
- SourceElementsCollection.cs
- Matrix3DConverter.cs
- MDIControlStrip.cs
- HtmlInputSubmit.cs
- DateTimeConstantAttribute.cs
- SystemTcpConnection.cs
- ModulesEntry.cs