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
- SerTrace.cs
- SchemaDeclBase.cs
- PropertyChangedEventArgs.cs
- VisualStyleInformation.cs
- ComponentEditorForm.cs
- EventMappingSettings.cs
- BrowsableAttribute.cs
- OleDbWrapper.cs
- SqlDataSourceCache.cs
- XmlUnspecifiedAttribute.cs
- XamlFilter.cs
- CmsInterop.cs
- ComplexTypeEmitter.cs
- MenuRendererClassic.cs
- HttpServerVarsCollection.cs
- CallSiteOps.cs
- DecimalKeyFrameCollection.cs
- CurrentTimeZone.cs
- InputReport.cs
- SQLDateTime.cs
- StsCommunicationException.cs
- CodeDOMUtility.cs
- PTManager.cs
- MailDefinitionBodyFileNameEditor.cs
- XMLDiffLoader.cs
- ArrayList.cs
- TaiwanCalendar.cs
- RangeValidator.cs
- ConnectionPoolManager.cs
- MetadataItem.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- WeakEventManager.cs
- RemoteWebConfigurationHost.cs
- DataBoundControl.cs
- AuthorizationRuleCollection.cs
- UncommonField.cs
- WebEvents.cs
- MeasureData.cs
- BuildManager.cs
- ApplicationGesture.cs
- ReadOnlyMetadataCollection.cs
- NameScope.cs
- TableMethodGenerator.cs
- SiteIdentityPermission.cs
- TreePrinter.cs
- AccessedThroughPropertyAttribute.cs
- ReachNamespaceInfo.cs
- MediaElement.cs
- AttachedPropertyDescriptor.cs
- Substitution.cs
- SqlDataSourceQueryEditor.cs
- compensatingcollection.cs
- documentsequencetextview.cs
- TemplateContentLoader.cs
- JoinGraph.cs
- UpdatePanelTriggerCollection.cs
- BitmapSource.cs
- serverconfig.cs
- Ticks.cs
- LocalizedNameDescriptionPair.cs
- Image.cs
- InternalConfigHost.cs
- BindingsCollection.cs
- ListMarkerSourceInfo.cs
- RelationshipNavigation.cs
- PriorityChain.cs
- SEHException.cs
- LineGeometry.cs
- ReadOnlyObservableCollection.cs
- Publisher.cs
- AuthorizationRule.cs
- LocatorGroup.cs
- AliasGenerator.cs
- StickyNoteContentControl.cs
- DirectoryInfo.cs
- FunctionMappingTranslator.cs
- UInt64Storage.cs
- ZipIOExtraFieldPaddingElement.cs
- AttachedAnnotation.cs
- IntegerValidatorAttribute.cs
- PermissionListSet.cs
- RecommendedAsConfigurableAttribute.cs
- ClientUtils.cs
- InstanceData.cs
- SoapFault.cs
- CodeObject.cs
- ExtendedProperty.cs
- Bits.cs
- List.cs
- SerialPort.cs
- TransformerInfo.cs
- WindowsContainer.cs
- GridViewRowCollection.cs
- PublishLicense.cs
- GridViewAutomationPeer.cs
- SettingsBase.cs
- DeclaredTypeElementCollection.cs
- PropertyTab.cs
- WorkflowShape.cs
- StateMachineHelpers.cs