Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- InfoCardAsymmetricCrypto.cs
- SqlFlattener.cs
- DesignerValidationSummaryAdapter.cs
- StdValidatorsAndConverters.cs
- WebServiceClientProxyGenerator.cs
- QilGenerator.cs
- ReadOnlyTernaryTree.cs
- TrackBarDesigner.cs
- documentsequencetextpointer.cs
- ContentTypeSettingDispatchMessageFormatter.cs
- TypeForwardedToAttribute.cs
- CachedRequestParams.cs
- ObjectContextServiceProvider.cs
- LinqDataSource.cs
- PrintDialogDesigner.cs
- FileSecurity.cs
- XmlILTrace.cs
- AdornerPresentationContext.cs
- MailAddress.cs
- OleDbCommand.cs
- AggregateNode.cs
- Utils.cs
- PropertyRef.cs
- KeyNotFoundException.cs
- ThreadInterruptedException.cs
- DelegatingConfigHost.cs
- MemberMemberBinding.cs
- CodeIdentifiers.cs
- BasePropertyDescriptor.cs
- RecommendedAsConfigurableAttribute.cs
- WorkflowViewStateService.cs
- XmlHierarchyData.cs
- TaskDesigner.cs
- TextShapeableCharacters.cs
- ChameleonKey.cs
- PropertyCondition.cs
- Math.cs
- CodeTypeParameterCollection.cs
- EndpointDispatcherTable.cs
- AssemblyInfo.cs
- CustomBinding.cs
- Utilities.cs
- HostedImpersonationContext.cs
- DataTableMappingCollection.cs
- RuntimeResourceSet.cs
- XmlQueryType.cs
- BaseValidatorDesigner.cs
- DES.cs
- ConfigXmlAttribute.cs
- EventData.cs
- FormViewDeletedEventArgs.cs
- ProfileSection.cs
- SocketElement.cs
- LockCookie.cs
- ValidationError.cs
- ObjectSpanRewriter.cs
- EventPrivateKey.cs
- ToolStripDesignerUtils.cs
- WorkflowOperationErrorHandler.cs
- TCEAdapterGenerator.cs
- ByteStreamGeometryContext.cs
- ConsumerConnectionPoint.cs
- EventListener.cs
- BufferModeSettings.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- IdleTimeoutMonitor.cs
- SplineKeyFrames.cs
- adornercollection.cs
- AndAlso.cs
- CodeDirectoryCompiler.cs
- X509WindowsSecurityToken.cs
- CombinedGeometry.cs
- WebPartCloseVerb.cs
- StrokeNode.cs
- NetCodeGroup.cs
- TextElement.cs
- AsnEncodedData.cs
- Trace.cs
- HttpCachePolicy.cs
- WebControlAdapter.cs
- TextSpan.cs
- MSAAWinEventWrap.cs
- TypeHelpers.cs
- diagnosticsswitches.cs
- UnitControl.cs
- RegexMatchCollection.cs
- HandleExceptionArgs.cs
- Timeline.cs
- ItemsPresenter.cs
- Transactions.cs
- ConnectionPoint.cs
- PageRequestManager.cs
- CompensationDesigner.cs
- SystemInfo.cs
- mediapermission.cs
- SecurityBindingElement.cs
- PathGeometry.cs
- DoubleAverageAggregationOperator.cs
- AttributeCollection.cs
- IPPacketInformation.cs