Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TdsParserSafeHandles.cs
- TreeViewDataItemAutomationPeer.cs
- CacheHelper.cs
- ColumnClickEvent.cs
- TableProviderWrapper.cs
- ContractMethodParameterInfo.cs
- WindowCollection.cs
- BlurBitmapEffect.cs
- SQLMembershipProvider.cs
- ContentElementCollection.cs
- IgnorePropertiesAttribute.cs
- IndexedSelectQueryOperator.cs
- GridViewColumnHeaderAutomationPeer.cs
- DataGridItemCollection.cs
- DirectoryNotFoundException.cs
- DataRelationCollection.cs
- InternalResources.cs
- Transform3D.cs
- XsdDataContractExporter.cs
- HScrollProperties.cs
- VSWCFServiceContractGenerator.cs
- SerializationObjectManager.cs
- WsatServiceAddress.cs
- CqlLexerHelpers.cs
- TextTreeDeleteContentUndoUnit.cs
- PropertyRecord.cs
- ActivityExecutorSurrogate.cs
- EntryWrittenEventArgs.cs
- StrokeFIndices.cs
- embossbitmapeffect.cs
- OperationInvokerBehavior.cs
- TreeViewBindingsEditorForm.cs
- XLinq.cs
- CodeConstructor.cs
- ContainerVisual.cs
- TableLayoutPanelCodeDomSerializer.cs
- UInt32.cs
- TrackBarRenderer.cs
- SaveFileDialog.cs
- TraversalRequest.cs
- ClientSideQueueItem.cs
- FileUtil.cs
- Imaging.cs
- TextSelectionProcessor.cs
- MenuEventArgs.cs
- EntityDataSourceWrapperCollection.cs
- UnsafePeerToPeerMethods.cs
- XmlMessageFormatter.cs
- ResourceSetExpression.cs
- ObjectQuery.cs
- UIElementCollection.cs
- WebBrowsableAttribute.cs
- FormView.cs
- ApplicationSettingsBase.cs
- ListViewDataItem.cs
- EventArgs.cs
- OracleInternalConnection.cs
- DrawingCollection.cs
- AstTree.cs
- XmlSchema.cs
- Calendar.cs
- XmlMemberMapping.cs
- DocumentEventArgs.cs
- EventBuilder.cs
- AspCompat.cs
- WindowsProgressbar.cs
- Highlights.cs
- FileDialog.cs
- GroupQuery.cs
- COM2FontConverter.cs
- XmlProcessingInstruction.cs
- HyperLinkStyle.cs
- MenuDesigner.cs
- InheritanceAttribute.cs
- AttributeTable.cs
- CallTemplateAction.cs
- InvokeGenerator.cs
- ConditionalAttribute.cs
- CompilerLocalReference.cs
- safemediahandle.cs
- PageRanges.cs
- StringInfo.cs
- DbProviderFactories.cs
- CustomValidator.cs
- PreservationFileReader.cs
- StaticSiteMapProvider.cs
- DataGridViewRowHeaderCell.cs
- MouseButtonEventArgs.cs
- ScrollChrome.cs
- _NegotiateClient.cs
- mil_commands.cs
- EventSetter.cs
- ToolBarTray.cs
- EntityAdapter.cs
- CustomDictionarySources.cs
- OdbcError.cs
- MediaTimeline.cs
- DataControlHelper.cs
- ItemList.cs
- SymbolMethod.cs