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
- PerformanceCounterLib.cs
- ListQueryResults.cs
- PrincipalPermission.cs
- ProcessHostFactoryHelper.cs
- EndpointAddressMessageFilter.cs
- FacetEnabledSchemaElement.cs
- FileDialogPermission.cs
- SelectedDatesCollection.cs
- SystemGatewayIPAddressInformation.cs
- wgx_exports.cs
- TransformedBitmap.cs
- AutomationPatternInfo.cs
- EmbossBitmapEffect.cs
- PartitionerQueryOperator.cs
- CompiledQuery.cs
- SqlConnectionStringBuilder.cs
- ObjectViewEntityCollectionData.cs
- FormsAuthenticationUser.cs
- DbMetaDataFactory.cs
- CustomTrackingRecord.cs
- SliderAutomationPeer.cs
- BindableTemplateBuilder.cs
- UnSafeCharBuffer.cs
- TableStyle.cs
- securestring.cs
- StringUtil.cs
- ToolStripSplitStackLayout.cs
- WaitForChangedResult.cs
- WinEventHandler.cs
- PhoneCallDesigner.cs
- DataGridViewTextBoxEditingControl.cs
- EncryptedPackage.cs
- HuffModule.cs
- CaretElement.cs
- SvcMapFile.cs
- TableCellAutomationPeer.cs
- HandleRef.cs
- ListViewTableRow.cs
- FontDialog.cs
- ResourceDisplayNameAttribute.cs
- WebUtil.cs
- DrawingContextWalker.cs
- ErrorWebPart.cs
- SessionPageStateSection.cs
- SmtpException.cs
- PublisherIdentityPermission.cs
- MetadataAssemblyHelper.cs
- ActivityInfo.cs
- WsdlImporter.cs
- EntityClientCacheEntry.cs
- XmlCharacterData.cs
- FixedSOMContainer.cs
- DataColumnMapping.cs
- ObjectAnimationUsingKeyFrames.cs
- _ListenerRequestStream.cs
- EventSinkHelperWriter.cs
- XpsPartBase.cs
- XmlIlGenerator.cs
- ExportOptions.cs
- DbgCompiler.cs
- CompositeCollectionView.cs
- TimeSpan.cs
- OleAutBinder.cs
- QilList.cs
- templategroup.cs
- MailSettingsSection.cs
- BlockCollection.cs
- DataGridViewRowPrePaintEventArgs.cs
- ControlParameter.cs
- XmlSerializerNamespaces.cs
- X509Extension.cs
- StaticFileHandler.cs
- ResourcesGenerator.cs
- SrgsSemanticInterpretationTag.cs
- MobileTextWriter.cs
- SchemaTypeEmitter.cs
- ValueConversionAttribute.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- HttpRawResponse.cs
- XamlGridLengthSerializer.cs
- QilNode.cs
- PostBackTrigger.cs
- MemberRestriction.cs
- DataBindingCollection.cs
- TraceRecord.cs
- LogExtent.cs
- Translator.cs
- PlaceHolder.cs
- DbConnectionFactory.cs
- ITreeGenerator.cs
- CacheMode.cs
- SimpleWorkerRequest.cs
- ToolStripCustomTypeDescriptor.cs
- ValidationError.cs
- safelink.cs
- IntegerValidatorAttribute.cs
- NativeObjectSecurity.cs
- Paragraph.cs
- CallbackException.cs
- InvokeBinder.cs