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
- SafeEventLogWriteHandle.cs
- SByte.cs
- HideDisabledControlAdapter.cs
- ClientConfigurationSystem.cs
- VersionedStreamOwner.cs
- TimestampInformation.cs
- RedistVersionInfo.cs
- ConfigurationSettings.cs
- Stacktrace.cs
- RedirectionProxy.cs
- PassportIdentity.cs
- _NestedSingleAsyncResult.cs
- InitializerFacet.cs
- ReflectionPermission.cs
- Matrix.cs
- WeakReadOnlyCollection.cs
- DataRecordInternal.cs
- Queue.cs
- CompositeFontInfo.cs
- BlurBitmapEffect.cs
- ScriptReference.cs
- ButtonFlatAdapter.cs
- RouteItem.cs
- SamlAttributeStatement.cs
- BufferedReadStream.cs
- IdentityNotMappedException.cs
- ManagedIStream.cs
- WebPartDescriptionCollection.cs
- SingleStorage.cs
- COM2AboutBoxPropertyDescriptor.cs
- ListViewItem.cs
- PrinterResolution.cs
- NotificationContext.cs
- ServiceControllerDesigner.cs
- OpCodes.cs
- DiagnosticTrace.cs
- Vertex.cs
- LineGeometry.cs
- ImageAttributes.cs
- ContainerAction.cs
- HtmlInputHidden.cs
- SiteMembershipCondition.cs
- SimpleHandlerFactory.cs
- ValidationError.cs
- DefaultAsyncDataDispatcher.cs
- externdll.cs
- CacheDependency.cs
- StrokeCollection2.cs
- Duration.cs
- BindingListCollectionView.cs
- MissingMethodException.cs
- FastPropertyAccessor.cs
- Vector.cs
- SafeArrayTypeMismatchException.cs
- NTAccount.cs
- DataSourceExpressionCollection.cs
- PropertyMapper.cs
- ProfileInfo.cs
- Calendar.cs
- SystemColorTracker.cs
- WpfWebRequestHelper.cs
- Rules.cs
- MachineKeySection.cs
- EventData.cs
- RegionIterator.cs
- ExceptionHandlersDesigner.cs
- DataGridViewTextBoxCell.cs
- ValuePatternIdentifiers.cs
- ServiceBusyException.cs
- AsyncWaitHandle.cs
- SortedDictionary.cs
- DirectoryInfo.cs
- DateTimeFormat.cs
- SchemaImporterExtensionElementCollection.cs
- SQLDateTime.cs
- DataGridState.cs
- SqlUtils.cs
- EventRoute.cs
- ClientSession.cs
- MonthChangedEventArgs.cs
- SqlDependency.cs
- GridViewRowEventArgs.cs
- TypeForwardedToAttribute.cs
- ZipIOCentralDirectoryFileHeader.cs
- SafeTokenHandle.cs
- Thickness.cs
- RadioButtonFlatAdapter.cs
- SoapHttpTransportImporter.cs
- DocumentPage.cs
- RectValueSerializer.cs
- FragmentQueryKB.cs
- WebPartConnectionCollection.cs
- PatternMatcher.cs
- PageHandlerFactory.cs
- EventLogWatcher.cs
- TempFiles.cs
- BidPrivateBase.cs
- IndexedString.cs
- FreeFormDesigner.cs
- FrameworkElement.cs