Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- InkPresenter.cs
- InfoCardArgumentException.cs
- HijriCalendar.cs
- DecoderBestFitFallback.cs
- CorrelationKey.cs
- WebPermission.cs
- RegexCompiler.cs
- ObjectViewQueryResultData.cs
- SafeNativeMemoryHandle.cs
- DesignerUtility.cs
- ReadOnlyActivityGlyph.cs
- Scalars.cs
- AggregateNode.cs
- KeyboardEventArgs.cs
- ProviderSettings.cs
- NeutralResourcesLanguageAttribute.cs
- Delegate.cs
- Stack.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- ObjectHandle.cs
- Positioning.cs
- XmlSchemaDocumentation.cs
- BooleanToSelectiveScrollingOrientationConverter.cs
- TextReader.cs
- SqlProvider.cs
- DBSchemaTable.cs
- LoginCancelEventArgs.cs
- IpcClientManager.cs
- WorkflowStateRollbackService.cs
- Int32RectConverter.cs
- DiscoveryClientElement.cs
- HyperlinkAutomationPeer.cs
- User.cs
- DrawingAttributes.cs
- PageFunction.cs
- HwndSubclass.cs
- XPathMessageFilterElement.cs
- QilReference.cs
- IDataContractSurrogate.cs
- OciLobLocator.cs
- TraceContext.cs
- StreamGeometryContext.cs
- WaitHandle.cs
- DiscoveryViaBehavior.cs
- SqlCacheDependencyDatabase.cs
- DistinctQueryOperator.cs
- SqlPersistenceProviderFactory.cs
- CheckedListBox.cs
- cookie.cs
- TextEncodedRawTextWriter.cs
- ParseElement.cs
- SystemEvents.cs
- ExtendedTransformFactory.cs
- InputBinder.cs
- _Events.cs
- CombinedGeometry.cs
- ObjectParameter.cs
- CollectionViewGroup.cs
- IriParsingElement.cs
- MessageDecoder.cs
- ScrollEventArgs.cs
- StateValidator.cs
- ProtocolsConfiguration.cs
- Matrix3D.cs
- XmlnsPrefixAttribute.cs
- UserControl.cs
- SQLInt16Storage.cs
- InvalidateEvent.cs
- NavigationPropertyAccessor.cs
- ToolboxComponentsCreatingEventArgs.cs
- XamlFxTrace.cs
- StrokeFIndices.cs
- PageRequestManager.cs
- URIFormatException.cs
- DbProviderFactories.cs
- ObjectDataSourceEventArgs.cs
- LocatorBase.cs
- Label.cs
- BrowsableAttribute.cs
- QueryNode.cs
- CacheForPrimitiveTypes.cs
- StrokeCollection.cs
- SqlAliasesReferenced.cs
- FixedNode.cs
- SQLDecimal.cs
- DataServiceHostFactory.cs
- HttpInputStream.cs
- WindowsSysHeader.cs
- SendSecurityHeader.cs
- PeerValidationBehavior.cs
- AccessDataSourceView.cs
- RectKeyFrameCollection.cs
- LocationFactory.cs
- PtsHelper.cs
- SamlDelegatingWriter.cs
- InvalidOperationException.cs
- ReflectionHelper.cs
- XmlValidatingReader.cs
- QilList.cs
- FormView.cs