Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Runtime / InteropServices / ErrorWrapper.cs / 1305376 / 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; } [System.Security.SecuritySafeCritical] // auto-generated [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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- X500Name.cs
- ResourceProviderFactory.cs
- MemberInfoSerializationHolder.cs
- PackWebResponse.cs
- SecurityHeader.cs
- Token.cs
- TimeSpanConverter.cs
- DefaultBinder.cs
- FixedFlowMap.cs
- ResourceReader.cs
- SelectedCellsChangedEventArgs.cs
- PolyQuadraticBezierSegment.cs
- WpfGeneratedKnownTypes.cs
- AppSettingsExpressionEditor.cs
- DocumentAutomationPeer.cs
- XmlILStorageConverter.cs
- PageWrapper.cs
- X509Chain.cs
- SerializationSectionGroup.cs
- Command.cs
- UriExt.cs
- _OverlappedAsyncResult.cs
- coordinatorscratchpad.cs
- StrokeCollectionConverter.cs
- DynamicRenderer.cs
- _DisconnectOverlappedAsyncResult.cs
- FontCacheUtil.cs
- SamlEvidence.cs
- DataTableMappingCollection.cs
- XmlDictionaryWriter.cs
- DocumentOrderQuery.cs
- MailAddress.cs
- GridItemProviderWrapper.cs
- OracleCommandBuilder.cs
- TypeGeneratedEventArgs.cs
- QueryExpr.cs
- Application.cs
- InputProviderSite.cs
- WinFormsUtils.cs
- GC.cs
- SqlVersion.cs
- MissingSatelliteAssemblyException.cs
- SafeNativeMethods.cs
- SourceItem.cs
- TransformValueSerializer.cs
- LoginCancelEventArgs.cs
- FontClient.cs
- PassportIdentity.cs
- Helper.cs
- ProfileBuildProvider.cs
- Win32KeyboardDevice.cs
- TextBoxBaseDesigner.cs
- RichTextBox.cs
- BinarySerializer.cs
- RoleManagerEventArgs.cs
- PointUtil.cs
- COM2Enum.cs
- FixedTextBuilder.cs
- StringStorage.cs
- DocumentSchemaValidator.cs
- ExtensionWindowHeader.cs
- ManualResetEvent.cs
- IxmlLineInfo.cs
- RayMeshGeometry3DHitTestResult.cs
- TextEditorCopyPaste.cs
- CharKeyFrameCollection.cs
- log.cs
- ValueTable.cs
- MouseGestureValueSerializer.cs
- WindowsFormsSectionHandler.cs
- Help.cs
- Menu.cs
- ResourcesBuildProvider.cs
- Tag.cs
- RadioButtonAutomationPeer.cs
- TaiwanLunisolarCalendar.cs
- DataService.cs
- TrustManagerPromptUI.cs
- TableLayoutRowStyleCollection.cs
- TableDetailsCollection.cs
- Script.cs
- XslAst.cs
- BeginStoryboard.cs
- CompilerState.cs
- FormDesigner.cs
- AutomationProperties.cs
- LogAppendAsyncResult.cs
- Update.cs
- StringReader.cs
- PersistenceProviderElement.cs
- DataControlCommands.cs
- COAUTHINFO.cs
- DataKey.cs
- AutomationProperties.cs
- FontCacheUtil.cs
- BitmapEffectDrawingContextWalker.cs
- XmlDataSourceNodeDescriptor.cs
- KoreanCalendar.cs
- XdrBuilder.cs
- DynamicValidatorEventArgs.cs