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
- StylusPlugInCollection.cs
- SymLanguageType.cs
- DbExpressionBuilder.cs
- AttributedMetaModel.cs
- StylusPointCollection.cs
- EventHandlerList.cs
- GradientBrush.cs
- OutputWindow.cs
- FreezableCollection.cs
- TextEditorContextMenu.cs
- ComponentResourceKey.cs
- PropertyTab.cs
- DodSequenceMerge.cs
- XmlDataLoader.cs
- SchemaElementDecl.cs
- CredentialManagerDialog.cs
- _NestedSingleAsyncResult.cs
- GenericTypeParameterConverter.cs
- XomlDesignerLoader.cs
- ImageSource.cs
- WebPartVerb.cs
- NonSerializedAttribute.cs
- BrushConverter.cs
- EntityContainerEntitySetDefiningQuery.cs
- DiscoveryReference.cs
- QilBinary.cs
- FormViewDeletedEventArgs.cs
- AttachInfo.cs
- LoadedOrUnloadedOperation.cs
- ClockGroup.cs
- QueryParameter.cs
- MachineKeySection.cs
- RuntimeWrappedException.cs
- WorkflowClientDeliverMessageWrapper.cs
- FrameworkPropertyMetadata.cs
- Rights.cs
- WebPartsSection.cs
- EventToken.cs
- TreeViewHitTestInfo.cs
- SqlConnectionHelper.cs
- PrintPreviewGraphics.cs
- wgx_render.cs
- TogglePattern.cs
- Timer.cs
- ObjectQueryExecutionPlan.cs
- BuildResult.cs
- HelpKeywordAttribute.cs
- TextDecorationLocationValidation.cs
- SchemaEntity.cs
- Configuration.cs
- ParameterDataSourceExpression.cs
- KoreanCalendar.cs
- PrefixQName.cs
- PKCS1MaskGenerationMethod.cs
- LightweightCodeGenerator.cs
- WebException.cs
- CharEntityEncoderFallback.cs
- SessionIDManager.cs
- HandlerBase.cs
- FixedDocument.cs
- DataGridViewSelectedRowCollection.cs
- PropertyItemInternal.cs
- HttpInputStream.cs
- ConnectionInterfaceCollection.cs
- RowSpanVector.cs
- X509WindowsSecurityToken.cs
- MobileUserControl.cs
- Int64AnimationBase.cs
- MsdtcWrapper.cs
- ManagementBaseObject.cs
- TimeEnumHelper.cs
- CodeDelegateInvokeExpression.cs
- Lease.cs
- ConnectionsZoneAutoFormat.cs
- Helper.cs
- BuildManagerHost.cs
- FixedSOMLineRanges.cs
- ComEventsHelper.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- QueryContinueDragEvent.cs
- ReceiveActivityDesigner.cs
- CachedFontFamily.cs
- ZeroOpNode.cs
- ProgressChangedEventArgs.cs
- DispatchWrapper.cs
- NameObjectCollectionBase.cs
- FileRecordSequenceCompletedAsyncResult.cs
- WebPartZoneCollection.cs
- SystemThemeKey.cs
- FactoryRecord.cs
- UpdateTranslator.cs
- Error.cs
- TypeDescriptionProviderAttribute.cs
- ApplicationActivator.cs
- MetadataFile.cs
- TextFormatterContext.cs
- PreProcessInputEventArgs.cs
- ArrayList.cs
- File.cs
- UpWmlPageAdapter.cs