Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / NetworkInformation / SafeCancelMibChangeNotify.cs / 1305376 / SafeCancelMibChangeNotify.cs
using System; using System.Security; using Microsoft.Win32.SafeHandles; namespace System.Net.NetworkInformation { // This class guarantees that any in-progress notifications will be canceled before the AppDomain gets unloaded. // CancelMibChangeNotify2 guarantees that after it returns, the callback will NEVER be called. It may block // for a small amount of time if the callback is currently in progress, which is fine (and, intentional). [SuppressUnmanagedCodeSecurity] internal class SafeCancelMibChangeNotify : SafeHandleZeroOrMinusOneIsInvalid { public SafeCancelMibChangeNotify() : base(true) { } protected override bool ReleaseHandle() { uint err = UnsafeNetInfoNativeMethods.CancelMibChangeNotify2(base.handle); base.handle = IntPtr.Zero; return (err == UnsafeNclNativeMethods.ErrorCodes.ERROR_SUCCESS); } } } // 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
- BinaryExpressionHelper.cs
- SamlNameIdentifierClaimResource.cs
- SqlUtils.cs
- PageStatePersister.cs
- ListViewGroupItemCollection.cs
- ManifestSignatureInformation.cs
- BasicViewGenerator.cs
- TextOnlyOutput.cs
- Inline.cs
- EventItfInfo.cs
- AffineTransform3D.cs
- PhysicalOps.cs
- SkipQueryOptionExpression.cs
- AbstractExpressions.cs
- TextDecorationCollection.cs
- KnownTypesProvider.cs
- List.cs
- Delegate.cs
- X509Certificate2.cs
- SafeNativeMemoryHandle.cs
- TaskFormBase.cs
- AutoResetEvent.cs
- JournalNavigationScope.cs
- MenuAdapter.cs
- SortAction.cs
- CodeAttributeDeclaration.cs
- ObjectRef.cs
- RepeaterCommandEventArgs.cs
- DesignerValidatorAdapter.cs
- EditorPartChrome.cs
- TextTreeUndo.cs
- NativeMethodsCLR.cs
- XMLSchema.cs
- ConnectionsZoneAutoFormat.cs
- EventMappingSettingsCollection.cs
- ObjectAnimationUsingKeyFrames.cs
- ConfigXmlElement.cs
- followingsibling.cs
- DynamicPropertyReader.cs
- SmiRequestExecutor.cs
- FileNotFoundException.cs
- DataGridViewLinkCell.cs
- VisualTarget.cs
- IndentedWriter.cs
- PageVisual.cs
- DrawingAttributesDefaultValueFactory.cs
- PrimitiveXmlSerializers.cs
- BindingEntityInfo.cs
- VectorKeyFrameCollection.cs
- StringReader.cs
- FormsAuthenticationTicket.cs
- Win32.cs
- TrackingStringDictionary.cs
- WebPartRestoreVerb.cs
- SurrogateSelector.cs
- DescendantOverDescendantQuery.cs
- MenuItemStyleCollection.cs
- Span.cs
- LogAppendAsyncResult.cs
- ForeignKeyConstraint.cs
- SchemaName.cs
- GlyphInfoList.cs
- SettingsSavedEventArgs.cs
- DataTableMapping.cs
- ComponentChangingEvent.cs
- XsltSettings.cs
- DataContractAttribute.cs
- TemplatedMailWebEventProvider.cs
- WindowsIdentity.cs
- TableCellCollection.cs
- ProfilePropertySettingsCollection.cs
- XamlReaderHelper.cs
- GridViewDeleteEventArgs.cs
- Metafile.cs
- MenuItemStyleCollection.cs
- MemberAccessException.cs
- XPathException.cs
- CryptoStream.cs
- DataRelation.cs
- ParserHooks.cs
- ObjectDataSourceFilteringEventArgs.cs
- VirtualizedItemPattern.cs
- _NetRes.cs
- ClientRuntimeConfig.cs
- NetDispatcherFaultException.cs
- XmlSchemaAll.cs
- SectionUpdates.cs
- QueryParameter.cs
- Imaging.cs
- ManagedWndProcTracker.cs
- MemberHolder.cs
- TextEditorCharacters.cs
- ICspAsymmetricAlgorithm.cs
- Parser.cs
- IndexedString.cs
- TdsValueSetter.cs
- ViewCellSlot.cs
- RegexStringValidatorAttribute.cs
- WeakRefEnumerator.cs
- SR.cs