Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / Tools / WSATConfig / Configuration / SafeCertificateStore.cs / 1305376 / SafeCertificateStore.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace Microsoft.Tools.ServiceModel.WsatConfig { using System; using System.Security; using System.Security.Permissions; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; using System.Runtime.ConstrainedExecution; using Microsoft.Win32.SafeHandles; sealed class SafeCertificateStore : SafeHandleZeroOrMinusOneIsInvalid { [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)] SafeCertificateStore() : base(false) { return; } public override bool IsInvalid { get { return handle == IntPtr.Zero; } } protected override bool ReleaseHandle() { #pragma warning suppress 56523 return SafeNativeMethods.CertCloseStore(handle, 0); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace Microsoft.Tools.ServiceModel.WsatConfig { using System; using System.Security; using System.Security.Permissions; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; using System.Runtime.ConstrainedExecution; using Microsoft.Win32.SafeHandles; sealed class SafeCertificateStore : SafeHandleZeroOrMinusOneIsInvalid { [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)] SafeCertificateStore() : base(false) { return; } public override bool IsInvalid { get { return handle == IntPtr.Zero; } } protected override bool ReleaseHandle() { #pragma warning suppress 56523 return SafeNativeMethods.CertCloseStore(handle, 0); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- OperationContextScope.cs
- SmtpReplyReaderFactory.cs
- SignatureHelper.cs
- WebRequest.cs
- TextElementEnumerator.cs
- EntityStoreSchemaGenerator.cs
- AutomationElementIdentifiers.cs
- AvTrace.cs
- DiffuseMaterial.cs
- WeakReadOnlyCollection.cs
- Attributes.cs
- MappedMetaModel.cs
- BmpBitmapDecoder.cs
- Vertex.cs
- CachedBitmap.cs
- DataContractJsonSerializerOperationBehavior.cs
- DecimalFormatter.cs
- Accessors.cs
- GACIdentityPermission.cs
- CodeTypeReferenceExpression.cs
- _CommandStream.cs
- GeometryHitTestParameters.cs
- IdentityHolder.cs
- ReadOnlyTernaryTree.cs
- DataTableMapping.cs
- TargetException.cs
- NativeObjectSecurity.cs
- Scripts.cs
- XmlSchemas.cs
- SqlRowUpdatingEvent.cs
- ProjectedSlot.cs
- DiffuseMaterial.cs
- PersonalizableAttribute.cs
- Byte.cs
- EastAsianLunisolarCalendar.cs
- CodeSubDirectoriesCollection.cs
- TypedReference.cs
- Single.cs
- InheritablePropertyChangeInfo.cs
- PlatformCulture.cs
- Assembly.cs
- DictionaryManager.cs
- ApplicationFileCodeDomTreeGenerator.cs
- DataSourceSelectArguments.cs
- SafeFileMappingHandle.cs
- FloatUtil.cs
- SplitterEvent.cs
- PixelFormatConverter.cs
- ListDictionaryInternal.cs
- SynchronizationValidator.cs
- UnsafeNativeMethodsTablet.cs
- MSG.cs
- AnimatedTypeHelpers.cs
- ItemChangedEventArgs.cs
- InvalidAsynchronousStateException.cs
- HMACSHA1.cs
- PropertyGridDesigner.cs
- OleDbStruct.cs
- ResXBuildProvider.cs
- TextLineBreak.cs
- FontFamily.cs
- RectangleHotSpot.cs
- DataBindEngine.cs
- VariableModifiersHelper.cs
- TextServicesCompartmentEventSink.cs
- TextSelectionHelper.cs
- GB18030Encoding.cs
- CardSpaceException.cs
- XmlSchemaValidator.cs
- Animatable.cs
- CaseInsensitiveComparer.cs
- SecurityTokenRequirement.cs
- DynamicDataExtensions.cs
- InputMethodStateTypeInfo.cs
- XamlReader.cs
- Internal.cs
- XmlSchemaObjectTable.cs
- Win32.cs
- XmlCharCheckingWriter.cs
- OdbcTransaction.cs
- RemotingConfigParser.cs
- EventHandlerList.cs
- SapiAttributeParser.cs
- TextSegment.cs
- CollectionBuilder.cs
- StrokeCollectionConverter.cs
- PeerResolverBindingElement.cs
- PeerResolverMode.cs
- SortFieldComparer.cs
- SQLDateTime.cs
- MergeFailedEvent.cs
- HijriCalendar.cs
- sqlstateclientmanager.cs
- BulletedList.cs
- ProxyGenerationError.cs
- Assembly.cs
- SQLResource.cs
- ContentElementAutomationPeer.cs
- DockPanel.cs
- BindingList.cs