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
- MonthChangedEventArgs.cs
- SHA256.cs
- ConnectionManagementSection.cs
- MatchingStyle.cs
- HashCoreRequest.cs
- ToolBar.cs
- LayoutEngine.cs
- SimpleHandlerBuildProvider.cs
- UpdateException.cs
- XmlDataSource.cs
- DSACryptoServiceProvider.cs
- PersistenceMetadataNamespace.cs
- SystemIPGlobalProperties.cs
- X509ChainElement.cs
- FileDialog.cs
- ExtensionMethods.cs
- ParsedAttributeCollection.cs
- GroupStyle.cs
- OdbcTransaction.cs
- MemberBinding.cs
- ListBoxItemAutomationPeer.cs
- SystemResourceKey.cs
- WebBrowserEvent.cs
- XmlUtil.cs
- PropertyChangedEventManager.cs
- Clause.cs
- WCFBuildProvider.cs
- ThreadStaticAttribute.cs
- PrimaryKeyTypeConverter.cs
- OutputWindow.cs
- InfocardClientCredentials.cs
- OdbcCommandBuilder.cs
- UriScheme.cs
- PanelStyle.cs
- SystemIPGlobalStatistics.cs
- TextSchema.cs
- EventSchemaTraceListener.cs
- AttachedPropertyMethodSelector.cs
- ImageFormatConverter.cs
- SqlGenerator.cs
- SemaphoreFullException.cs
- InputScope.cs
- Brushes.cs
- NavigationProperty.cs
- SQLBinaryStorage.cs
- ProxyWebPart.cs
- PropagatorResult.cs
- Application.cs
- DelegateSerializationHolder.cs
- DocumentOrderQuery.cs
- WebEncodingValidator.cs
- PropertyGridEditorPart.cs
- Window.cs
- FileLevelControlBuilderAttribute.cs
- InstanceNameConverter.cs
- PropertyDescriptorComparer.cs
- PrintingPermission.cs
- EventLogInformation.cs
- MenuItemStyle.cs
- QilExpression.cs
- DispatcherEventArgs.cs
- XmlHierarchicalDataSourceView.cs
- RegexBoyerMoore.cs
- XmlSchemaSubstitutionGroup.cs
- FilteredAttributeCollection.cs
- NavigatorInput.cs
- CssClassPropertyAttribute.cs
- XPathNodeInfoAtom.cs
- FontDifferentiator.cs
- TcpProcessProtocolHandler.cs
- ArraySubsetEnumerator.cs
- SystemInfo.cs
- FragmentQueryProcessor.cs
- DataGridTableCollection.cs
- Visual3DCollection.cs
- SingleBodyParameterMessageFormatter.cs
- StringFreezingAttribute.cs
- EraserBehavior.cs
- ConfigurationElementCollection.cs
- TextDpi.cs
- UIHelper.cs
- PartialArray.cs
- DataGridAddNewRow.cs
- ClientBuildManager.cs
- ConfigXmlText.cs
- ProgressPage.cs
- InitiatorServiceModelSecurityTokenRequirement.cs
- ReflectionTypeLoadException.cs
- PublisherIdentityPermission.cs
- Pkcs7Recipient.cs
- HtmlInputReset.cs
- JsonStringDataContract.cs
- XmlDataSource.cs
- Point3DConverter.cs
- NativeMethods.cs
- DatagridviewDisplayedBandsData.cs
- Attributes.cs
- translator.cs
- XmlCharCheckingReader.cs
- HScrollBar.cs