Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / Runtime / InteropServices / ErrorWrapper.cs / 1 / ErrorWrapper.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================================== ** ** Class: ErrorWrapper. ** ** ** Purpose: Wrapper that is converted to a variant with VT_ERROR. ** ** =============================================================================*/ namespace System.Runtime.InteropServices { using System; using System.Security.Permissions; [Serializable] [System.Runtime.InteropServices.ComVisible(true)] public sealed class ErrorWrapper { public ErrorWrapper(int errorCode) { m_ErrorCode = errorCode; } public ErrorWrapper(Object errorCode) { if (!(errorCode is int)) throw new ArgumentException(Environment.GetResourceString("Arg_MustBeInt32"), "errorCode"); m_ErrorCode = (int)errorCode; } [SecurityPermissionAttribute(SecurityAction.Demand, Flags=SecurityPermissionFlag.UnmanagedCode)] public ErrorWrapper(Exception e) { m_ErrorCode = Marshal.GetHRForException(e); } public int ErrorCode { get { return m_ErrorCode; } } private int m_ErrorCode; } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RelationshipEnd.cs
- StringSorter.cs
- TypedDataSetSchemaImporterExtensionFx35.cs
- XMLSchema.cs
- RegistryKey.cs
- OciLobLocator.cs
- ByteConverter.cs
- UnauthorizedWebPart.cs
- Application.cs
- SerializationSectionGroup.cs
- DecoderReplacementFallback.cs
- PointKeyFrameCollection.cs
- TreeBuilder.cs
- WorkflowTimerService.cs
- MetaData.cs
- datacache.cs
- PrintPreviewDialog.cs
- Group.cs
- panel.cs
- PreviousTrackingServiceAttribute.cs
- ModelServiceImpl.cs
- FileChangesMonitor.cs
- ReadOnlyDictionary.cs
- UnionQueryOperator.cs
- Permission.cs
- Html32TextWriter.cs
- SecurityElement.cs
- OperationCanceledException.cs
- DesignerActionVerbItem.cs
- TreeBuilder.cs
- AutoGeneratedFieldProperties.cs
- WebSysDescriptionAttribute.cs
- OnOperation.cs
- HttpCacheVaryByContentEncodings.cs
- GC.cs
- Container.cs
- Listbox.cs
- Predicate.cs
- OledbConnectionStringbuilder.cs
- AudioBase.cs
- SamlDelegatingWriter.cs
- CodeTypeReference.cs
- RestHandlerFactory.cs
- InputProcessorProfilesLoader.cs
- PeerNameRecordCollection.cs
- ClientOperation.cs
- DateTimeConverter2.cs
- TextServicesPropertyRanges.cs
- DefaultHttpHandler.cs
- ConfigurationValidatorAttribute.cs
- TileBrush.cs
- MenuItem.cs
- AbstractDataSvcMapFileLoader.cs
- httpserverutility.cs
- CheckBoxList.cs
- CorrelationTokenInvalidatedHandler.cs
- GcHandle.cs
- sortedlist.cs
- SqlDataSourceCustomCommandEditor.cs
- SqlDataSourceCustomCommandEditor.cs
- MergeLocalizationDirectives.cs
- BatchWriter.cs
- MemberNameValidator.cs
- BamlBinaryWriter.cs
- DbDeleteCommandTree.cs
- EncodingInfo.cs
- ReturnValue.cs
- DataGridViewCellValidatingEventArgs.cs
- DataTemplateSelector.cs
- Canvas.cs
- SqlRowUpdatingEvent.cs
- Codec.cs
- _emptywebproxy.cs
- RuntimeConfigLKG.cs
- IdlingCommunicationPool.cs
- CircleHotSpot.cs
- Object.cs
- sitestring.cs
- DocumentSequenceHighlightLayer.cs
- XmlAttributeCollection.cs
- HtmlDocument.cs
- SafeRegistryHandle.cs
- GuidConverter.cs
- DataGridLinkButton.cs
- GridViewDeleteEventArgs.cs
- DocumentDesigner.cs
- TransformConverter.cs
- ContractMapping.cs
- MemberJoinTreeNode.cs
- WebControlParameterProxy.cs
- XmlNamedNodeMap.cs
- SocketInformation.cs
- UnionCodeGroup.cs
- figurelengthconverter.cs
- XmlSchemaGroup.cs
- DBCommand.cs
- WmlLabelAdapter.cs
- SecurityDocument.cs
- StructuredType.cs
- XslVisitor.cs