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
- InternalDispatchObject.cs
- WebServiceTypeData.cs
- FormatVersion.cs
- GenericIdentity.cs
- XmlDeclaration.cs
- CheckBox.cs
- LoginStatusDesigner.cs
- SqlDataSourceRefreshSchemaForm.cs
- PeerTransportListenAddressValidatorAttribute.cs
- exports.cs
- ColorConvertedBitmapExtension.cs
- SystemDropShadowChrome.cs
- XslCompiledTransform.cs
- TextEditorLists.cs
- CipherData.cs
- NegotiateStream.cs
- ConstrainedDataObject.cs
- TypefaceMap.cs
- StrongNameIdentityPermission.cs
- ResourceAssociationSetEnd.cs
- Block.cs
- SqlCacheDependencySection.cs
- OleDbException.cs
- ListViewInsertionMark.cs
- SoapCommonClasses.cs
- XmlNotation.cs
- SetMemberBinder.cs
- GenericPrincipal.cs
- GradientBrush.cs
- TypedCompletedAsyncResult.cs
- WebPartMenuStyle.cs
- ListViewItemMouseHoverEvent.cs
- __Filters.cs
- PostBackOptions.cs
- StringHandle.cs
- DataGridViewRowsAddedEventArgs.cs
- DataServiceKeyAttribute.cs
- PtsPage.cs
- HostedTcpTransportManager.cs
- OrderByQueryOptionExpression.cs
- PostBackOptions.cs
- PageCodeDomTreeGenerator.cs
- ParameterToken.cs
- InfoCardSymmetricAlgorithm.cs
- IDReferencePropertyAttribute.cs
- InfoCardSymmetricAlgorithm.cs
- ECDsaCng.cs
- HttpUnhandledOperationInvoker.cs
- ErrorFormatterPage.cs
- _WinHttpWebProxyDataBuilder.cs
- WindowsButton.cs
- SolidBrush.cs
- PtsHelper.cs
- TreeViewImageKeyConverter.cs
- FrameworkPropertyMetadata.cs
- SafeLibraryHandle.cs
- Bold.cs
- CompoundFileReference.cs
- EditorPartChrome.cs
- Operators.cs
- BypassElementCollection.cs
- Control.cs
- NodeInfo.cs
- HttpRawResponse.cs
- CheckBox.cs
- FlowLayoutPanelDesigner.cs
- SmiEventStream.cs
- XsltLoader.cs
- ContentPathSegment.cs
- ImpersonationContext.cs
- TextEditorSpelling.cs
- BooleanFunctions.cs
- ConnectionPointCookie.cs
- TextTrailingCharacterEllipsis.cs
- ImageSourceConverter.cs
- DataService.cs
- DotExpr.cs
- PackageFilter.cs
- ForwardPositionQuery.cs
- DoubleAnimationUsingPath.cs
- TypefaceCollection.cs
- RelationalExpressions.cs
- BinaryExpression.cs
- WsdlBuildProvider.cs
- CompilerState.cs
- XmlElementAttributes.cs
- ConstraintEnumerator.cs
- UnknownBitmapDecoder.cs
- StateDesigner.TransitionInfo.cs
- EntityContainer.cs
- HtmlInputControl.cs
- FunctionDescription.cs
- AVElementHelper.cs
- ZipIOBlockManager.cs
- InstanceDataCollection.cs
- MatchSingleFxEngineOpcode.cs
- FontStyle.cs
- PaintValueEventArgs.cs
- CapabilitiesPattern.cs
- PointF.cs