Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / 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 [....] 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
- ShapingWorkspace.cs
- InProcStateClientManager.cs
- UpDownBaseDesigner.cs
- InputLanguageCollection.cs
- DataListItem.cs
- ReadOnlyAttribute.cs
- FixedDocumentSequencePaginator.cs
- WebPermission.cs
- UnsafeNativeMethods.cs
- RoleBoolean.cs
- CompiledELinqQueryState.cs
- Container.cs
- TickBar.cs
- ResolveNameEventArgs.cs
- PriorityRange.cs
- CheckBox.cs
- ComponentChangedEvent.cs
- UxThemeWrapper.cs
- PerformanceCounterCategory.cs
- DefaultPropertyAttribute.cs
- SelectiveScrollingGrid.cs
- EntityChangedParams.cs
- BindableTemplateBuilder.cs
- Sql8ConformanceChecker.cs
- ValueProviderWrapper.cs
- UiaCoreTypesApi.cs
- Transform3DGroup.cs
- DispatcherOperation.cs
- RadioButtonStandardAdapter.cs
- RecognizerBase.cs
- ExpressionPrefixAttribute.cs
- XmlConvert.cs
- RegistrySecurity.cs
- InstanceNotFoundException.cs
- EmulateRecognizeCompletedEventArgs.cs
- SecUtil.cs
- ElementUtil.cs
- XmlNamespaceMapping.cs
- ConfigurationManagerHelper.cs
- AssemblyBuilderData.cs
- FlowDocument.cs
- RuleSettings.cs
- Region.cs
- DecimalStorage.cs
- OpenTypeLayoutCache.cs
- DelayDesigner.cs
- wgx_sdk_version.cs
- TransformGroup.cs
- RoutingConfiguration.cs
- KeyboardDevice.cs
- WeakReference.cs
- StretchValidation.cs
- XmlResolver.cs
- LicenseManager.cs
- ExtractorMetadata.cs
- FrameworkPropertyMetadata.cs
- SymbolEqualComparer.cs
- Point3DConverter.cs
- MemberDescriptor.cs
- Label.cs
- XmlLanguageConverter.cs
- MessageSecurityOverTcpElement.cs
- PTManager.cs
- ContourSegment.cs
- MobileContainerDesigner.cs
- thaishape.cs
- ActiveXSite.cs
- NavigationCommands.cs
- CheckoutException.cs
- ConsumerConnectionPointCollection.cs
- AssemblyNameUtility.cs
- CodeExpressionStatement.cs
- CombinedTcpChannel.cs
- ResourceExpressionEditor.cs
- ExpressionEvaluator.cs
- TraceUtility.cs
- WSHttpSecurity.cs
- Range.cs
- FormViewActionList.cs
- XmlSchemaAll.cs
- DefaultAuthorizationContext.cs
- SecurityDocument.cs
- SplitterPanel.cs
- sqlser.cs
- ReaderWriterLockWrapper.cs
- COM2ExtendedTypeConverter.cs
- FileDialog_Vista.cs
- BaseTemplateParser.cs
- WhitespaceReader.cs
- ConfigurationLocation.cs
- LicenseContext.cs
- CapabilitiesState.cs
- GeneralTransformGroup.cs
- PropertyPathWorker.cs
- CachedTypeface.cs
- BitmapEffectState.cs
- PipelineModuleStepContainer.cs
- SizeAnimationClockResource.cs
- CompModSwitches.cs
- HttpFileCollection.cs