Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- Emitter.cs
- Imaging.cs
- _UriSyntax.cs
- MetadataArtifactLoaderCompositeResource.cs
- SiteMapDataSource.cs
- SqlConnectionFactory.cs
- IdentityModelStringsVersion1.cs
- ExtensionSimplifierMarkupObject.cs
- ListBoxItemAutomationPeer.cs
- SqlXmlStorage.cs
- TextProperties.cs
- SupportsEventValidationAttribute.cs
- WebPart.cs
- ObjectReaderCompiler.cs
- ImageClickEventArgs.cs
- TraceHwndHost.cs
- RegexCapture.cs
- Message.cs
- MoveSizeWinEventHandler.cs
- RenderDataDrawingContext.cs
- TextSearch.cs
- SmiEventSink.cs
- WindowsRebar.cs
- XmlSchemaObject.cs
- FrameworkContentElementAutomationPeer.cs
- EditBehavior.cs
- ValidatingReaderNodeData.cs
- ScrollChangedEventArgs.cs
- TextRangeEdit.cs
- EventListener.cs
- XmlEncoding.cs
- TimelineClockCollection.cs
- DllNotFoundException.cs
- ExtensionElementCollection.cs
- CacheVirtualItemsEvent.cs
- XmlTextReaderImpl.cs
- PopupEventArgs.cs
- ObjectSet.cs
- NativeMethods.cs
- ListSortDescription.cs
- ScriptingJsonSerializationSection.cs
- FillErrorEventArgs.cs
- WorkflowCommandExtensionItem.cs
- ErrorWebPart.cs
- GetImportFileNameRequest.cs
- MemoryResponseElement.cs
- SerialPinChanges.cs
- PageTheme.cs
- xmlglyphRunInfo.cs
- Light.cs
- InvalidStoreProtectionKeyException.cs
- ViewValidator.cs
- DataSourceXmlSerializationAttribute.cs
- DictionaryBase.cs
- PropertyValueUIItem.cs
- CodeArgumentReferenceExpression.cs
- BaseCodeDomTreeGenerator.cs
- FixedDSBuilder.cs
- SymmetricAlgorithm.cs
- PrintDialog.cs
- WriteTimeStream.cs
- XmlBuffer.cs
- LinqDataSourceContextEventArgs.cs
- uribuilder.cs
- PropertyConverter.cs
- DataControlFieldHeaderCell.cs
- TrustLevelCollection.cs
- XmlResolver.cs
- OpenFileDialog.cs
- Form.cs
- CreateUserWizard.cs
- SmiEventSink_DeferedProcessing.cs
- DataGridViewTextBoxColumn.cs
- DockEditor.cs
- InternalTypeHelper.cs
- AccessDataSourceDesigner.cs
- NavigationWindowAutomationPeer.cs
- FormViewModeEventArgs.cs
- OwnerDrawPropertyBag.cs
- DPCustomTypeDescriptor.cs
- AppearanceEditorPart.cs
- ReaderContextStackData.cs
- SubclassTypeValidator.cs
- MultiSelector.cs
- SpellerHighlightLayer.cs
- CustomCategoryAttribute.cs
- VariantWrapper.cs
- RightsManagementPermission.cs
- DefaultPropertyAttribute.cs
- ConstraintStruct.cs
- loginstatus.cs
- ProfessionalColors.cs
- CSharpCodeProvider.cs
- ProcessManager.cs
- UnmanagedMemoryStreamWrapper.cs
- Rotation3DAnimationBase.cs
- HashAlgorithm.cs
- CollectionViewSource.cs
- AssociationSetMetadata.cs
- BufferManager.cs