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
- DuplicateWaitObjectException.cs
- BaseValidatorDesigner.cs
- CardSpaceSelector.cs
- DataTableNewRowEvent.cs
- Scripts.cs
- UpdatePanel.cs
- FileSystemWatcher.cs
- CompModSwitches.cs
- Row.cs
- PerformanceCounterLib.cs
- ScriptComponentDescriptor.cs
- TextLineBreak.cs
- Int32.cs
- CommandPlan.cs
- UserControl.cs
- DeviceFilterDictionary.cs
- MimeWriter.cs
- RTTrackingProfile.cs
- SqlCacheDependencyDatabaseCollection.cs
- AutomationProperties.cs
- FixedSOMContainer.cs
- FileDialogCustomPlaces.cs
- DataServiceProcessingPipeline.cs
- Int16KeyFrameCollection.cs
- Preprocessor.cs
- ToolStripItemTextRenderEventArgs.cs
- EventMap.cs
- ImportCatalogPart.cs
- WebPartPersonalization.cs
- ActiveDesignSurfaceEvent.cs
- ListBox.cs
- DispatcherExceptionFilterEventArgs.cs
- RuntimeEnvironment.cs
- WinInetCache.cs
- ListChangedEventArgs.cs
- baseaxisquery.cs
- AssociationProvider.cs
- WebPartConnectionCollection.cs
- DesignerView.xaml.cs
- AxHost.cs
- ComponentManagerBroker.cs
- ToolStripDropDownButton.cs
- PagePropertiesChangingEventArgs.cs
- SystemParameters.cs
- DataControlHelper.cs
- XmlResolver.cs
- basevalidator.cs
- RecordsAffectedEventArgs.cs
- DisplayMemberTemplateSelector.cs
- SqlCommand.cs
- HttpHostedTransportConfiguration.cs
- LicenseContext.cs
- TreeBuilderXamlTranslator.cs
- LinkUtilities.cs
- WmiPutTraceRecord.cs
- HeaderUtility.cs
- TraceProvider.cs
- SerializableAttribute.cs
- SerializationStore.cs
- brushes.cs
- ApplyImportsAction.cs
- MD5CryptoServiceProvider.cs
- GenerateScriptTypeAttribute.cs
- SelectionRangeConverter.cs
- PrinterSettings.cs
- FileSystemEventArgs.cs
- GridViewHeaderRowPresenter.cs
- CommentEmitter.cs
- XmlDocumentSurrogate.cs
- WindowsFormsSynchronizationContext.cs
- UrlMappingsSection.cs
- Point3DCollection.cs
- TransactionChannelListener.cs
- ServiceBehaviorElementCollection.cs
- ComAdminWrapper.cs
- RuntimeEnvironment.cs
- PerformanceCounterNameAttribute.cs
- BitmapEffect.cs
- SessionStateUtil.cs
- WithStatement.cs
- COM2IProvidePropertyBuilderHandler.cs
- OverflowException.cs
- __Error.cs
- AutoGeneratedField.cs
- RequestNavigateEventArgs.cs
- Codec.cs
- Point4DConverter.cs
- EventLogPermissionAttribute.cs
- UnsafeNativeMethods.cs
- CacheDict.cs
- TextStore.cs
- Normalization.cs
- BlurEffect.cs
- HttpCacheParams.cs
- ExpressionBuilder.cs
- ServerIdentity.cs
- _DisconnectOverlappedAsyncResult.cs
- SymmetricSecurityBindingElement.cs
- Subtree.cs
- ZipPackagePart.cs