Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / MS / Internal / AppModel / securitymgrsite.cs / 1305600 / securitymgrsite.cs
//----------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
// Description:
// The SecurityMgrSite is an implementation of Urlmon's IInternetSecurityMgrSite.
//
// It is primarily used to supply an hwnd to be modal to- when a ProcessUrlAction call
// is required to show UI.
// History:
// 03/08/05: marka Created.
//---------------------------------------------------------------------------
using System;
using MS.Win32;
using System.Runtime.InteropServices;
using System.Windows ;
using System.Security;
using MS.Internal.AppModel;
namespace MS.Internal
{
internal class SecurityMgrSite : NativeMethods.IInternetSecurityMgrSite
{
internal SecurityMgrSite()
{
}
///
/// Critical calls unsecure handle.
/// This function should only be called by Urlmon.
///
/// Which is un-managed code - ergo also critical.
///
[SecurityCritical]
public void GetWindow( /* [out] */ ref IntPtr phwnd)
{
phwnd = IntPtr.Zero;
if ( Application.Current != null )
{
Window curWindow = Application.Current.MainWindow;
Invariant.Assert( Application.Current.BrowserCallbackServices == null || ( curWindow is RootBrowserWindow ));
if (curWindow != null)
{
phwnd = curWindow.CriticalHandle;
}
}
}
public void EnableModeless( /* [in] */ bool fEnable)
{
}
}
}
// 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:
// The SecurityMgrSite is an implementation of Urlmon's IInternetSecurityMgrSite.
//
// It is primarily used to supply an hwnd to be modal to- when a ProcessUrlAction call
// is required to show UI.
// History:
// 03/08/05: marka Created.
//---------------------------------------------------------------------------
using System;
using MS.Win32;
using System.Runtime.InteropServices;
using System.Windows ;
using System.Security;
using MS.Internal.AppModel;
namespace MS.Internal
{
internal class SecurityMgrSite : NativeMethods.IInternetSecurityMgrSite
{
internal SecurityMgrSite()
{
}
///
/// Critical calls unsecure handle.
/// This function should only be called by Urlmon.
///
/// Which is un-managed code - ergo also critical.
///
[SecurityCritical]
public void GetWindow( /* [out] */ ref IntPtr phwnd)
{
phwnd = IntPtr.Zero;
if ( Application.Current != null )
{
Window curWindow = Application.Current.MainWindow;
Invariant.Assert( Application.Current.BrowserCallbackServices == null || ( curWindow is RootBrowserWindow ));
if (curWindow != null)
{
phwnd = curWindow.CriticalHandle;
}
}
}
public void EnableModeless( /* [in] */ bool fEnable)
{
}
}
}
// 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
- LinearKeyFrames.cs
- AssemblyName.cs
- XmlWellformedWriter.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- Msmq4PoisonHandler.cs
- TypedTableGenerator.cs
- MatchNoneMessageFilter.cs
- ObjectPersistData.cs
- ToolStripManager.cs
- SudsWriter.cs
- StylusLogic.cs
- SqlClientFactory.cs
- Border.cs
- DynamicQueryStringParameter.cs
- ColumnTypeConverter.cs
- DocumentViewerBase.cs
- ScrollViewer.cs
- HttpFileCollectionBase.cs
- DescriptionAttribute.cs
- UIAgentMonitor.cs
- ConditionalBranch.cs
- validationstate.cs
- MetaChildrenColumn.cs
- MemberInitExpression.cs
- BitmapCodecInfo.cs
- SelectedDatesCollection.cs
- QueryResponse.cs
- Util.cs
- BrowserDefinitionCollection.cs
- Transactions.cs
- MsmqException.cs
- Activity.cs
- ExtractorMetadata.cs
- ProxyHwnd.cs
- BitmapEffectGeneralTransform.cs
- SiteMap.cs
- ExpressionConverter.cs
- coordinatorfactory.cs
- LambdaSerializationException.cs
- ArglessEventHandlerProxy.cs
- SqlRowUpdatingEvent.cs
- BaseCollection.cs
- basevalidator.cs
- HttpConfigurationSystem.cs
- MouseActionValueSerializer.cs
- XmlUtil.cs
- CompilerResults.cs
- SamlAuthorizationDecisionStatement.cs
- Rijndael.cs
- DockPatternIdentifiers.cs
- AllMembershipCondition.cs
- StreamAsIStream.cs
- GZipDecoder.cs
- TreeViewDesigner.cs
- DataGridCaption.cs
- CircleHotSpot.cs
- StringValidatorAttribute.cs
- ToolStripSplitButton.cs
- ColumnReorderedEventArgs.cs
- FixedSOMPage.cs
- InputMethodStateTypeInfo.cs
- ListenerElementsCollection.cs
- LogoValidationException.cs
- ToolStripStatusLabel.cs
- SymmetricCryptoHandle.cs
- _ProxyChain.cs
- Events.cs
- XslTransform.cs
- Viewport2DVisual3D.cs
- HttpWebResponse.cs
- SqlException.cs
- ObjectDesignerDataSourceView.cs
- DiscoveryServerProtocol.cs
- EditBehavior.cs
- DragDeltaEventArgs.cs
- EditorPartCollection.cs
- SapiInterop.cs
- BrowserDefinition.cs
- FrameworkTextComposition.cs
- PointAnimationUsingKeyFrames.cs
- MetadataUtil.cs
- Guid.cs
- JsonDataContract.cs
- ImageDrawing.cs
- PathFigure.cs
- UIElement.cs
- MaskInputRejectedEventArgs.cs
- ColumnResizeAdorner.cs
- ToolStripItemEventArgs.cs
- SmtpNetworkElement.cs
- BypassElementCollection.cs
- AutoResizedEvent.cs
- SubclassTypeValidator.cs
- RectAnimationClockResource.cs
- ReturnValue.cs
- TreeWalker.cs
- CodeTryCatchFinallyStatement.cs
- Rights.cs
- PingReply.cs
- JsonServiceDocumentSerializer.cs