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
- AcceleratedTokenAuthenticator.cs
- DataView.cs
- Pair.cs
- Quaternion.cs
- ArraySortHelper.cs
- PrinterResolution.cs
- SocketConnection.cs
- MarkupCompiler.cs
- WebPartMovingEventArgs.cs
- EventMappingSettingsCollection.cs
- counter.cs
- mongolianshape.cs
- PathTooLongException.cs
- AtomMaterializer.cs
- _OverlappedAsyncResult.cs
- Utils.cs
- XmlSchemaValidationException.cs
- LicenseException.cs
- TableHeaderCell.cs
- CacheSection.cs
- ResourceDescriptionAttribute.cs
- ColorConvertedBitmapExtension.cs
- ValidateNames.cs
- TimeZone.cs
- CompilerTypeWithParams.cs
- WpfWebRequestHelper.cs
- Internal.cs
- DownloadProgressEventArgs.cs
- EntityContainer.cs
- ValidationErrorEventArgs.cs
- ForEachAction.cs
- SimpleWorkerRequest.cs
- SamlAuthorizationDecisionStatement.cs
- PropagationProtocolsTracing.cs
- WindowsScroll.cs
- DocumentsTrace.cs
- BooleanFacetDescriptionElement.cs
- AudioException.cs
- HatchBrush.cs
- DefaultExpressionVisitor.cs
- IItemProperties.cs
- EventSinkActivityDesigner.cs
- SwitchExpression.cs
- ConstraintStruct.cs
- SharedPersonalizationStateInfo.cs
- BinaryExpressionHelper.cs
- TaskHelper.cs
- CodeCommentStatement.cs
- RowsCopiedEventArgs.cs
- SearchForVirtualItemEventArgs.cs
- XhtmlBasicObjectListAdapter.cs
- Matrix3DValueSerializer.cs
- XmlNullResolver.cs
- PropertyEmitter.cs
- TextTreeTextElementNode.cs
- BezierSegment.cs
- FastPropertyAccessor.cs
- BaseResourcesBuildProvider.cs
- PropertyDescriptorComparer.cs
- LogEntrySerializationException.cs
- ZipIOBlockManager.cs
- SubMenuStyle.cs
- ParserStack.cs
- ControlCollection.cs
- DataGridViewComboBoxColumn.cs
- MetabaseReader.cs
- SizeConverter.cs
- ClientTargetCollection.cs
- EventLevel.cs
- Item.cs
- Parser.cs
- DatatypeImplementation.cs
- NonSerializedAttribute.cs
- ToolStripItem.cs
- ScopeElement.cs
- RectIndependentAnimationStorage.cs
- ConfigXmlElement.cs
- RelationshipType.cs
- HtmlProps.cs
- CriticalHandle.cs
- TextRangeEditLists.cs
- NativeObjectSecurity.cs
- AttributeXamlType.cs
- SocketAddress.cs
- LinqDataSourceInsertEventArgs.cs
- SqlDependencyUtils.cs
- EntityDataSourceView.cs
- FixedSOMLineCollection.cs
- Serializer.cs
- CriticalHandle.cs
- AppDomainManager.cs
- CommandEventArgs.cs
- PerformanceCounterManager.cs
- GeometryModel3D.cs
- SharedPersonalizationStateInfo.cs
- XmlSerializationReader.cs
- FlowDocumentPage.cs
- SizeChangedEventArgs.cs
- SQlBooleanStorage.cs
- RootProfilePropertySettingsCollection.cs