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
- _HTTPDateParse.cs
- SimpleWorkerRequest.cs
- CodePrimitiveExpression.cs
- ObjectHelper.cs
- WindowsSlider.cs
- HeaderUtility.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- WindowProviderWrapper.cs
- BorderSidesEditor.cs
- CommonXSendMessage.cs
- ButtonBaseAutomationPeer.cs
- TypeConverterHelper.cs
- CacheRequest.cs
- HierarchicalDataBoundControlAdapter.cs
- TransactionState.cs
- Overlapped.cs
- UnSafeCharBuffer.cs
- WebBrowserProgressChangedEventHandler.cs
- ItemList.cs
- ClientScriptManager.cs
- SQLConvert.cs
- PeerChannelListener.cs
- ThreadInterruptedException.cs
- DataServiceProviderWrapper.cs
- ItemsPanelTemplate.cs
- CompositeScriptReference.cs
- XpsManager.cs
- XsdBuildProvider.cs
- PreservationFileWriter.cs
- RectangleGeometry.cs
- RedirectionProxy.cs
- CngAlgorithm.cs
- ReadOnlyObservableCollection.cs
- XmlNamespaceMapping.cs
- SystemWebSectionGroup.cs
- WebBrowserUriTypeConverter.cs
- IntegerCollectionEditor.cs
- TextElement.cs
- ResourceReferenceExpression.cs
- VisualBrush.cs
- WindowsToolbar.cs
- ButtonBaseDesigner.cs
- StylusPointDescription.cs
- ListViewHitTestInfo.cs
- ConvertEvent.cs
- XmlExpressionDumper.cs
- XMLDiffLoader.cs
- WaitHandle.cs
- BulletedList.cs
- ApplicationManager.cs
- SqlTransaction.cs
- RetrieveVirtualItemEventArgs.cs
- BaseTemplateCodeDomTreeGenerator.cs
- ProcessStartInfo.cs
- ParserContext.cs
- LicenseManager.cs
- XmlNamespaceDeclarationsAttribute.cs
- Nullable.cs
- SystemWebCachingSectionGroup.cs
- LassoSelectionBehavior.cs
- ExpressionBuilderCollection.cs
- HttpVersion.cs
- Pkcs7Recipient.cs
- TCEAdapterGenerator.cs
- PrinterResolution.cs
- ReflectionUtil.cs
- SafeUserTokenHandle.cs
- ObjectIDGenerator.cs
- ExternalException.cs
- XPathSingletonIterator.cs
- FormViewModeEventArgs.cs
- MetaData.cs
- Int64AnimationBase.cs
- CLSCompliantAttribute.cs
- WindowsListViewGroupSubsetLink.cs
- MouseOverProperty.cs
- parserscommon.cs
- ExecutionContext.cs
- SchemaImporterExtensionsSection.cs
- ResourceBinder.cs
- ValuePatternIdentifiers.cs
- Form.cs
- DataColumnMappingCollection.cs
- ComplexTypeEmitter.cs
- SystemPens.cs
- DbConnectionFactory.cs
- TraceListener.cs
- DocumentOrderComparer.cs
- ReferenceConverter.cs
- XmlDataLoader.cs
- FormatConvertedBitmap.cs
- SurrogateEncoder.cs
- ErrorProvider.cs
- InputScope.cs
- CommandEventArgs.cs
- DataGridViewImageColumn.cs
- ClientSponsor.cs
- HierarchicalDataSourceConverter.cs
- ToolBarButtonClickEvent.cs
- RegionInfo.cs