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
- XmlLangPropertyAttribute.cs
- OleServicesContext.cs
- OrCondition.cs
- TypedTableBaseExtensions.cs
- IndicShape.cs
- METAHEADER.cs
- OracleEncoding.cs
- PropertyValueUIItem.cs
- MemberAccessException.cs
- AutoResizedEvent.cs
- IsolatedStorageFile.cs
- SmiMetaDataProperty.cs
- DateTimeHelper.cs
- MenuItemStyle.cs
- EtwTrackingBehaviorElement.cs
- ListCollectionView.cs
- HostedElements.cs
- TypeDescriptionProvider.cs
- Unit.cs
- Vector.cs
- BamlStream.cs
- DesignerCategoryAttribute.cs
- TypeProvider.cs
- FileClassifier.cs
- MetabaseServerConfig.cs
- Grammar.cs
- CodeTypeMemberCollection.cs
- Debugger.cs
- Int16Animation.cs
- XmlSchemaGroup.cs
- TableDesigner.cs
- IdentityReference.cs
- BinHexDecoder.cs
- UInt16Storage.cs
- RootBrowserWindowProxy.cs
- PrintDialogException.cs
- WorkflowCommandExtensionItem.cs
- ToolStripGripRenderEventArgs.cs
- Form.cs
- Int64.cs
- Type.cs
- FolderBrowserDialog.cs
- SystemWebSectionGroup.cs
- XmlSchemaObjectTable.cs
- CircleHotSpot.cs
- AssemblyBuilder.cs
- DataBoundControlAdapter.cs
- CheckBoxFlatAdapter.cs
- RMPublishingDialog.cs
- DSGeneratorProblem.cs
- ColorTransform.cs
- DebugView.cs
- SamlSecurityToken.cs
- HandlerWithFactory.cs
- HostingPreferredMapPath.cs
- SqlCommandSet.cs
- EmptyEnumerator.cs
- TCPListener.cs
- PerfService.cs
- Control.cs
- SystemWebSectionGroup.cs
- BinaryEditor.cs
- TemplateBindingExpressionConverter.cs
- SpecialFolderEnumConverter.cs
- Condition.cs
- HeaderedContentControl.cs
- SubtreeProcessor.cs
- SystemIPv6InterfaceProperties.cs
- GridItemPattern.cs
- ErrorWebPart.cs
- MetadataItemEmitter.cs
- SerializationSectionGroup.cs
- NamespaceQuery.cs
- UnsafeNativeMethods.cs
- NameValuePermission.cs
- DeclarativeCatalogPart.cs
- _ContextAwareResult.cs
- ImpersonateTokenRef.cs
- HttpModule.cs
- ExternalFile.cs
- ArraySortHelper.cs
- ResourceDescriptionAttribute.cs
- DataGridViewTextBoxEditingControl.cs
- FixedHighlight.cs
- DrawingContextWalker.cs
- StructuredTypeEmitter.cs
- RoutedUICommand.cs
- SqlProfileProvider.cs
- UriParserTemplates.cs
- EdmType.cs
- TypeDelegator.cs
- FixedSOMTableRow.cs
- TextFragmentEngine.cs
- DataGridPageChangedEventArgs.cs
- XPathNodeInfoAtom.cs
- Base64Stream.cs
- AssemblyBuilderData.cs
- DelegatingHeader.cs
- InfoCardRSACryptoProvider.cs
- SafeHandle.cs