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
- GridEntryCollection.cs
- DataControlButton.cs
- DiagnosticTrace.cs
- UseManagedPresentationBindingElementImporter.cs
- ReadContentAsBinaryHelper.cs
- EmulateRecognizeCompletedEventArgs.cs
- DurableInstanceContextProvider.cs
- CredentialCache.cs
- ContentHostHelper.cs
- Int64AnimationUsingKeyFrames.cs
- TableLayout.cs
- HtmlContainerControl.cs
- _ListenerResponseStream.cs
- ActivationArguments.cs
- SchemaManager.cs
- StickyNote.cs
- BeginStoryboard.cs
- ContainerUtilities.cs
- CookieProtection.cs
- QuerySafeNavigator.cs
- GridProviderWrapper.cs
- FamilyMapCollection.cs
- ExecutorLocksHeldException.cs
- UnhandledExceptionEventArgs.cs
- NameObjectCollectionBase.cs
- HMACSHA1.cs
- DbParameterHelper.cs
- TimerExtension.cs
- XmlParserContext.cs
- PackageFilter.cs
- EntityTemplateUserControl.cs
- HttpHandlerAction.cs
- InvalidFilterCriteriaException.cs
- MenuCommands.cs
- NameValueSectionHandler.cs
- DispatcherObject.cs
- RubberbandSelector.cs
- ConstNode.cs
- Types.cs
- MethodToken.cs
- SchemaImporterExtension.cs
- Stackframe.cs
- UpdatePanelTriggerCollection.cs
- PageHandlerFactory.cs
- mda.cs
- Double.cs
- SingleObjectCollection.cs
- SqlClientWrapperSmiStream.cs
- linebase.cs
- LabelDesigner.cs
- XamlValidatingReader.cs
- ArrangedElement.cs
- ToggleButton.cs
- IPipelineRuntime.cs
- StrongNameUtility.cs
- LabelTarget.cs
- XmlReader.cs
- Parsers.cs
- SoapCodeExporter.cs
- mediaeventshelper.cs
- ExtensionDataObject.cs
- GridViewCommandEventArgs.cs
- ScrollChangedEventArgs.cs
- ServiceDescriptionImporter.cs
- Attributes.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- MachineSettingsSection.cs
- BuildProviderUtils.cs
- OleDbEnumerator.cs
- XmlSchemaProviderAttribute.cs
- CodePageEncoding.cs
- HeaderCollection.cs
- TdsParserStaticMethods.cs
- XAMLParseException.cs
- ArgumentFixer.cs
- AppDomainShutdownMonitor.cs
- StyleCollectionEditor.cs
- ContentElement.cs
- FreezableCollection.cs
- PeerMessageDispatcher.cs
- _UriTypeConverter.cs
- WebZone.cs
- AssemblyAssociatedContentFileAttribute.cs
- AppDomainFactory.cs
- IdentitySection.cs
- ComPersistableTypeElementCollection.cs
- CatalogZone.cs
- ValidationSummary.cs
- KnownBoxes.cs
- AuthorizationRuleCollection.cs
- StdValidatorsAndConverters.cs
- DataControlExtensions.cs
- ResourcePermissionBaseEntry.cs
- HttpHandlersSection.cs
- WeakEventTable.cs
- NullRuntimeConfig.cs
- RawStylusSystemGestureInputReport.cs
- SqlMetaData.cs
- PolicyManager.cs
- SoapAttributeOverrides.cs