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
- HttpServerVarsCollection.cs
- SelectionEditor.cs
- HtmlFormWrapper.cs
- TraceInternal.cs
- MarginsConverter.cs
- XmlLinkedNode.cs
- _PooledStream.cs
- WaitForChangedResult.cs
- ResourceExpressionBuilder.cs
- _SSPISessionCache.cs
- TextFormattingConverter.cs
- ComplexObject.cs
- MenuTracker.cs
- ColorTranslator.cs
- MemberAccessException.cs
- UshortList2.cs
- FormCollection.cs
- COAUTHIDENTITY.cs
- XmlSchemaCollection.cs
- TransformedBitmap.cs
- Decoder.cs
- VectorValueSerializer.cs
- XamlStream.cs
- StagingAreaInputItem.cs
- NTAccount.cs
- OverflowException.cs
- StateWorkerRequest.cs
- HybridDictionary.cs
- FlowPanelDesigner.cs
- ArcSegment.cs
- GPPOINTF.cs
- AttachedPropertyDescriptor.cs
- PartitionResolver.cs
- Parameter.cs
- SourceChangedEventArgs.cs
- SizeConverter.cs
- DbDataAdapter.cs
- ValueChangedEventManager.cs
- DNS.cs
- SecurityRequiresReviewAttribute.cs
- DotExpr.cs
- StaticTextPointer.cs
- SqlParameterizer.cs
- DetailsViewRow.cs
- KeyGestureConverter.cs
- TouchesOverProperty.cs
- DataKeyCollection.cs
- Message.cs
- ToolStripDropDownClosedEventArgs.cs
- Type.cs
- Compiler.cs
- TextRangeEditTables.cs
- OleDbCommandBuilder.cs
- ProxyWebPart.cs
- _ServiceNameStore.cs
- SwitchElementsCollection.cs
- ActivityExecutionContextCollection.cs
- EllipseGeometry.cs
- UnsafeNativeMethods.cs
- BitStack.cs
- SoapReflectionImporter.cs
- CodeRegionDirective.cs
- FullTrustAssembliesSection.cs
- AnnotationHelper.cs
- TransactionFlowElement.cs
- HttpStreamXmlDictionaryWriter.cs
- SafeTimerHandle.cs
- ISAPIWorkerRequest.cs
- Effect.cs
- ReadOnlyDataSourceView.cs
- RemotingException.cs
- XmlSchemaParticle.cs
- SizeAnimationUsingKeyFrames.cs
- CodeParameterDeclarationExpressionCollection.cs
- HostingEnvironmentException.cs
- SerialErrors.cs
- GroupDescription.cs
- SimpleBitVector32.cs
- CodeTypeReference.cs
- GrammarBuilderPhrase.cs
- xmlformatgeneratorstatics.cs
- ConfigXmlSignificantWhitespace.cs
- ImportOptions.cs
- FieldBuilder.cs
- ScrollChangedEventArgs.cs
- EntityUtil.cs
- DataControlImageButton.cs
- DesignTimeParseData.cs
- SequenceNumber.cs
- UrlPropertyAttribute.cs
- ConfigurationManagerInternalFactory.cs
- SafeCoTaskMem.cs
- ClientTargetCollection.cs
- StackOverflowException.cs
- smtppermission.cs
- ScriptRegistrationManager.cs
- FontStretches.cs
- InternalCache.cs
- SerializationObjectManager.cs
- ContentElement.cs