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
- CompositeControl.cs
- IssuedTokenParametersElement.cs
- EntityDataSourceChangingEventArgs.cs
- DocumentSequence.cs
- RemoteWebConfigurationHostServer.cs
- ReadOnlyAttribute.cs
- _BasicClient.cs
- DbMetaDataCollectionNames.cs
- DataGridViewMethods.cs
- UnaryNode.cs
- DateTimeHelper.cs
- PointHitTestParameters.cs
- EncryptedKey.cs
- BamlResourceSerializer.cs
- SmiXetterAccessMap.cs
- SqlStream.cs
- StyleModeStack.cs
- PointAnimationUsingPath.cs
- DataGridViewColumnCollection.cs
- NativeCppClassAttribute.cs
- UnsafeNativeMethods.cs
- ModulesEntry.cs
- SynchronizationFilter.cs
- EditorPartCollection.cs
- MiniMapControl.xaml.cs
- ToggleButtonAutomationPeer.cs
- ChannelPool.cs
- XmlDownloadManager.cs
- ObjectDataSourceMethodEditor.cs
- PresentationAppDomainManager.cs
- Base64Encoding.cs
- FontUnitConverter.cs
- AtomParser.cs
- ResolveMatchesApril2005.cs
- FillErrorEventArgs.cs
- ListDictionary.cs
- ChannelManager.cs
- ClientTargetSection.cs
- printdlgexmarshaler.cs
- AutomationPropertyInfo.cs
- infer.cs
- Metafile.cs
- StaticDataManager.cs
- FileSecurity.cs
- LocalizabilityAttribute.cs
- AddInProcess.cs
- sitestring.cs
- TreeNodeMouseHoverEvent.cs
- Configuration.cs
- OutKeywords.cs
- RequestTimeoutManager.cs
- StateManagedCollection.cs
- Tuple.cs
- Parsers.cs
- Vector3DCollectionConverter.cs
- OletxTransactionManager.cs
- BindingMAnagerBase.cs
- SpotLight.cs
- ServiceOperation.cs
- EnumValAlphaComparer.cs
- IChannel.cs
- OleAutBinder.cs
- StyleBamlTreeBuilder.cs
- HtmlInputButton.cs
- StsCommunicationException.cs
- StoreContentChangedEventArgs.cs
- InvokeMemberBinder.cs
- RenderDataDrawingContext.cs
- DataExpression.cs
- TextDecorationUnitValidation.cs
- SignatureToken.cs
- PartialCachingControl.cs
- Preprocessor.cs
- DoubleLinkList.cs
- SHA512Cng.cs
- SingleSelectRootGridEntry.cs
- FixedDocumentSequencePaginator.cs
- xmlglyphRunInfo.cs
- FormViewInsertEventArgs.cs
- SelectionBorderGlyph.cs
- TextSegment.cs
- TypeInfo.cs
- SessionIDManager.cs
- LabelEditEvent.cs
- HashMembershipCondition.cs
- SignatureHelper.cs
- SocketManager.cs
- BoundField.cs
- TimeZone.cs
- TemplateModeChangedEventArgs.cs
- DropDownButton.cs
- CompositeControl.cs
- DefaultEvaluationContext.cs
- MessagingDescriptionAttribute.cs
- GraphicsPath.cs
- DataErrorValidationRule.cs
- Crc32.cs
- RoleManagerEventArgs.cs
- GorillaCodec.cs
- BindableAttribute.cs