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
- ElementFactory.cs
- DbSourceCommand.cs
- ListView.cs
- propertyentry.cs
- precedingquery.cs
- _LoggingObject.cs
- DropDownButton.cs
- QilExpression.cs
- SiteMapPath.cs
- TableRow.cs
- XmlSchemaSimpleContentExtension.cs
- CodeStatement.cs
- LexicalChunk.cs
- EntitySetDataBindingList.cs
- PictureBox.cs
- LambdaCompiler.cs
- DataGridColumnCollection.cs
- CustomErrorsSectionWrapper.cs
- HttpRequest.cs
- LogLogRecordEnumerator.cs
- DrawToolTipEventArgs.cs
- ActionMismatchAddressingException.cs
- RegexFCD.cs
- NativeMethods.cs
- DateTimeConverter2.cs
- MeshGeometry3D.cs
- CodeGenerator.cs
- RequestStatusBarUpdateEventArgs.cs
- RawStylusInputReport.cs
- AnnotationComponentChooser.cs
- CustomActivityDesigner.cs
- StopStoryboard.cs
- ToolBarDesigner.cs
- UTF32Encoding.cs
- ISAPIWorkerRequest.cs
- Root.cs
- FileClassifier.cs
- SQLByteStorage.cs
- TimeoutTimer.cs
- IisTraceListener.cs
- LiteralTextContainerControlBuilder.cs
- XmlReaderDelegator.cs
- StringResourceManager.cs
- ComboBox.cs
- ForeignKeyConstraint.cs
- WmiInstallComponent.cs
- GreenMethods.cs
- Point.cs
- ListBox.cs
- Compilation.cs
- ServiceTimeoutsElement.cs
- CLRBindingWorker.cs
- SoapEnumAttribute.cs
- MenuItemStyleCollectionEditor.cs
- ByeMessageApril2005.cs
- EntityDataSourceEntityTypeFilterItem.cs
- ADMembershipUser.cs
- PropertyValue.cs
- SimpleFieldTemplateFactory.cs
- ImageField.cs
- XmlSerializerImportOptions.cs
- PieceNameHelper.cs
- WindowsGrip.cs
- FlowLayoutPanel.cs
- XPathDocument.cs
- SpecularMaterial.cs
- ClientTarget.cs
- SQLStringStorage.cs
- CursorInteropHelper.cs
- ExpressionBuilderCollection.cs
- ColumnReorderedEventArgs.cs
- SqlNodeTypeOperators.cs
- WebPartZoneBase.cs
- StateInitialization.cs
- DoubleLinkList.cs
- SeekStoryboard.cs
- TextEditorMouse.cs
- Decimal.cs
- OptimisticConcurrencyException.cs
- ApplicationInfo.cs
- UpdateCommand.cs
- TemplateComponentConnector.cs
- DataGridViewColumnTypeEditor.cs
- DataGridSortCommandEventArgs.cs
- Quad.cs
- Input.cs
- safex509handles.cs
- DescendentsWalker.cs
- RegistryExceptionHelper.cs
- Trigger.cs
- DropShadowEffect.cs
- HttpPostedFile.cs
- CharEnumerator.cs
- HttpRawResponse.cs
- DataGridViewColumnHeaderCell.cs
- LinkedList.cs
- HitTestFilterBehavior.cs
- AssemblyNameProxy.cs
- ResourceReferenceKeyNotFoundException.cs
- CorrelationValidator.cs