Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- HostUtils.cs
- CustomErrorsSectionWrapper.cs
- BypassElement.cs
- Int32Storage.cs
- securitycriticaldataformultiplegetandset.cs
- WebPartEditorApplyVerb.cs
- PeoplePickerWrapper.cs
- FilteredDataSetHelper.cs
- TriggerActionCollection.cs
- DocumentPageHost.cs
- WindowsGraphics.cs
- PermissionSetTriple.cs
- SimpleModelProvider.cs
- GeneralTransformGroup.cs
- DLinqTableProvider.cs
- ToolTipService.cs
- WebBrowserNavigatingEventHandler.cs
- WebReferencesBuildProvider.cs
- MessageDroppedTraceRecord.cs
- ListControlConvertEventArgs.cs
- ToolTipAutomationPeer.cs
- SemanticKeyElement.cs
- ConfigurationSectionGroupCollection.cs
- TempFiles.cs
- WebPartCatalogAddVerb.cs
- MatrixAnimationUsingKeyFrames.cs
- QuerySubExprEliminator.cs
- AliasedSlot.cs
- ComponentFactoryHelpers.cs
- WebBrowserSiteBase.cs
- TraceContextRecord.cs
- ItemsChangedEventArgs.cs
- ImplicitInputBrush.cs
- CompilationUtil.cs
- HttpHeaderCollection.cs
- GcSettings.cs
- State.cs
- TrackBarRenderer.cs
- AutomationPeer.cs
- SamlAssertionKeyIdentifierClause.cs
- _ChunkParse.cs
- RemoteWebConfigurationHostStream.cs
- FontEmbeddingManager.cs
- MsmqIntegrationSecurity.cs
- EndCreateSecurityTokenRequest.cs
- DataBindEngine.cs
- TextSpan.cs
- SoapServerMessage.cs
- PrintPageEvent.cs
- CompilerError.cs
- SplitterCancelEvent.cs
- ConnectionManagementSection.cs
- PoisonMessageException.cs
- SafeHandle.cs
- SqlDataSourceFilteringEventArgs.cs
- MailDefinition.cs
- ContextProperty.cs
- ObservableCollectionDefaultValueFactory.cs
- SafeSecurityHelper.cs
- ZoneLinkButton.cs
- ToolStripHighContrastRenderer.cs
- RoleExceptions.cs
- SystemIPGlobalStatistics.cs
- SqlBulkCopyColumnMappingCollection.cs
- AttachedPropertyDescriptor.cs
- DbModificationClause.cs
- PropertyPathConverter.cs
- EditCommandColumn.cs
- DeclarationUpdate.cs
- OrderPreservingMergeHelper.cs
- InkSerializer.cs
- SignerInfo.cs
- SqlDataSourceFilteringEventArgs.cs
- HelpProvider.cs
- WinEventHandler.cs
- ProviderConnectionPointCollection.cs
- TypeUtil.cs
- NavigatingCancelEventArgs.cs
- ISCIIEncoding.cs
- StringCollectionEditor.cs
- ColumnCollection.cs
- HtmlElementErrorEventArgs.cs
- ContextToken.cs
- MetadataCache.cs
- TextPenaltyModule.cs
- CompositeCollection.cs
- TypeConverterValueSerializer.cs
- Vector3DConverter.cs
- BooleanKeyFrameCollection.cs
- UnsafeNativeMethods.cs
- DefaultSettingsSection.cs
- MapPathBasedVirtualPathProvider.cs
- RuleConditionDialog.cs
- BrowserCapabilitiesCompiler.cs
- LinearKeyFrames.cs
- HttpChannelHelper.cs
- ConfigUtil.cs
- ToolStripItemRenderEventArgs.cs
- SoapSchemaMember.cs
- TextEncodedRawTextWriter.cs