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
- XmlSignificantWhitespace.cs
- ListViewHitTestInfo.cs
- SoapCodeExporter.cs
- ClientType.cs
- DBNull.cs
- DrawingAttributesDefaultValueFactory.cs
- SystemNetworkInterface.cs
- ConstraintEnumerator.cs
- EntityViewGenerationConstants.cs
- HtmlProps.cs
- ProtocolViolationException.cs
- WorkflowDesignerMessageFilter.cs
- TypeDescriptionProvider.cs
- DesignTable.cs
- ComplexBindingPropertiesAttribute.cs
- ReturnEventArgs.cs
- XmlCodeExporter.cs
- XmlSchemaComplexContent.cs
- Html32TextWriter.cs
- ValidatorCollection.cs
- CodeCompiler.cs
- ServerIdentity.cs
- AddressHeader.cs
- XmlPreloadedResolver.cs
- ToolStripArrowRenderEventArgs.cs
- XPathAncestorIterator.cs
- RedirectionProxy.cs
- RuntimeVariableList.cs
- FrameworkContentElementAutomationPeer.cs
- InputLangChangeRequestEvent.cs
- DataKey.cs
- AuthorizationRuleCollection.cs
- PageCache.cs
- coordinatorscratchpad.cs
- webproxy.cs
- VarInfo.cs
- DataBindEngine.cs
- CodeDirectiveCollection.cs
- DiagnosticStrings.cs
- Interop.cs
- FilterQueryOptionExpression.cs
- Label.cs
- DashStyle.cs
- WebPartVerbsEventArgs.cs
- KeyedCollection.cs
- LinqDataSourceStatusEventArgs.cs
- ViewEventArgs.cs
- PrimitiveXmlSerializers.cs
- NonSerializedAttribute.cs
- GenericAuthenticationEventArgs.cs
- DCSafeHandle.cs
- OdbcFactory.cs
- FloatUtil.cs
- ClientBuildManager.cs
- SqlMetaData.cs
- PrimaryKeyTypeConverter.cs
- RegexTree.cs
- DetailsViewPageEventArgs.cs
- InvalidFilterCriteriaException.cs
- UriParserTemplates.cs
- PolicyUnit.cs
- HttpCookieCollection.cs
- RequestCache.cs
- WebPartRestoreVerb.cs
- ProgressPage.cs
- validationstate.cs
- ValueQuery.cs
- SplitContainer.cs
- DataSourceControlBuilder.cs
- ListViewContainer.cs
- HtmlGenericControl.cs
- StrongNameMembershipCondition.cs
- DbProviderFactories.cs
- __TransparentProxy.cs
- IInstanceTable.cs
- DecimalAnimationBase.cs
- XPathArrayIterator.cs
- EncoderFallback.cs
- DynamicMetaObject.cs
- _Rfc2616CacheValidators.cs
- HostProtectionException.cs
- OracleNumber.cs
- AspNetCacheProfileAttribute.cs
- CommandExpr.cs
- Asn1IntegerConverter.cs
- ContentTextAutomationPeer.cs
- DataGridViewCellStyleConverter.cs
- Container.cs
- Currency.cs
- AlignmentYValidation.cs
- OracleBinary.cs
- FigureParaClient.cs
- DbDataAdapter.cs
- WinFormsComponentEditor.cs
- ProcessHostConfigUtils.cs
- InkCanvasInnerCanvas.cs
- XmlDictionaryWriter.cs
- SemanticTag.cs
- SettingsBase.cs
- LinqDataSourceValidationException.cs