The Labs \ Source Viewer \ SSCLI \ System \ __HResults

  1. // ==++==
  2. //
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. //
  14. // ==--==
  15. //=============================================================================
  16. //
  17. // Class: __HResults
  18. //
  19. // Purpose: Define HResult constants. Every exception has one of these.
  20. //
  21. // Date: 98/08/31 11:57:11 AM
  22. //
  23. //===========================================================================*/
  24. namespace System
  25. {
  26.     // Note: FACILITY_URT is defined as 0x13 (0x8013xxxx). Within that
  27.     // range, 0x1yyy is for Runtime errors (used for Security, Metadata, etc).
  28.     // In that subrange, 0x15zz and 0x16zz have been allocated for classlib-type
  29.     // HResults. Also note that some of our HResults have to map to certain
  30.     // COM HR's, etc.
  31.    
  32.     // Another arbitrary decision... Feel free to change this, as long as you
  33.     // renumber the HResults yourself (and update rexcep.h).
  34.     // Reflection will use 0x1600 -> 0x161f. IO will use 0x1620 -> 0x163f.
  35.     // Security will use 0x1640 -> 0x165f
  36.    
  37.     // There are __HResults files in the IO, Remoting, Reflection &
  38.     // Security/Util directories as well, so choose your HResults carefully.
  39.    
  40.     using System;
  41.     static internal class __HResults
  42.     {
  43.         internal const int E_FAIL = unchecked((int)2147500037u);
  44.         internal const int E_POINTER = unchecked((int)2147500035u);
  45.         internal const int E_NOTIMPL = unchecked((int)2147500033u);
  46.         internal const int COR_E_AMBIGUOUSMATCH = unchecked((int)2147492125u);
  47.         internal const int COR_E_APPDOMAINUNLOADED = unchecked((int)2148732948u);
  48.         internal const int COR_E_APPLICATION = unchecked((int)2148734464u);
  49.         internal const int COR_E_ARGUMENT = unchecked((int)2147942487u);
  50.         internal const int COR_E_ARGUMENTOUTOFRANGE = unchecked((int)2148734210u);
  51.         internal const int COR_E_ARITHMETIC = unchecked((int)2147942934u);
  52.         internal const int COR_E_ARRAYTYPEMISMATCH = unchecked((int)2148734211u);
  53.         internal const int COR_E_BADIMAGEFORMAT = unchecked((int)2147942411u);
  54.         internal const int COR_E_TYPEUNLOADED = unchecked((int)2148732947u);
  55.         internal const int COR_E_CANNOTUNLOADAPPDOMAIN = unchecked((int)2148732949u);
  56.         internal const int COR_E_COMEMULATE = unchecked((int)2148734261u);
  57.         internal const int COR_E_CONTEXTMARSHAL = unchecked((int)2148734212u);
  58.         internal const int COR_E_DATAMISALIGNED = unchecked((int)2148734273u);
  59.         internal const int COR_E_TIMEOUT = unchecked((int)2148734213u);
  60.         internal const int COR_E_CUSTOMATTRIBUTEFORMAT = unchecked((int)2148734469u);
  61.         internal const int COR_E_DIVIDEBYZERO = unchecked((int)2147614738u);
  62.         // DISP_E_DIVBYZERO
  63.         internal const int COR_E_DUPLICATEWAITOBJECT = unchecked((int)2148734249u);
  64.         internal const int COR_E_EXCEPTION = unchecked((int)2148734208u);
  65.         internal const int COR_E_EXECUTIONENGINE = unchecked((int)2148734214u);
  66.         internal const int COR_E_FIELDACCESS = unchecked((int)2148734215u);
  67.         internal const int COR_E_FORMAT = unchecked((int)2148734263u);
  68.         internal const int COR_E_INDEXOUTOFRANGE = unchecked((int)2148734216u);
  69.         internal const int COR_E_INSUFFICIENTMEMORY = unchecked((int)2148734269u);
  70.         internal const int COR_E_INVALIDCAST = unchecked((int)2147500034u);
  71.         internal const int COR_E_INVALIDCOMOBJECT = unchecked((int)2148734247u);
  72.         internal const int COR_E_INVALIDFILTERCRITERIA = unchecked((int)2148734465u);
  73.         internal const int COR_E_INVALIDOLEVARIANTTYPE = unchecked((int)2148734257u);
  74.         internal const int COR_E_INVALIDOPERATION = unchecked((int)2148734217u);
  75.         internal const int COR_E_INVALIDPROGRAM = unchecked((int)2148734266u);
  76.         internal const int COR_E_KEYNOTFOUND = unchecked((int)2148734327u);
  77.         internal const int COR_E_MARSHALDIRECTIVE = unchecked((int)2148734261u);
  78.         internal const int COR_E_MEMBERACCESS = unchecked((int)2148734234u);
  79.         internal const int COR_E_METHODACCESS = unchecked((int)2148734224u);
  80.         internal const int COR_E_MISSINGFIELD = unchecked((int)2148734225u);
  81.         internal const int COR_E_MISSINGMANIFESTRESOURCE = unchecked((int)2148734258u);
  82.         internal const int COR_E_MISSINGMEMBER = unchecked((int)2148734226u);
  83.         internal const int COR_E_MISSINGMETHOD = unchecked((int)2148734227u);
  84.         internal const int COR_E_MISSINGSATELLITEASSEMBLY = unchecked((int)2148734262u);
  85.         internal const int COR_E_MULTICASTNOTSUPPORTED = unchecked((int)2148734228u);
  86.         internal const int COR_E_NOTFINITENUMBER = unchecked((int)2148734248u);
  87.         internal const int COR_E_PLATFORMNOTSUPPORTED = unchecked((int)2148734265u);
  88.         internal const int COR_E_NOTSUPPORTED = unchecked((int)2148734229u);
  89.         internal const int COR_E_NULLREFERENCE = unchecked((int)2147500035u);
  90.         internal const int COR_E_OBJECTDISPOSED = unchecked((int)2148734498u);
  91.         internal const int COR_E_OPERATIONCANCELED = unchecked((int)2148734267u);
  92.         internal const int COR_E_OUTOFMEMORY = unchecked((int)2147942414u);
  93.         internal const int COR_E_OVERFLOW = unchecked((int)2148734230u);
  94.         internal const int COR_E_RANK = unchecked((int)2148734231u);
  95.         internal const int COR_E_REFLECTIONTYPELOAD = unchecked((int)2148734466u);
  96.         internal const int COR_E_RUNTIMEWRAPPED = unchecked((int)2148734270u);
  97.         internal const int COR_E_SAFEARRAYRANKMISMATCH = unchecked((int)2148734264u);
  98.         internal const int COR_E_SAFEARRAYTYPEMISMATCH = unchecked((int)2148734259u);
  99.         internal const int COR_E_SAFEHANDLEMISSINGATTRIBUTE = unchecked((int)2148734499u);
  100.         internal const int COR_E_SECURITY = unchecked((int)2148734218u);
  101.         internal const int COR_E_SERIALIZATION = unchecked((int)2148734220u);
  102.         internal const int COR_E_SEMAPHOREFULL = unchecked((int)2148734251u);
  103.         internal const int COR_E_WAITHANDLECANNOTBEOPENED = unchecked((int)2148734252u);
  104.         internal const int COR_E_ABANDONEDMUTEX = unchecked((int)2148734253u);
  105.         internal const int COR_E_STACKOVERFLOW = unchecked((int)2147943401u);
  106.         internal const int COR_E_SYNCHRONIZATIONLOCK = unchecked((int)2148734232u);
  107.         internal const int COR_E_SYSTEM = unchecked((int)2148734209u);
  108.         internal const int COR_E_TARGET = unchecked((int)2148734467u);
  109.         internal const int COR_E_TARGETINVOCATION = unchecked((int)2148734468u);
  110.         internal const int COR_E_TARGETPARAMCOUNT = unchecked((int)2147614734u);
  111.         internal const int COR_E_THREADABORTED = unchecked((int)2148734256u);
  112.         internal const int COR_E_THREADINTERRUPTED = unchecked((int)2148734233u);
  113.         internal const int COR_E_THREADSTATE = unchecked((int)2148734240u);
  114.         internal const int COR_E_THREADSTOP = unchecked((int)2148734241u);
  115.         internal const int COR_E_THREADSTART = unchecked((int)2148734245u);
  116.         internal const int COR_E_TYPEINITIALIZATION = unchecked((int)2148734260u);
  117.         internal const int COR_E_TYPELOAD = unchecked((int)2148734242u);
  118.         internal const int COR_E_ENTRYPOINTNOTFOUND = unchecked((int)2148734243u);
  119.         internal const int COR_E_DLLNOTFOUND = unchecked((int)2148734244u);
  120.         internal const int COR_E_UNAUTHORIZEDACCESS = unchecked((int)2147942405u);
  121.         internal const int COR_E_UNSUPPORTEDFORMAT = unchecked((int)2148734243u);
  122.         internal const int COR_E_VERIFICATION = unchecked((int)2148734221u);
  123.         internal const int COR_E_HOSTPROTECTION = unchecked((int)2148734528u);
  124.         internal const int CORSEC_E_MIN_GRANT_FAIL = unchecked((int)2148733975u);
  125.         internal const int CORSEC_E_NO_EXEC_PERM = unchecked((int)2148733976u);
  126.         internal const int CORSEC_E_POLICY_EXCEPTION = unchecked((int)2148733974u);
  127.         internal const int CORSEC_E_XMLSYNTAX = unchecked((int)2148733976u);
  128.         internal const int NTE_FAIL = unchecked((int)2148073504u);
  129.         internal const int CORSEC_E_CRYPTO = unchecked((int)2148734000u);
  130.         internal const int CORSEC_E_CRYPTO_UNEX_OPER = unchecked((int)2148734001u);
  131.         internal const int FUSION_E_REF_DEF_MISMATCH = unchecked((int)2148732992u);
  132.         internal const int FUSION_E_INVALID_NAME = unchecked((int)2148732999u);
  133.     }
  134. }

Developer Fusion