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
- WorkflowInstance.cs
- DnsEndPoint.cs
- ValidationErrorEventArgs.cs
- BinaryObjectReader.cs
- MetaType.cs
- ProtectedConfigurationProviderCollection.cs
- GlobalizationAssembly.cs
- Light.cs
- DbException.cs
- PartialCachingControl.cs
- InvalidCastException.cs
- XsltLibrary.cs
- FontFamilyIdentifier.cs
- UpdateProgress.cs
- SecUtil.cs
- ScrollableControl.cs
- AdornedElementPlaceholder.cs
- DataObject.cs
- BulletChrome.cs
- RadioButton.cs
- DrawListViewColumnHeaderEventArgs.cs
- controlskin.cs
- ValidationPropertyAttribute.cs
- TextParagraphView.cs
- mediaeventargs.cs
- CryptoApi.cs
- InspectionWorker.cs
- SiteMapProvider.cs
- UDPClient.cs
- AuthenticationModeHelper.cs
- MapPathBasedVirtualPathProvider.cs
- GenericEnumConverter.cs
- ToolStripLocationCancelEventArgs.cs
- DataSourceCache.cs
- UdpChannelListener.cs
- ScriptControl.cs
- MembershipPasswordException.cs
- SafeLibraryHandle.cs
- ConfigXmlReader.cs
- ScrollPatternIdentifiers.cs
- DbCommandDefinition.cs
- ContentHostHelper.cs
- HttpHandlerActionCollection.cs
- FlowDocumentPageViewerAutomationPeer.cs
- UserInitiatedNavigationPermission.cs
- EventSchemaTraceListener.cs
- BitArray.cs
- KerberosSecurityTokenAuthenticator.cs
- SafeProcessHandle.cs
- Annotation.cs
- AVElementHelper.cs
- FlowDocumentScrollViewer.cs
- EntityContainer.cs
- PersonalizableTypeEntry.cs
- XsdBuilder.cs
- AxHost.cs
- Label.cs
- PreservationFileReader.cs
- Menu.cs
- WebControl.cs
- DeploymentSection.cs
- ChannelPool.cs
- Latin1Encoding.cs
- __FastResourceComparer.cs
- RadioButtonDesigner.cs
- DynamicEntity.cs
- UnlockCardRequest.cs
- HtmlMeta.cs
- AlternateView.cs
- BindToObject.cs
- BitmapMetadataBlob.cs
- ListManagerBindingsCollection.cs
- XmlSchemaException.cs
- WebPartDeleteVerb.cs
- CodeThrowExceptionStatement.cs
- GenericIdentity.cs
- SettingsPropertyValueCollection.cs
- CapabilitiesState.cs
- HtmlTableCell.cs
- ObjectAssociationEndMapping.cs
- IOThreadScheduler.cs
- ThreadAttributes.cs
- Single.cs
- WinFormsComponentEditor.cs
- VectorConverter.cs
- clipboard.cs
- TraceUtils.cs
- QueryCacheKey.cs
- PageWrapper.cs
- TextElementEnumerator.cs
- OleDbErrorCollection.cs
- CellLabel.cs
- NetSectionGroup.cs
- TextBlockAutomationPeer.cs
- dtdvalidator.cs
- HttpAsyncResult.cs
- SourceFileBuildProvider.cs
- StateMachineSubscriptionManager.cs
- PrintSystemException.cs
- EndpointConfigContainer.cs