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
- SynchronizedChannelCollection.cs
- SourceSwitch.cs
- RangeContentEnumerator.cs
- PeerNameRecord.cs
- Stack.cs
- ListSortDescription.cs
- input.cs
- ComponentDispatcherThread.cs
- TextDecorationCollection.cs
- ModelItemDictionary.cs
- Point.cs
- PlaceHolder.cs
- XmlFormatReaderGenerator.cs
- ControlCollection.cs
- TimeSpan.cs
- _AutoWebProxyScriptWrapper.cs
- MsmqIntegrationProcessProtocolHandler.cs
- PersonalizationStateInfoCollection.cs
- EditBehavior.cs
- PersonalizableTypeEntry.cs
- SafeNativeMethodsMilCoreApi.cs
- SQLChars.cs
- WebPartHelpVerb.cs
- TextUtf8RawTextWriter.cs
- JsonServiceDocumentSerializer.cs
- printdlgexmarshaler.cs
- TranslateTransform3D.cs
- InputReportEventArgs.cs
- streamingZipPartStream.cs
- ImplicitInputBrush.cs
- Stroke2.cs
- UnsafeNetInfoNativeMethods.cs
- PropertyDescriptorCollection.cs
- CodeTypeMemberCollection.cs
- SqlColumnizer.cs
- DataGridViewCellLinkedList.cs
- TabItemWrapperAutomationPeer.cs
- ExpressionBindingCollection.cs
- DelayedRegex.cs
- CodeAttachEventStatement.cs
- Comparer.cs
- CaseDesigner.xaml.cs
- ZoomingMessageFilter.cs
- TextFormatterHost.cs
- CommandHelpers.cs
- _KerberosClient.cs
- ClassHandlersStore.cs
- LogSwitch.cs
- StatusBarItem.cs
- DaylightTime.cs
- XamlInt32CollectionSerializer.cs
- SeekStoryboard.cs
- LayoutInformation.cs
- EntitySet.cs
- PackWebResponse.cs
- Encoder.cs
- BuildProvider.cs
- CodeGeneratorOptions.cs
- OAVariantLib.cs
- ArcSegment.cs
- ObjectSet.cs
- HwndSource.cs
- _LocalDataStore.cs
- AssemblyAttributesGoHere.cs
- StateMachineWorkflow.cs
- ClickablePoint.cs
- DelegatedStream.cs
- StatusBar.cs
- MediaElement.cs
- Compress.cs
- ContainsRowNumberChecker.cs
- TextAction.cs
- PointAnimation.cs
- Stream.cs
- DependsOnAttribute.cs
- LastQueryOperator.cs
- ButtonBase.cs
- RouteParametersHelper.cs
- LocalBuilder.cs
- ReferenceEqualityComparer.cs
- RegisteredHiddenField.cs
- SplitterCancelEvent.cs
- SqlConnectionFactory.cs
- Animatable.cs
- XmlConvert.cs
- SpellCheck.cs
- XmlDeclaration.cs
- SystemBrushes.cs
- Symbol.cs
- SamlAssertionKeyIdentifierClause.cs
- TdsParameterSetter.cs
- PointLightBase.cs
- WindowsFormsHelpers.cs
- EventSchemaTraceListener.cs
- XmlWriterSettings.cs
- RepeatBehavior.cs
- RegisteredScript.cs
- ObjectAnimationUsingKeyFrames.cs
- WindowsFormsSectionHandler.cs
- DrawingDrawingContext.cs