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
- ScriptServiceAttribute.cs
- CurrentTimeZone.cs
- WebPart.cs
- SecurityAlgorithmSuiteConverter.cs
- SafeEventLogWriteHandle.cs
- StdRegProviderWrapper.cs
- PointUtil.cs
- IWorkflowDebuggerService.cs
- PostBackOptions.cs
- DataChangedEventManager.cs
- SafeArchiveContext.cs
- TextEditorMouse.cs
- CssClassPropertyAttribute.cs
- XmlWriterDelegator.cs
- PrintDialogDesigner.cs
- ConstructorArgumentAttribute.cs
- DocumentOrderQuery.cs
- FixedSOMLineRanges.cs
- WaitForChangedResult.cs
- ConfigurationLockCollection.cs
- SelectionWordBreaker.cs
- SvcFileManager.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- ToolStripArrowRenderEventArgs.cs
- WSHttpBinding.cs
- MinimizableAttributeTypeConverter.cs
- ExcludeFromCodeCoverageAttribute.cs
- VisualBasicSettingsHandler.cs
- SiteMapNodeCollection.cs
- ValueConversionAttribute.cs
- XmlSchemaValidationException.cs
- CharAnimationUsingKeyFrames.cs
- Merger.cs
- EventManager.cs
- GenericUriParser.cs
- Soap.cs
- AdapterUtil.cs
- PageRequestManager.cs
- DesignerCalendarAdapter.cs
- SQLConvert.cs
- ToggleProviderWrapper.cs
- listitem.cs
- ButtonField.cs
- WebReferenceOptions.cs
- PolicyFactory.cs
- DocumentSequence.cs
- XsdDuration.cs
- FillErrorEventArgs.cs
- HtmlControl.cs
- TypeUnloadedException.cs
- BoundsDrawingContextWalker.cs
- DataServiceException.cs
- StartUpEventArgs.cs
- ThreadExceptionEvent.cs
- GridItemProviderWrapper.cs
- CompiledQuery.cs
- SupportsEventValidationAttribute.cs
- MediaPlayer.cs
- HttpPostedFile.cs
- VectorCollectionConverter.cs
- XamlPoint3DCollectionSerializer.cs
- UserInitiatedRoutedEventPermissionAttribute.cs
- RoleGroupCollectionEditor.cs
- XmlAttributeCache.cs
- CryptographicAttribute.cs
- ConfigurationSectionHelper.cs
- UmAlQuraCalendar.cs
- MultiPageTextView.cs
- QueryStringParameter.cs
- PeerCollaboration.cs
- ValidationSummary.cs
- BuilderPropertyEntry.cs
- WindowsStatusBar.cs
- InternalControlCollection.cs
- ClientScriptItem.cs
- SqlCacheDependencySection.cs
- ListViewDeleteEventArgs.cs
- DateTimeConstantAttribute.cs
- BindingContext.cs
- HeaderPanel.cs
- Label.cs
- __ComObject.cs
- FtpRequestCacheValidator.cs
- BulletChrome.cs
- ComPlusInstanceContextInitializer.cs
- EntityContainerAssociationSet.cs
- CompilerLocalReference.cs
- CodeEventReferenceExpression.cs
- DataGridViewCellCollection.cs
- PageCodeDomTreeGenerator.cs
- ObjectDataSourceChooseMethodsPanel.cs
- IFormattable.cs
- StylusLogic.cs
- HttpRuntimeSection.cs
- TrackingServices.cs
- EncryptedKeyIdentifierClause.cs
- SmtpCommands.cs
- ControlParameter.cs
- ContainerVisual.cs
- FocusChangedEventArgs.cs