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
- ApplicationServiceManager.cs
- IntegerValidatorAttribute.cs
- WebPartVerbsEventArgs.cs
- httpapplicationstate.cs
- WaitHandleCannotBeOpenedException.cs
- CodeAccessSecurityEngine.cs
- BaseValidatorDesigner.cs
- EdmItemError.cs
- Section.cs
- SqlProviderUtilities.cs
- OutputCacheProfileCollection.cs
- ConnectionManagementElement.cs
- TypeBuilderInstantiation.cs
- ProcessHost.cs
- SchemaImporter.cs
- EntityWithChangeTrackerStrategy.cs
- BitSet.cs
- BooleanExpr.cs
- SettingsBase.cs
- XsltArgumentList.cs
- MailMessage.cs
- UniqueCodeIdentifierScope.cs
- BuilderInfo.cs
- PerformanceCounterLib.cs
- LinearGradientBrush.cs
- HttpWebResponse.cs
- EncodingNLS.cs
- LocalClientSecuritySettings.cs
- FieldTemplateFactory.cs
- SymbolEqualComparer.cs
- ValidationSummary.cs
- MonthCalendar.cs
- DirectionalLight.cs
- DocumentViewerBase.cs
- AssemblyBuilderData.cs
- UnsafeNativeMethodsMilCoreApi.cs
- PropertyGroupDescription.cs
- NameValuePermission.cs
- WindowsGraphicsCacheManager.cs
- EqualityComparer.cs
- HtmlDocument.cs
- XmlSchemaObjectCollection.cs
- DateTimeConstantAttribute.cs
- DesignerSerializationVisibilityAttribute.cs
- SerializationException.cs
- RsaKeyIdentifierClause.cs
- ManagementOperationWatcher.cs
- NameValueCache.cs
- SqlColumnizer.cs
- bindurihelper.cs
- DescendentsWalkerBase.cs
- FileInfo.cs
- Point3DCollection.cs
- HttpProfileGroupBase.cs
- SystemEvents.cs
- ReadOnlyDataSource.cs
- latinshape.cs
- BaseResourcesBuildProvider.cs
- JapaneseCalendar.cs
- ResourceDescriptionAttribute.cs
- PeerNearMe.cs
- DataObjectAttribute.cs
- CharEnumerator.cs
- UpdateRecord.cs
- keycontainerpermission.cs
- Light.cs
- BinHexEncoder.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- Container.cs
- StylusButtonCollection.cs
- TreeView.cs
- AndMessageFilterTable.cs
- DocumentViewerBase.cs
- BaseContextMenu.cs
- MaterialGroup.cs
- ObjectListCommandCollection.cs
- PassportAuthenticationEventArgs.cs
- ByteStreamGeometryContext.cs
- RichListBox.cs
- Operand.cs
- WindowsAuthenticationModule.cs
- DateTimeOffsetAdapter.cs
- ToolStripItemTextRenderEventArgs.cs
- UniqueIdentifierService.cs
- CheckBoxBaseAdapter.cs
- SafeFileMappingHandle.cs
- ObservableCollection.cs
- HttpRuntime.cs
- EnumValAlphaComparer.cs
- DataBinder.cs
- XamlTypeMapper.cs
- SymbolMethod.cs
- OleDbEnumerator.cs
- Line.cs
- SqlDataSourceCustomCommandPanel.cs
- ResourceProviderFactory.cs
- PointConverter.cs
- AdapterUtil.cs
- SchemaElementDecl.cs
- TimeSpanStorage.cs