Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Input / InputProcessorProfilesLoader.cs / 1305600 / InputProcessorProfilesLoader.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: Creates ITfThreadMgr instances, the root object of the Text // Services Framework. // // History: // 07/30/2003 : yutakas - ported from dotnet tree. // //--------------------------------------------------------------------------- // PRESHARP: In order to avoid generating warnings about unkown message numbers and unknown pragmas. #pragma warning disable 1634, 1691 using System; using System.Runtime.InteropServices; using System.Security.Permissions; using System.Security; using System.Threading; using Microsoft.Win32; using System.Diagnostics; using MS.Win32; namespace System.Windows.Input { //----------------------------------------------------- // // InputProcessorProfilesLoader class // //----------------------------------------------------- ////// Loads an instance of the Text Services Framework. /// internal static class InputProcessorProfilesLoader { //------------------------------------------------------ // // Constructors // //----------------------------------------------------- #region Constructors #endregion Constructors //------------------------------------------------------ // // Internal Properties // //------------------------------------------------------ #region Internal Properties ////// Loads an instance of the Text Services Framework. /// ////// May return null if no text services are available. /// ////// Critical - calls unmanaged code to load the input profiles, returns unmanaged object /// [SecurityCritical] internal static UnsafeNativeMethods.ITfInputProcessorProfiles Load() { UnsafeNativeMethods.ITfInputProcessorProfiles obj; Debug.Assert(Thread.CurrentThread.GetApartmentState() == ApartmentState.STA, "Load called on MTA thread!"); // // Bug#1212202 // // Presharp warn this though UnsafeNativeMethods.TF_CreateInputProcessorProfiles() does not have // SetLastError attribute. // We think this is a false alarm of Presharp. // #pragma warning suppress 6523 if (UnsafeNativeMethods.TF_CreateInputProcessorProfiles(out obj) == NativeMethods.S_OK) { return obj; } return null; } #endregion Internal Properties } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: Creates ITfThreadMgr instances, the root object of the Text // Services Framework. // // History: // 07/30/2003 : yutakas - ported from dotnet tree. // //--------------------------------------------------------------------------- // PRESHARP: In order to avoid generating warnings about unkown message numbers and unknown pragmas. #pragma warning disable 1634, 1691 using System; using System.Runtime.InteropServices; using System.Security.Permissions; using System.Security; using System.Threading; using Microsoft.Win32; using System.Diagnostics; using MS.Win32; namespace System.Windows.Input { //----------------------------------------------------- // // InputProcessorProfilesLoader class // //----------------------------------------------------- ////// Loads an instance of the Text Services Framework. /// internal static class InputProcessorProfilesLoader { //------------------------------------------------------ // // Constructors // //----------------------------------------------------- #region Constructors #endregion Constructors //------------------------------------------------------ // // Internal Properties // //------------------------------------------------------ #region Internal Properties ////// Loads an instance of the Text Services Framework. /// ////// May return null if no text services are available. /// ////// Critical - calls unmanaged code to load the input profiles, returns unmanaged object /// [SecurityCritical] internal static UnsafeNativeMethods.ITfInputProcessorProfiles Load() { UnsafeNativeMethods.ITfInputProcessorProfiles obj; Debug.Assert(Thread.CurrentThread.GetApartmentState() == ApartmentState.STA, "Load called on MTA thread!"); // // Bug#1212202 // // Presharp warn this though UnsafeNativeMethods.TF_CreateInputProcessorProfiles() does not have // SetLastError attribute. // We think this is a false alarm of Presharp. // #pragma warning suppress 6523 if (UnsafeNativeMethods.TF_CreateInputProcessorProfiles(out obj) == NativeMethods.S_OK) { return obj; } return null; } #endregion Internal Properties } } // 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
- ZoomPercentageConverter.cs
- EventProviderBase.cs
- XmlDataLoader.cs
- TextClipboardData.cs
- DeviceContext2.cs
- CodeValidator.cs
- PropertyEmitter.cs
- WinFormsSpinner.cs
- ChildDocumentBlock.cs
- Size3D.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- ProgressBarHighlightConverter.cs
- SchemaConstraints.cs
- Item.cs
- SwitchAttribute.cs
- ApplicationBuildProvider.cs
- ProviderCollection.cs
- BaseDataBoundControlDesigner.cs
- OpenTypeMethods.cs
- TCPClient.cs
- TextFormatter.cs
- InkCollectionBehavior.cs
- _NegoStream.cs
- SessionParameter.cs
- RootProfilePropertySettingsCollection.cs
- EndpointFilterProvider.cs
- XmlFormatMapping.cs
- ToolboxItem.cs
- Brush.cs
- ColorContext.cs
- ClientFormsIdentity.cs
- TypeDescriptionProvider.cs
- ContextProperty.cs
- XpsS0ValidatingLoader.cs
- ExpressionParser.cs
- BypassElementCollection.cs
- DES.cs
- StyleCollection.cs
- StdRegProviderWrapper.cs
- PieceNameHelper.cs
- XmlNodeComparer.cs
- New.cs
- InternalTypeHelper.cs
- DataGridViewButtonColumn.cs
- AddInDeploymentState.cs
- DynamicDocumentPaginator.cs
- HitTestDrawingContextWalker.cs
- DataGridViewRowCollection.cs
- WindowsListViewItemStartMenu.cs
- ImportCatalogPart.cs
- IndentTextWriter.cs
- DbDeleteCommandTree.cs
- RoleManagerEventArgs.cs
- OTFRasterizer.cs
- TemplatedWizardStep.cs
- MsmqHostedTransportConfiguration.cs
- Hex.cs
- ZeroOpNode.cs
- SecUtil.cs
- ECDiffieHellmanCng.cs
- SimpleWebHandlerParser.cs
- ProgressBarAutomationPeer.cs
- XmlUnspecifiedAttribute.cs
- DynamicDocumentPaginator.cs
- Cursors.cs
- SubordinateTransaction.cs
- CompositeCollectionView.cs
- AstTree.cs
- HttpListenerPrefixCollection.cs
- ParagraphResult.cs
- DiscoveryDocumentSerializer.cs
- SqlDataSourceFilteringEventArgs.cs
- ArglessEventHandlerProxy.cs
- Label.cs
- CacheMode.cs
- EventlogProvider.cs
- MSAAEventDispatcher.cs
- ModuleConfigurationInfo.cs
- CodeCastExpression.cs
- TrustLevelCollection.cs
- MediaElement.cs
- StrokeNodeData.cs
- Substitution.cs
- ChtmlPageAdapter.cs
- ListDictionary.cs
- EdmComplexTypeAttribute.cs
- RNGCryptoServiceProvider.cs
- ProjectionPathSegment.cs
- SiteMapSection.cs
- BufferedGraphics.cs
- MaskedTextProvider.cs
- XsltCompileContext.cs
- ResolveNameEventArgs.cs
- ContextStack.cs
- AssemblyResourceLoader.cs
- DateTimeFormatInfo.cs
- CodeMemberEvent.cs
- ReaderWriterLockSlim.cs
- Stylus.cs
- SelectionRange.cs