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
- MultipleCopiesCollection.cs
- BeginStoryboard.cs
- BindingOperations.cs
- HierarchicalDataBoundControlAdapter.cs
- TaiwanLunisolarCalendar.cs
- DateTimeConverter.cs
- DbParameterHelper.cs
- Columns.cs
- FloaterParagraph.cs
- Accessors.cs
- ConfigurationStrings.cs
- GradientStopCollection.cs
- Pair.cs
- Control.cs
- localization.cs
- ReadOnlyCollectionBase.cs
- GreenMethods.cs
- XmlSchemaObjectCollection.cs
- ProjectedWrapper.cs
- WindowsSysHeader.cs
- SerializationAttributes.cs
- ScriptMethodAttribute.cs
- X509SecurityTokenAuthenticator.cs
- BoundsDrawingContextWalker.cs
- PrintPreviewGraphics.cs
- SecurityTokenAuthenticator.cs
- WizardPanelChangingEventArgs.cs
- ObjectNavigationPropertyMapping.cs
- ServiceOperationViewControl.cs
- SafeNativeMethods.cs
- BamlReader.cs
- WasAdminWrapper.cs
- XmlDictionaryReader.cs
- SapiInterop.cs
- HtmlImage.cs
- EditorResources.cs
- WebPartChrome.cs
- XPathBinder.cs
- HashMembershipCondition.cs
- NativeRecognizer.cs
- TreeBuilder.cs
- XmlNodeList.cs
- DateTimeConstantAttribute.cs
- COM2PictureConverter.cs
- ServiceOperation.cs
- SaveFileDialog.cs
- XslNumber.cs
- DictionaryKeyPropertyAttribute.cs
- _Rfc2616CacheValidators.cs
- ListViewContainer.cs
- OperationResponse.cs
- RequestCache.cs
- Bold.cs
- EntityFunctions.cs
- ValueExpressions.cs
- PropertyMapper.cs
- RouteParameter.cs
- UrlUtility.cs
- DbException.cs
- WorkflowStateRollbackService.cs
- InvariantComparer.cs
- WrappedIUnknown.cs
- XmlSchemaResource.cs
- DomNameTable.cs
- ToolStripItemTextRenderEventArgs.cs
- TypeUtils.cs
- FormsIdentity.cs
- SecurityResources.cs
- BinaryNode.cs
- WebPartAuthorizationEventArgs.cs
- SystemWebSectionGroup.cs
- ConnectionManagementElementCollection.cs
- SafeNativeMethods.cs
- ContractSearchPattern.cs
- PolyQuadraticBezierSegment.cs
- TriggerActionCollection.cs
- TogglePatternIdentifiers.cs
- CodeVariableDeclarationStatement.cs
- SQLGuid.cs
- StringDictionary.cs
- WSFederationHttpBindingCollectionElement.cs
- HeaderUtility.cs
- PenLineCapValidation.cs
- OAVariantLib.cs
- SignedXml.cs
- OdbcParameter.cs
- RequestCachePolicy.cs
- CodeSnippetTypeMember.cs
- AffineTransform3D.cs
- RelationshipEndCollection.cs
- EdmType.cs
- SoapReflectionImporter.cs
- ConfigXmlText.cs
- ControlPaint.cs
- ViewCellRelation.cs
- BuildProviderAppliesToAttribute.cs
- SamlDelegatingWriter.cs
- RadioButtonDesigner.cs
- LeaseManager.cs
- DesignerTransactionCloseEvent.cs