Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AutomationAttributeInfo.cs
- ReferenceConverter.cs
- _ProxyChain.cs
- AutomationPatternInfo.cs
- DigestComparer.cs
- dbdatarecord.cs
- PrefixQName.cs
- QueryOutputWriter.cs
- PackageDigitalSignatureManager.cs
- ConcatQueryOperator.cs
- Currency.cs
- GeneralTransform.cs
- DataTemplate.cs
- XslNumber.cs
- TraceListeners.cs
- RTLAwareMessageBox.cs
- DetailsViewPagerRow.cs
- TextDecorations.cs
- RtfToken.cs
- InputLanguageCollection.cs
- MemberInitExpression.cs
- UserControl.cs
- KeyPullup.cs
- IntegerValidator.cs
- PTProvider.cs
- MailSettingsSection.cs
- MobileRedirect.cs
- PrintDialog.cs
- ListDictionaryInternal.cs
- ListViewGroupConverter.cs
- SafeRightsManagementQueryHandle.cs
- GenerateTemporaryTargetAssembly.cs
- TypedDataSetSchemaImporterExtension.cs
- CultureSpecificStringDictionary.cs
- RemoteWebConfigurationHost.cs
- EntityDesignerUtils.cs
- ProcessProtocolHandler.cs
- PipeException.cs
- _AutoWebProxyScriptHelper.cs
- WebSysDescriptionAttribute.cs
- ProgressChangedEventArgs.cs
- DBParameter.cs
- Action.cs
- DataBinding.cs
- PerformanceCounterPermissionEntryCollection.cs
- CompleteWizardStep.cs
- TagMapCollection.cs
- SectionVisual.cs
- Certificate.cs
- WebPartExportVerb.cs
- ProtectedConfigurationProviderCollection.cs
- GridViewCancelEditEventArgs.cs
- KeyFrames.cs
- MetadataCollection.cs
- DebugView.cs
- CatalogPartCollection.cs
- SignerInfo.cs
- SQLInt64.cs
- InlineObject.cs
- Control.cs
- UnsafeNativeMethods.cs
- TreeSet.cs
- DesignTimeSiteMapProvider.cs
- GridViewUpdateEventArgs.cs
- Descriptor.cs
- LogPolicy.cs
- AsymmetricAlgorithm.cs
- TreeWalker.cs
- CustomExpressionEventArgs.cs
- AsyncStreamReader.cs
- filewebresponse.cs
- XmlSerializerNamespaces.cs
- ImageAttributes.cs
- RegularExpressionValidator.cs
- EntityTemplateUserControl.cs
- GridLength.cs
- XmlMtomReader.cs
- OrderedDictionary.cs
- OdbcStatementHandle.cs
- UpdateCompiler.cs
- ControlPaint.cs
- HtmlInputControl.cs
- LockRecoveryTask.cs
- GeneratedCodeAttribute.cs
- KeyTimeConverter.cs
- odbcmetadatacollectionnames.cs
- PrivilegeNotHeldException.cs
- ChangeNode.cs
- ApplicationProxyInternal.cs
- ScrollChangedEventArgs.cs
- DiscoveryOperationContextExtension.cs
- SQLDateTimeStorage.cs
- ProvidersHelper.cs
- SingleObjectCollection.cs
- FormsAuthenticationModule.cs
- ErrorWebPart.cs
- TimeoutValidationAttribute.cs
- RadioButton.cs
- AsyncPostBackTrigger.cs
- TypeConverter.cs