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
- LicenseProviderAttribute.cs
- Root.cs
- TcpTransportSecurity.cs
- IdentityReference.cs
- HtmlInputFile.cs
- PathGeometry.cs
- XPathNodeList.cs
- RectangleF.cs
- RemoteWebConfigurationHostStream.cs
- RemotingAttributes.cs
- BCryptNative.cs
- HandlerMappingMemo.cs
- AssemblyHash.cs
- _UriSyntax.cs
- NumericUpDownAccelerationCollection.cs
- StylusButtonCollection.cs
- BindValidator.cs
- DynamicFilterExpression.cs
- DbConnectionPoolGroup.cs
- HtmlInputSubmit.cs
- Light.cs
- RegistryPermission.cs
- PathFigure.cs
- SoapSchemaExporter.cs
- DataGridViewLinkColumn.cs
- TokenFactoryFactory.cs
- ResizeGrip.cs
- columnmapkeybuilder.cs
- DetailsViewModeEventArgs.cs
- ErrorWrapper.cs
- DeleteCardRequest.cs
- ClientRoleProvider.cs
- TableItemPattern.cs
- LogStream.cs
- SqlInternalConnectionTds.cs
- TemplateParser.cs
- ApplicationCommands.cs
- PropertyGridCommands.cs
- MaskInputRejectedEventArgs.cs
- ClientConvert.cs
- RecordsAffectedEventArgs.cs
- SqlParameterCollection.cs
- RuleSetReference.cs
- SymDocumentType.cs
- DecimalStorage.cs
- LinkButton.cs
- LineGeometry.cs
- StateRuntime.cs
- SQLGuidStorage.cs
- ScriptReferenceBase.cs
- WindowsStartMenu.cs
- ListSortDescription.cs
- TargetParameterCountException.cs
- TextSyndicationContentKindHelper.cs
- LongValidatorAttribute.cs
- DescendantOverDescendantQuery.cs
- XmlAutoDetectWriter.cs
- NetworkInterface.cs
- AutomationProperty.cs
- SafeBitVector32.cs
- ProcessThreadCollection.cs
- XmlComment.cs
- PermissionAttributes.cs
- EntityViewGenerationAttribute.cs
- ConsoleKeyInfo.cs
- Run.cs
- StrokeNode.cs
- MoveSizeWinEventHandler.cs
- PrimitiveType.cs
- PageContentCollection.cs
- DocumentApplicationJournalEntry.cs
- documentsequencetextcontainer.cs
- TextServicesPropertyRanges.cs
- NumberAction.cs
- WeakRefEnumerator.cs
- InitializationEventAttribute.cs
- RightsManagementEncryptedStream.cs
- PeerNameResolver.cs
- XPathAxisIterator.cs
- Accessible.cs
- GenerateTemporaryTargetAssembly.cs
- SafeLibraryHandle.cs
- ProcessingInstructionAction.cs
- ProcessInfo.cs
- SystemKeyConverter.cs
- SafeCoTaskMem.cs
- BufferedWebEventProvider.cs
- SecurityHelper.cs
- RsaSecurityKey.cs
- DoubleConverter.cs
- ListViewSelectEventArgs.cs
- AppSettingsSection.cs
- DSASignatureDeformatter.cs
- DictionarySectionHandler.cs
- Canvas.cs
- XmlDocumentSurrogate.cs
- ISFTagAndGuidCache.cs
- MimeObjectFactory.cs
- ValueTable.cs
- EncodingTable.cs