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
- TransformBlockRequest.cs
- TypeDependencyAttribute.cs
- InfoCardProofToken.cs
- AuthorizationContext.cs
- DispatcherSynchronizationContext.cs
- XmlTextReaderImplHelpers.cs
- DataGridViewButtonCell.cs
- RemotingServices.cs
- UnsafeNativeMethods.cs
- Selection.cs
- AutomationElementIdentifiers.cs
- OutputWindow.cs
- EditorBrowsableAttribute.cs
- ColorConvertedBitmap.cs
- TextParagraphView.cs
- RowToFieldTransformer.cs
- ProjectionCamera.cs
- PointIndependentAnimationStorage.cs
- ReachFixedPageSerializerAsync.cs
- CodeDirectiveCollection.cs
- SecurityCredentialsManager.cs
- ProvideValueServiceProvider.cs
- RepeaterItemCollection.cs
- ReverseQueryOperator.cs
- RegexRunner.cs
- IisTraceWebEventProvider.cs
- RadioButtonStandardAdapter.cs
- CodeRemoveEventStatement.cs
- PostBackOptions.cs
- Win32SafeHandles.cs
- StringCollectionEditor.cs
- OpCopier.cs
- ShapeTypeface.cs
- AnimationException.cs
- ConfigurationSectionGroupCollection.cs
- OleDbMetaDataFactory.cs
- ChildDocumentBlock.cs
- FilterElement.cs
- FolderLevelBuildProviderCollection.cs
- MemberPath.cs
- DocumentReference.cs
- OdbcConnectionStringbuilder.cs
- ReflectPropertyDescriptor.cs
- FileCodeGroup.cs
- AutomationPatternInfo.cs
- rsa.cs
- HandleExceptionArgs.cs
- BeginStoryboard.cs
- _Rfc2616CacheValidators.cs
- FileAccessException.cs
- ColorKeyFrameCollection.cs
- CngAlgorithm.cs
- SqlXmlStorage.cs
- FlowPosition.cs
- UInt16Storage.cs
- VirtualDirectoryMappingCollection.cs
- PermissionSet.cs
- InlineCollection.cs
- ProfilePropertyMetadata.cs
- EditingCommands.cs
- XmlReflectionImporter.cs
- baseshape.cs
- WebPartTracker.cs
- BridgeDataReader.cs
- ContextBase.cs
- DeclarativeConditionsCollection.cs
- DescriptionAttribute.cs
- AuthenticationException.cs
- ExtenderProvidedPropertyAttribute.cs
- invalidudtexception.cs
- TemplatePropertyEntry.cs
- OdbcErrorCollection.cs
- RouteUrlExpressionBuilder.cs
- controlskin.cs
- CustomError.cs
- FormsAuthenticationUser.cs
- VisualStyleTypesAndProperties.cs
- PropertySegmentSerializationProvider.cs
- UnmanagedHandle.cs
- StringStorage.cs
- PropertyEmitter.cs
- HtmlTable.cs
- RequestCacheManager.cs
- PagesSection.cs
- ImportOptions.cs
- SmiContext.cs
- PrintPreviewDialog.cs
- FontDriver.cs
- CustomLineCap.cs
- FrameworkElement.cs
- ErasingStroke.cs
- DSASignatureDeformatter.cs
- datacache.cs
- DataGridViewTopLeftHeaderCell.cs
- StringStorage.cs
- DrawingImage.cs
- OleDbReferenceCollection.cs
- ConfigurationStrings.cs
- ExpressionParser.cs
- SoapProtocolImporter.cs