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
- MachineKeyConverter.cs
- BamlCollectionHolder.cs
- SecurityResources.cs
- PolicyReader.cs
- AtomMaterializerLog.cs
- ResourceManagerWrapper.cs
- CacheDependency.cs
- EntityChangedParams.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- Hex.cs
- WhitespaceRuleReader.cs
- CryptoKeySecurity.cs
- IdleTimeoutMonitor.cs
- StylusPointProperties.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- DesignerAdRotatorAdapter.cs
- ControlType.cs
- BitmapPalettes.cs
- BamlRecords.cs
- ProcessMonitor.cs
- WindowsComboBox.cs
- BitmapPalettes.cs
- PrintDocument.cs
- HttpCookieCollection.cs
- RepeaterCommandEventArgs.cs
- BidOverLoads.cs
- PKCS1MaskGenerationMethod.cs
- WindowsButton.cs
- ColumnResult.cs
- MatrixTransform.cs
- ModuleBuilder.cs
- Cursors.cs
- HandlerBase.cs
- httpstaticobjectscollection.cs
- unsafenativemethodsother.cs
- _SafeNetHandles.cs
- FixedSOMTableRow.cs
- ConfigurationElementProperty.cs
- EventSource.cs
- XmlTextWriter.cs
- TextRangeProviderWrapper.cs
- shaper.cs
- SqlRetyper.cs
- SqlParameter.cs
- AppDomain.cs
- XmlSerializerFormatAttribute.cs
- _ConnectionGroup.cs
- WebBrowserSiteBase.cs
- DefaultDialogButtons.cs
- SecurityRuntime.cs
- EditorOptionAttribute.cs
- SolidColorBrush.cs
- cache.cs
- SqlClientWrapperSmiStream.cs
- _UriTypeConverter.cs
- IndexedWhereQueryOperator.cs
- relpropertyhelper.cs
- TreeViewItemAutomationPeer.cs
- ElementNotEnabledException.cs
- SqlCharStream.cs
- FontUnitConverter.cs
- DataBoundLiteralControl.cs
- SafeCoTaskMem.cs
- DetailsViewInsertedEventArgs.cs
- TextSpan.cs
- ResourceDisplayNameAttribute.cs
- FilteredReadOnlyMetadataCollection.cs
- SoapEnvelopeProcessingElement.cs
- DataGridViewUtilities.cs
- NativeBuffer.cs
- TextBoxLine.cs
- XmlException.cs
- JsonFormatReaderGenerator.cs
- TypeLibConverter.cs
- PointCollectionConverter.cs
- EnlistmentState.cs
- PrintDialogException.cs
- LayoutTable.cs
- DefaultAsyncDataDispatcher.cs
- LinkUtilities.cs
- CatalogPartDesigner.cs
- ConfigurationSectionGroupCollection.cs
- StylusButtonEventArgs.cs
- TimeoutConverter.cs
- ProxyHelper.cs
- PathNode.cs
- ProcessHostFactoryHelper.cs
- XmlCharacterData.cs
- EnumValidator.cs
- UnmanagedMarshal.cs
- SchemaNames.cs
- CellTreeSimplifier.cs
- TimeoutTimer.cs
- DashStyles.cs
- ToolStripOverflow.cs
- SubtreeProcessor.cs
- CodeSnippetExpression.cs
- PngBitmapEncoder.cs
- QueryContinueDragEvent.cs
- ShaperBuffers.cs