Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------------------- // // 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
- Vector3D.cs
- WebConvert.cs
- BaseParser.cs
- DtdParser.cs
- MonthCalendar.cs
- InternalConfigRoot.cs
- TextDataBindingHandler.cs
- XslCompiledTransform.cs
- StackBuilderSink.cs
- WhileDesigner.cs
- FixedFindEngine.cs
- TextMessageEncoder.cs
- SmtpLoginAuthenticationModule.cs
- ObsoleteAttribute.cs
- TdsParserStateObject.cs
- CommandHelper.cs
- SerializationAttributes.cs
- FormViewCommandEventArgs.cs
- ObjectPersistData.cs
- DateTimeFormat.cs
- Freezable.cs
- ClientFormsIdentity.cs
- SqlConnection.cs
- DetailsViewRowCollection.cs
- GridViewColumnCollection.cs
- DataRow.cs
- DataGridColumnDropSeparator.cs
- AccessorTable.cs
- LinqDataSourceUpdateEventArgs.cs
- SchemaNotation.cs
- FixedFindEngine.cs
- SeekableReadStream.cs
- TypeReference.cs
- CompilerState.cs
- EntityDataSourceMemberPath.cs
- MetabaseSettingsIis7.cs
- CodeBinaryOperatorExpression.cs
- Roles.cs
- FontSizeConverter.cs
- AsyncCompletedEventArgs.cs
- TakeQueryOptionExpression.cs
- NamespaceCollection.cs
- HtmlTextArea.cs
- CollectionChangeEventArgs.cs
- ViewValidator.cs
- RequestedSignatureDialog.cs
- DefaultClaimSet.cs
- XmlQueryCardinality.cs
- TypeConverterAttribute.cs
- ChannelManagerService.cs
- EntityDataSourceChangingEventArgs.cs
- Propagator.Evaluator.cs
- COAUTHINFO.cs
- WebPartEditorOkVerb.cs
- ObjectDisposedException.cs
- Size.cs
- HtmlInputImage.cs
- RepeaterItemCollection.cs
- DataGridViewRowPostPaintEventArgs.cs
- XmlQueryOutput.cs
- OdbcEnvironment.cs
- XhtmlTextWriter.cs
- ScaleTransform.cs
- DataControlPagerLinkButton.cs
- DragEvent.cs
- DummyDataSource.cs
- OperandQuery.cs
- XpsFontSubsetter.cs
- TextEditor.cs
- TailPinnedEventArgs.cs
- XmlDataSource.cs
- WsdlBuildProvider.cs
- FileClassifier.cs
- ProfileSettings.cs
- HtmlMeta.cs
- DynamicRouteExpression.cs
- ISAPIApplicationHost.cs
- DSACryptoServiceProvider.cs
- EntryWrittenEventArgs.cs
- XmlBinaryReaderSession.cs
- DocumentViewerBaseAutomationPeer.cs
- DependencyObjectCodeDomSerializer.cs
- SqlNodeTypeOperators.cs
- WebServiceHandler.cs
- translator.cs
- MSG.cs
- RegexFCD.cs
- WebSysDefaultValueAttribute.cs
- InputProcessorProfiles.cs
- BooleanToVisibilityConverter.cs
- ObjectSecurity.cs
- BaseTypeViewSchema.cs
- ProcessThread.cs
- Filter.cs
- SimpleLine.cs
- ServiceParser.cs
- X509CertificateCollection.cs
- MultiView.cs
- InvalidEnumArgumentException.cs
- StylusPlugInCollection.cs