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
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlFormatWriterGenerator.cs
- PictureBox.cs
- _KerberosClient.cs
- EventWaitHandleSecurity.cs
- NamedPipeProcessProtocolHandler.cs
- PenThreadWorker.cs
- FileVersionInfo.cs
- SafeNativeMethods.cs
- Baml2006KnownTypes.cs
- ControlCachePolicy.cs
- CacheChildrenQuery.cs
- AssemblyInfo.cs
- TrackingQuery.cs
- GridSplitterAutomationPeer.cs
- LinqDataSourceView.cs
- EventLogTraceListener.cs
- WinFormsSecurity.cs
- Span.cs
- UiaCoreProviderApi.cs
- TextTreeObjectNode.cs
- BaseComponentEditor.cs
- ToolStripSplitButton.cs
- StdValidatorsAndConverters.cs
- BaseHashHelper.cs
- SessionPageStateSection.cs
- RegexCompilationInfo.cs
- Or.cs
- DataMemberFieldConverter.cs
- DispatcherHookEventArgs.cs
- StateMachine.cs
- MsmqInputMessage.cs
- IntPtr.cs
- AddInEnvironment.cs
- RequestCache.cs
- DurableInstanceContextProvider.cs
- FlowDocument.cs
- Stroke.cs
- Parser.cs
- KerberosTokenFactoryCredential.cs
- PeerInvitationResponse.cs
- DataGridViewImageColumn.cs
- WindowsGraphics.cs
- Rect3DConverter.cs
- MetafileEditor.cs
- Int16Converter.cs
- Vector3DValueSerializer.cs
- TextBox.cs
- Util.cs
- EditingCoordinator.cs
- Latin1Encoding.cs
- TypeResolver.cs
- NameValuePair.cs
- HttpChannelBindingToken.cs
- AuthenticationService.cs
- WindowsSpinner.cs
- NullPackagingPolicy.cs
- FilterRepeater.cs
- DataControlImageButton.cs
- WeakReferenceEnumerator.cs
- EdmRelationshipRoleAttribute.cs
- UrlAuthorizationModule.cs
- SystemWebSectionGroup.cs
- EastAsianLunisolarCalendar.cs
- SqlClientWrapperSmiStreamChars.cs
- KeyMatchBuilder.cs
- StreamingContext.cs
- ConfigurationElement.cs
- TabItemAutomationPeer.cs
- IERequestCache.cs
- DataGridViewCellFormattingEventArgs.cs
- BindingExpression.cs
- OutArgument.cs
- CompoundFileStreamReference.cs
- String.cs
- RewritingSimplifier.cs
- ParagraphVisual.cs
- SpellCheck.cs
- CancelEventArgs.cs
- CachedRequestParams.cs
- VisualStateGroup.cs
- RuleValidation.cs
- Debugger.cs
- ValidationEventArgs.cs
- BamlReader.cs
- NodeFunctions.cs
- XmlIlTypeHelper.cs
- ChannelOptions.cs
- XmlSchemaComplexContentRestriction.cs
- XmlSerializer.cs
- TimeSpanValidator.cs
- XmlToDatasetMap.cs
- IgnoreSection.cs
- SynchronizedDisposablePool.cs
- PrtTicket_Public_Simple.cs
- ImageCodecInfo.cs
- Tablet.cs
- TextDecorationCollection.cs
- CheckBoxFlatAdapter.cs
- CellTreeNode.cs
- diagnosticsswitches.cs