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
- PersonalizationStateQuery.cs
- EditableRegion.cs
- StatusCommandUI.cs
- ToolTip.cs
- IntSecurity.cs
- SystemFonts.cs
- ImageCodecInfoPrivate.cs
- XPathSelfQuery.cs
- HttpWebRequest.cs
- COM2PropertyPageUITypeConverter.cs
- IsolatedStoragePermission.cs
- DetailsViewUpdateEventArgs.cs
- EndpointFilterProvider.cs
- RenderingBiasValidation.cs
- XslNumber.cs
- TextAutomationPeer.cs
- WebContext.cs
- TabControlDesigner.cs
- XmlSchemaValidator.cs
- SqlDataReader.cs
- ToolStripDropDownClosingEventArgs.cs
- XmlNodeWriter.cs
- StronglyTypedResourceBuilder.cs
- TextParagraphCache.cs
- SqlFormatter.cs
- PenLineJoinValidation.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- baseshape.cs
- typedescriptorpermissionattribute.cs
- DbConnectionPoolGroup.cs
- TrustManagerPromptUI.cs
- XPathNavigatorKeyComparer.cs
- AlphabeticalEnumConverter.cs
- DataError.cs
- XPathPatternParser.cs
- TakeOrSkipWhileQueryOperator.cs
- lengthconverter.cs
- PixelShader.cs
- SrgsRuleRef.cs
- VoiceSynthesis.cs
- KnownTypeDataContractResolver.cs
- NamedPermissionSet.cs
- SwitchElementsCollection.cs
- FieldBuilder.cs
- TailCallAnalyzer.cs
- ToolStripDropDownItemDesigner.cs
- UInt32.cs
- SpecularMaterial.cs
- NotCondition.cs
- DataSetFieldSchema.cs
- PackagePart.cs
- HtmlFormParameterWriter.cs
- PackUriHelper.cs
- HttpVersion.cs
- TraversalRequest.cs
- GraphicsState.cs
- CalendarKeyboardHelper.cs
- VScrollProperties.cs
- TransactedReceiveScope.cs
- JavaScriptString.cs
- MdImport.cs
- DataControlField.cs
- WindowsRichEdit.cs
- Propagator.cs
- Container.cs
- odbcmetadatafactory.cs
- SignedXml.cs
- XmlSchemaSimpleTypeUnion.cs
- CompiledAction.cs
- FileClassifier.cs
- _KerberosClient.cs
- SmtpNtlmAuthenticationModule.cs
- UDPClient.cs
- Dictionary.cs
- Material.cs
- WebPartZoneAutoFormat.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- InvalidBodyAccessException.cs
- CompoundFileStorageReference.cs
- EntitySetBaseCollection.cs
- ImageSourceConverter.cs
- SvcFileManager.cs
- DoubleLinkList.cs
- Html32TextWriter.cs
- InternalBufferOverflowException.cs
- AccessibleObject.cs
- URLMembershipCondition.cs
- CompareValidator.cs
- DocumentPageViewAutomationPeer.cs
- Constants.cs
- IItemProperties.cs
- TemplatedAdorner.cs
- OutputCache.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- EncoderReplacementFallback.cs
- GeometryGroup.cs
- MetabaseServerConfig.cs
- WebPartVerbsEventArgs.cs
- MapPathBasedVirtualPathProvider.cs
- X509Certificate2.cs