Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / MS / Internal / AppModel / securitymgrsite.cs / 1305600 / 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
- PerformanceCountersElement.cs
- ReadOnlyCollectionBase.cs
- ScopeCollection.cs
- IPCCacheManager.cs
- FileUtil.cs
- Request.cs
- SubqueryRules.cs
- DashStyles.cs
- WebControlAdapter.cs
- PrimaryKeyTypeConverter.cs
- WindowsAuthenticationModule.cs
- StringUtil.cs
- FixedSOMTableRow.cs
- QueryInterceptorAttribute.cs
- HiddenFieldPageStatePersister.cs
- AspCompat.cs
- ExceptionUtility.cs
- SessionSwitchEventArgs.cs
- AddressHeader.cs
- SQLBytesStorage.cs
- updatecommandorderer.cs
- DbMetaDataFactory.cs
- TrustManager.cs
- XmlILTrace.cs
- ModuleElement.cs
- StringDictionaryWithComparer.cs
- BrowserDefinition.cs
- DefaultProxySection.cs
- SqlPersonalizationProvider.cs
- SettingsPropertyValueCollection.cs
- XpsInterleavingPolicy.cs
- MDIClient.cs
- EntityCommandDefinition.cs
- ISCIIEncoding.cs
- SplineKeyFrames.cs
- TableRowGroupCollection.cs
- TreeNodeEventArgs.cs
- SHA256Managed.cs
- EventWaitHandle.cs
- DateTimePicker.cs
- XmlWhitespace.cs
- CultureInfo.cs
- ObjectRef.cs
- CustomCategoryAttribute.cs
- httpserverutility.cs
- ProcessRequestArgs.cs
- Row.cs
- CancelRequestedRecord.cs
- TagPrefixAttribute.cs
- SqlRetyper.cs
- DummyDataSource.cs
- BinaryObjectWriter.cs
- SharedDp.cs
- TableItemPattern.cs
- RequestStatusBarUpdateEventArgs.cs
- SafeEventHandle.cs
- FilterException.cs
- Vector3D.cs
- AssemblyInfo.cs
- StringFormat.cs
- Light.cs
- SystemFonts.cs
- RectangleGeometry.cs
- CellCreator.cs
- SystemIcmpV6Statistics.cs
- DataGridViewTopRowAccessibleObject.cs
- ContentOperations.cs
- Operand.cs
- ThrowOnMultipleAssignment.cs
- DataReaderContainer.cs
- SchemaElement.cs
- Vector3dCollection.cs
- SoapIncludeAttribute.cs
- WriteFileContext.cs
- PathStreamGeometryContext.cs
- MediaContextNotificationWindow.cs
- InputManager.cs
- ClientScriptManagerWrapper.cs
- ChtmlFormAdapter.cs
- basemetadatamappingvisitor.cs
- DispatcherFrame.cs
- PartialCachingControl.cs
- ProfessionalColorTable.cs
- GeometryCollection.cs
- InvalidOperationException.cs
- PointValueSerializer.cs
- CellNormalizer.cs
- DataTablePropertyDescriptor.cs
- DispatcherOperation.cs
- CheckoutException.cs
- MailHeaderInfo.cs
- SQLGuid.cs
- SiteMapProvider.cs
- SelectionHighlightInfo.cs
- MeasureItemEvent.cs
- ITextView.cs
- BamlResourceDeserializer.cs
- OLEDB_Enum.cs
- ListViewTableRow.cs
- SupportedAddressingMode.cs