Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / Microsoft / Win32 / SafeHandles / SafeTimerHandle.cs / 1 / SafeTimerHandle.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: SafeTimerHandle ** **Author: David Gutierrez ([....]) ** ** A wrapper for a timer handle ** ** Date: July 23, 2002 ** ===========================================================*/ using System; using System.Security; using System.Security.Permissions; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; using Microsoft.Win32; using Microsoft.Win32.SafeHandles; using System.Runtime.ConstrainedExecution; namespace Microsoft.Win32.SafeHandles { [HostProtectionAttribute(MayLeakOnAbort=true)] [SuppressUnmanagedCodeSecurityAttribute] internal sealed class SafeTimerHandle : SafeHandleZeroOrMinusOneIsInvalid { // Note that CreateWaitableTimer returns 0 on failure internal SafeTimerHandle() : base (true) {} // Not currently used //[SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode=true)] //internal SafeTimerHandle(IntPtr existingHandle, bool ownsHandle) : base(ownsHandle) { // SetHandle(existingHandle); //} [DllImport(ExternDll.Kernel32, ExactSpelling=true, SetLastError=true)] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] private static extern bool CloseHandle(IntPtr handle); override protected bool ReleaseHandle() { return CloseHandle(handle); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- GridViewRow.cs
- EncryptedXml.cs
- BaseTemplateParser.cs
- FontWeights.cs
- SortQuery.cs
- TokenBasedSet.cs
- ObjectHelper.cs
- WebPartEventArgs.cs
- RepeatButton.cs
- ListViewGroupConverter.cs
- WindowsEditBox.cs
- XmlUtilWriter.cs
- CachedPathData.cs
- HtmlTextBoxAdapter.cs
- ByteStreamBufferedMessageData.cs
- ScheduleChanges.cs
- Transactions.cs
- ZipIOExtraField.cs
- AssociationSetEnd.cs
- MatrixTransform.cs
- SqlDataSourceStatusEventArgs.cs
- FontFamilyIdentifier.cs
- ClientConfigurationSystem.cs
- CssStyleCollection.cs
- StorageInfo.cs
- InvocationExpression.cs
- HotSpotCollection.cs
- ZoneIdentityPermission.cs
- SoapMessage.cs
- VectorConverter.cs
- CatalogZone.cs
- FilterEventArgs.cs
- TextShapeableCharacters.cs
- DesignerTextWriter.cs
- SoapReflectionImporter.cs
- ResourceReferenceKeyNotFoundException.cs
- WrappedOptions.cs
- TextSelectionProcessor.cs
- SafeBitVector32.cs
- ButtonStandardAdapter.cs
- NetCodeGroup.cs
- ReadOnlyDataSource.cs
- TdsRecordBufferSetter.cs
- Mapping.cs
- CompiledQuery.cs
- HandlerBase.cs
- Native.cs
- EastAsianLunisolarCalendar.cs
- Queue.cs
- ProbeDuplexAsyncResult.cs
- WebServiceParameterData.cs
- RootBrowserWindowProxy.cs
- Debug.cs
- ValidatorCollection.cs
- RangeValuePattern.cs
- ConnectionPoint.cs
- HebrewNumber.cs
- ButtonStandardAdapter.cs
- EdmProviderManifest.cs
- ValidationRuleCollection.cs
- XmlReflectionMember.cs
- EntityClassGenerator.cs
- Journaling.cs
- ExceptionDetail.cs
- Duration.cs
- XmlSignatureProperties.cs
- MethodToken.cs
- ImportedNamespaceContextItem.cs
- ListBoxChrome.cs
- TimeEnumHelper.cs
- DynamicArgumentDialog.cs
- PropertyEntry.cs
- MessageContractImporter.cs
- FixedSOMTableRow.cs
- Propagator.cs
- Maps.cs
- ObjectDataSourceView.cs
- DataGridHeadersVisibilityToVisibilityConverter.cs
- BinarySerializer.cs
- AdCreatedEventArgs.cs
- BinaryFormatter.cs
- SkipQueryOptionExpression.cs
- GestureRecognitionResult.cs
- SafeHandles.cs
- basemetadatamappingvisitor.cs
- OdbcFactory.cs
- InternalSafeNativeMethods.cs
- TableLayoutSettingsTypeConverter.cs
- ImmComposition.cs
- UrlAuthFailureHandler.cs
- StateBag.cs
- UnsignedPublishLicense.cs
- ImageBrush.cs
- TemplateControlCodeDomTreeGenerator.cs
- InternalBufferOverflowException.cs
- RepeaterItem.cs
- FormsAuthenticationModule.cs
- CultureInfo.cs
- AmbientLight.cs
- DiffuseMaterial.cs