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
- RepeatInfo.cs
- HttpAsyncResult.cs
- RuleSetReference.cs
- SessionPageStatePersister.cs
- UserControl.cs
- CacheVirtualItemsEvent.cs
- ExecutionEngineException.cs
- WindowsToolbarAsMenu.cs
- InvokeWebService.cs
- LogicalChannel.cs
- ReadOnlyPropertyMetadata.cs
- MultitargetUtil.cs
- Adorner.cs
- OleDbRowUpdatingEvent.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- TCEAdapterGenerator.cs
- ExcCanonicalXml.cs
- TextReturnReader.cs
- DependencyPropertyKind.cs
- PolygonHotSpot.cs
- GrammarBuilder.cs
- UMPAttributes.cs
- MailDefinition.cs
- ProfileBuildProvider.cs
- ProtocolsConfiguration.cs
- SettingsBase.cs
- BatchWriter.cs
- ContextStack.cs
- StyleModeStack.cs
- ConstraintEnumerator.cs
- ListView.cs
- AdornedElementPlaceholder.cs
- SizeIndependentAnimationStorage.cs
- InheritanceContextHelper.cs
- FrugalMap.cs
- XmlQualifiedName.cs
- TextPointerBase.cs
- DataGridHyperlinkColumn.cs
- CodeDelegateInvokeExpression.cs
- ColorConvertedBitmap.cs
- WebPartConnectionsConnectVerb.cs
- BaseAutoFormat.cs
- PagesSection.cs
- DataGridTextBox.cs
- SocketException.cs
- _BasicClient.cs
- LineMetrics.cs
- TreeNodeStyle.cs
- CorePropertiesFilter.cs
- COMException.cs
- MdiWindowListStrip.cs
- Crypto.cs
- BrowserCapabilitiesFactory.cs
- ExternalFile.cs
- StyleSheetDesigner.cs
- MimeObjectFactory.cs
- XmlStreamStore.cs
- ByteStack.cs
- DriveInfo.cs
- HtmlTableCellCollection.cs
- QuerySettings.cs
- StorageRoot.cs
- IssuerInformation.cs
- HttpServerUtilityBase.cs
- SafePEFileHandle.cs
- MethodExpr.cs
- StaticFileHandler.cs
- EntitySet.cs
- CodeCompileUnit.cs
- SchemaCollectionCompiler.cs
- ManifestResourceInfo.cs
- WindowsListViewGroupSubsetLink.cs
- DataObjectCopyingEventArgs.cs
- XmlNodeChangedEventArgs.cs
- TagMapInfo.cs
- _PooledStream.cs
- EdmError.cs
- TreeNodeCollection.cs
- XPathMessageFilterElementComparer.cs
- SaveFileDialog.cs
- ConnectionStringsExpressionBuilder.cs
- StateRuntime.cs
- DataException.cs
- WebConfigurationHost.cs
- StrokeRenderer.cs
- elementinformation.cs
- WorkerRequest.cs
- ClientData.cs
- CacheModeConverter.cs
- ControlCachePolicy.cs
- EventToken.cs
- UriParserTemplates.cs
- DataGridViewDataConnection.cs
- Utils.cs
- StringArrayConverter.cs
- PropertyItemInternal.cs
- RecordsAffectedEventArgs.cs
- ConditionalAttribute.cs
- SocketInformation.cs
- DelegatedStream.cs