Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Framework / MS / Internal / AppModel / securitymgrsite.cs / 1 / 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
- IDReferencePropertyAttribute.cs
- WindowsFormsHostAutomationPeer.cs
- BitmapEffectGeneralTransform.cs
- BuiltInExpr.cs
- XmlCharType.cs
- TemplateColumn.cs
- InternalConfigConfigurationFactory.cs
- IsolatedStorageException.cs
- DataGridRowDetailsEventArgs.cs
- ManipulationPivot.cs
- FtpWebRequest.cs
- DataGridViewRowPrePaintEventArgs.cs
- CodeStatementCollection.cs
- NegatedCellConstant.cs
- PersonalizationState.cs
- UInt32.cs
- WebBrowserContainer.cs
- ArgumentsParser.cs
- Control.cs
- _ConnectStream.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- TableHeaderCell.cs
- RightsManagementEncryptedStream.cs
- SpecialNameAttribute.cs
- DesignerExtenders.cs
- Console.cs
- ThousandthOfEmRealDoubles.cs
- TypeSystemProvider.cs
- LocalClientSecuritySettings.cs
- CodeStatement.cs
- XslTransform.cs
- EventArgs.cs
- Size.cs
- DynamicPropertyHolder.cs
- EarlyBoundInfo.cs
- SynchronizedMessageSource.cs
- DataGridCell.cs
- SrgsElementList.cs
- InsufficientExecutionStackException.cs
- Stylesheet.cs
- BinaryFormatter.cs
- ScriptResourceAttribute.cs
- ThrowHelper.cs
- TypeForwardedFromAttribute.cs
- SafeHandles.cs
- processwaithandle.cs
- PathFigure.cs
- IPGlobalProperties.cs
- KnownBoxes.cs
- RegexWriter.cs
- wgx_sdk_version.cs
- State.cs
- RightsManagementEncryptedStream.cs
- ProxyAttribute.cs
- BookmarkScopeHandle.cs
- TemplateControlBuildProvider.cs
- TypedAsyncResult.cs
- COM2EnumConverter.cs
- DoubleLinkList.cs
- ArithmeticException.cs
- UserControlCodeDomTreeGenerator.cs
- LinkClickEvent.cs
- Baml2006KeyRecord.cs
- ObsoleteAttribute.cs
- WsatStrings.cs
- DataGridViewHeaderCell.cs
- Metadata.cs
- Stroke2.cs
- ToggleProviderWrapper.cs
- WhitespaceRuleLookup.cs
- ZipIOExtraFieldZip64Element.cs
- XmlSerializationReader.cs
- IndentedWriter.cs
- MethodBuilder.cs
- WsatServiceAddress.cs
- XmlValueConverter.cs
- ConditionChanges.cs
- InternalRelationshipCollection.cs
- SqlServer2KCompatibilityAnnotation.cs
- ImageField.cs
- ViewgenGatekeeper.cs
- ManifestResourceInfo.cs
- versioninfo.cs
- _ContextAwareResult.cs
- WebPartConnectionsEventArgs.cs
- EpmSourceTree.cs
- CompareValidator.cs
- ComponentRenameEvent.cs
- MiniMapControl.xaml.cs
- FormViewUpdateEventArgs.cs
- XmlTextWriter.cs
- DataViewSetting.cs
- BodyGlyph.cs
- Underline.cs
- TextRangeEditTables.cs
- ToolStripDropDownDesigner.cs
- DynamicQueryableWrapper.cs
- MimeTypeAttribute.cs
- MsmqTransportSecurity.cs
- CodeIterationStatement.cs