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
- CodePageUtils.cs
- ClusterUtils.cs
- EventManager.cs
- WebPartCloseVerb.cs
- MergablePropertyAttribute.cs
- SqlProfileProvider.cs
- TypeInfo.cs
- SHA512CryptoServiceProvider.cs
- ContravarianceAdapter.cs
- LoadRetryStrategyFactory.cs
- AbsoluteQuery.cs
- OutputCacheSettings.cs
- CompilerState.cs
- NetMsmqBindingElement.cs
- RotateTransform.cs
- IdentityNotMappedException.cs
- DataControlPagerLinkButton.cs
- DesigntimeLicenseContextSerializer.cs
- CompilationRelaxations.cs
- DataView.cs
- PathSegmentCollection.cs
- XamlReaderConstants.cs
- ApplicationProxyInternal.cs
- BamlLocalizableResource.cs
- ManifestResourceInfo.cs
- TriggerAction.cs
- WindowsAuthenticationModule.cs
- WebZone.cs
- Dictionary.cs
- XmlIlGenerator.cs
- NetNamedPipeBindingCollectionElement.cs
- precedingquery.cs
- Cell.cs
- ParentQuery.cs
- IdentityNotMappedException.cs
- SafeNativeMethods.cs
- DesignerTransactionCloseEvent.cs
- XmlRawWriter.cs
- MemberCollection.cs
- Viewport3DAutomationPeer.cs
- EngineSiteSapi.cs
- DataGridViewColumnTypePicker.cs
- ModuleConfigurationInfo.cs
- AsymmetricKeyExchangeDeformatter.cs
- Inflater.cs
- HtmlInputImage.cs
- COSERVERINFO.cs
- FixedElement.cs
- RadialGradientBrush.cs
- _NestedSingleAsyncResult.cs
- TaskFormBase.cs
- XmlSchemaComplexContentExtension.cs
- SectionInput.cs
- HostedTransportConfigurationBase.cs
- KerberosTokenFactoryCredential.cs
- DotExpr.cs
- TextTreeUndoUnit.cs
- ECDiffieHellmanCng.cs
- NavigationPropertyAccessor.cs
- Literal.cs
- FixedSOMLineRanges.cs
- FieldNameLookup.cs
- TypeConverterAttribute.cs
- SubMenuStyle.cs
- AnchoredBlock.cs
- FileEnumerator.cs
- AsnEncodedData.cs
- X509CertificateInitiatorServiceCredential.cs
- DesignerAttribute.cs
- FloaterBaseParagraph.cs
- EntityViewContainer.cs
- PerfCounters.cs
- CompositeControl.cs
- CustomAttribute.cs
- ThreadStaticAttribute.cs
- ServiceDescriptionSerializer.cs
- DataSourceSelectArguments.cs
- ContentHostHelper.cs
- TypeUtil.cs
- CompositeDesignerAccessibleObject.cs
- SqlServer2KCompatibilityCheck.cs
- IsolatedStorageFilePermission.cs
- _AutoWebProxyScriptWrapper.cs
- EmptyQuery.cs
- SupportingTokenChannel.cs
- SendContent.cs
- ManifestBasedResourceGroveler.cs
- ECDiffieHellmanCngPublicKey.cs
- ToolStripSeparatorRenderEventArgs.cs
- NamespaceQuery.cs
- SmiGettersStream.cs
- StyleModeStack.cs
- HWStack.cs
- MemberJoinTreeNode.cs
- QuaternionKeyFrameCollection.cs
- Facet.cs
- smtpconnection.cs
- ExtendedProtectionPolicy.cs
- TextServicesProperty.cs
- Button.cs