This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
/
ex.cpp
2125 lines (1922 loc) · 80.2 KB
/
ex.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
//
//
// ---------------------------------------------------------------------------
// Ex.cpp
// ---------------------------------------------------------------------------
#include "stdafx.h"
#include "string.h"
#include "ex.h"
#include "holder.h"
// error codes
#include "corerror.h"
#include "../dlls/mscorrc/resource.h"
#include "olectl.h"
#include "corexcep.h"
#define MAX_EXCEPTION_MSG 200
// Set if fatal error (like stack overflow or out of memory) occurred in this process.
GVAL_IMPL_INIT(HRESULT, g_hrFatalError, S_OK);
// Helper function to get an exception object from outside the exception. In
// the CLR, it may be from the Thread object. Non-CLR users have no thread object,
// and it will do nothing.
void GetLastThrownObjectExceptionFromThread(void **ppvException);
Exception *Exception::g_OOMException = NULL;
// avoid global constructors
static BYTE g_OOMExceptionInstance[sizeof(OutOfMemoryException)];
Exception * Exception::GetOOMException()
{
LIMITED_METHOD_CONTRACT;
if (!g_OOMException) {
// Create a local copy on the stack and then copy it over to the static instance.
// This avoids race conditions caused by multiple initializations of vtable in the constructor
OutOfMemoryException local(TRUE); // Construct a "preallocated" instance.
memcpy((void*)&g_OOMExceptionInstance, (void*)&local, sizeof(OutOfMemoryException));
g_OOMException = (OutOfMemoryException*)&g_OOMExceptionInstance;
}
return g_OOMException;
}
/*virtual*/ Exception *OutOfMemoryException::Clone()
{
LIMITED_METHOD_CONTRACT;
return GetOOMException();
}
//------------------------------------------------------------------------------
void Exception::Delete(Exception* pvMemory)
{
CONTRACTL
{
GC_NOTRIGGER;
NOTHROW;
SO_TOLERANT;
SUPPORTS_DAC_HOST_ONLY; // Exceptions aren't currently marshalled by DAC - just used in the host
}
CONTRACTL_END;
if ((pvMemory == 0) || pvMemory->IsPreallocatedException())
{
return;
}
::delete((Exception *) pvMemory);
}
void Exception::GetMessage(SString &result)
{
WRAPPER_NO_CONTRACT;
return GenerateTopLevelHRExceptionMessage(GetHR(), result);
}
void HRMsgException::GetMessage(SString &result)
{
WRAPPER_NO_CONTRACT;
if (m_msg.IsEmpty())
HRException::GetMessage(result);
else
result = m_msg;
}
Exception *Exception::Clone()
{
CONTRACTL
{
GC_NOTRIGGER;
THROWS;
}
CONTRACTL_END;
NewHolder<Exception> retExcep(CloneHelper());
if (m_innerException)
{
retExcep->m_innerException = m_innerException->Clone();
}
retExcep.SuppressRelease();
return retExcep;
}
Exception *Exception::CloneHelper()
{
StackSString s;
GetMessage(s);
return new HRMsgException(GetHR(), s);
}
Exception *Exception::DomainBoundClone()
{
CONTRACTL
{
// Because we may call DomainBoundCloneHelper() of ObjrefException or CLRLastThrownObjectException
// this should be GC_TRIGGERS, but we can not include EE contracts in Utilcode.
THROWS;
}
CONTRACTL_END;
NewHolder<Exception> retExcep(DomainBoundCloneHelper());
if (m_innerException)
{
retExcep->m_innerException = m_innerException->DomainBoundClone();
}
retExcep.SuppressRelease();
return retExcep;
}
BOOL Exception::IsTerminal()
{
CONTRACTL
{
GC_NOTRIGGER;
NOTHROW;
// CLRException::GetHR() can eventually call BaseDomain::CreateHandle(),
// which can indirectly cause a lock if we get a miss in the handle table
// cache (TableCacheMissOnAlloc). Since CLRException::GetHR() is virtual,
// SCAN won't find this for you (though 40 minutes of one of the sql stress
// tests will :-))
CAN_TAKE_LOCK;
}
CONTRACTL_END;
HRESULT hr = GetHR();
return (COR_E_THREADABORTED == hr);
}
BOOL Exception::IsTransient()
{
WRAPPER_NO_CONTRACT;
return IsTransient(GetHR());
}
/* static */
BOOL Exception::IsTransient(HRESULT hr)
{
LIMITED_METHOD_CONTRACT;
return (hr == COR_E_THREADABORTED
|| hr == COR_E_THREADINTERRUPTED
|| hr == COR_E_THREADSTOP
|| hr == COR_E_APPDOMAINUNLOADED
|| hr == E_OUTOFMEMORY
|| hr == HRESULT_FROM_WIN32(ERROR_COMMITMENT_LIMIT) // ran out of room in pagefile
|| hr == HRESULT_FROM_WIN32(ERROR_NOT_ENOUGH_MEMORY)
|| hr == (HRESULT)STATUS_NO_MEMORY
|| hr == COR_E_STACKOVERFLOW
|| hr == MSEE_E_ASSEMBLYLOADINPROGRESS);
}
//------------------------------------------------------------------------------
// Functions to manage the preallocated exceptions.
// Virtual
BOOL Exception::IsPreallocatedException()
{ // Most exceptions can't be preallocated. If they can be, their class
// should provide a virtual override of this function.
return FALSE;
}
BOOL Exception::IsPreallocatedOOMException()
{ // This is the preallocated OOM if it is preallocated and is OOM.
return IsPreallocatedException() && (GetInstanceType() == OutOfMemoryException::GetType());
}
//------------------------------------------------------------------------------
#ifdef _PREFAST_
#pragma warning(push)
#pragma warning(disable:21000) // Suppress PREFast warning about overly large function
#endif
LPCSTR Exception::GetHRSymbolicName(HRESULT hr)
{
LIMITED_METHOD_CONTRACT;
#define CASE_HRESULT(hrname) case hrname: return #hrname;
switch (hr)
{
CASE_HRESULT(S_OK)// 0x00000000L
CASE_HRESULT(S_FALSE)// 0x00000001L
CASE_HRESULT(E_UNEXPECTED)// 0x8000FFFFL
CASE_HRESULT(E_NOTIMPL)// 0x80004001L
CASE_HRESULT(E_OUTOFMEMORY)// 0x8007000EL
CASE_HRESULT(E_INVALIDARG)// 0x80070057L
CASE_HRESULT(E_NOINTERFACE)// 0x80004002L
CASE_HRESULT(E_POINTER)// 0x80004003L
CASE_HRESULT(E_HANDLE)// 0x80070006L
CASE_HRESULT(E_ABORT)// 0x80004004L
CASE_HRESULT(E_FAIL)// 0x80004005L
CASE_HRESULT(E_ACCESSDENIED)// 0x80070005L
#ifdef FEATURE_COMINTEROP
CASE_HRESULT(CO_E_INIT_TLS)// 0x80004006L
CASE_HRESULT(CO_E_INIT_SHARED_ALLOCATOR)// 0x80004007L
CASE_HRESULT(CO_E_INIT_MEMORY_ALLOCATOR)// 0x80004008L
CASE_HRESULT(CO_E_INIT_CLASS_CACHE)// 0x80004009L
CASE_HRESULT(CO_E_INIT_RPC_CHANNEL)// 0x8000400AL
CASE_HRESULT(CO_E_INIT_TLS_SET_CHANNEL_CONTROL)// 0x8000400BL
CASE_HRESULT(CO_E_INIT_TLS_CHANNEL_CONTROL)// 0x8000400CL
CASE_HRESULT(CO_E_INIT_UNACCEPTED_USER_ALLOCATOR)// 0x8000400DL
CASE_HRESULT(CO_E_INIT_SCM_MUTEX_EXISTS)// 0x8000400EL
CASE_HRESULT(CO_E_INIT_SCM_FILE_MAPPING_EXISTS)// 0x8000400FL
CASE_HRESULT(CO_E_INIT_SCM_MAP_VIEW_OF_FILE)// 0x80004010L
CASE_HRESULT(CO_E_INIT_SCM_EXEC_FAILURE)// 0x80004011L
CASE_HRESULT(CO_E_INIT_ONLY_SINGLE_THREADED)// 0x80004012L
// ******************
// FACILITY_ITF
// ******************
CASE_HRESULT(OLE_E_OLEVERB)// 0x80040000L
CASE_HRESULT(OLE_E_ADVF)// 0x80040001L
CASE_HRESULT(OLE_E_ENUM_NOMORE)// 0x80040002L
CASE_HRESULT(OLE_E_ADVISENOTSUPPORTED)// 0x80040003L
CASE_HRESULT(OLE_E_NOCONNECTION)// 0x80040004L
CASE_HRESULT(OLE_E_NOTRUNNING)// 0x80040005L
CASE_HRESULT(OLE_E_NOCACHE)// 0x80040006L
CASE_HRESULT(OLE_E_BLANK)// 0x80040007L
CASE_HRESULT(OLE_E_CLASSDIFF)// 0x80040008L
CASE_HRESULT(OLE_E_CANT_GETMONIKER)// 0x80040009L
CASE_HRESULT(OLE_E_CANT_BINDTOSOURCE)// 0x8004000AL
CASE_HRESULT(OLE_E_STATIC)// 0x8004000BL
CASE_HRESULT(OLE_E_PROMPTSAVECANCELLED)// 0x8004000CL
CASE_HRESULT(OLE_E_INVALIDRECT)// 0x8004000DL
CASE_HRESULT(OLE_E_WRONGCOMPOBJ)// 0x8004000EL
CASE_HRESULT(OLE_E_INVALIDHWND)// 0x8004000FL
CASE_HRESULT(OLE_E_NOT_INPLACEACTIVE)// 0x80040010L
CASE_HRESULT(OLE_E_CANTCONVERT)// 0x80040011L
CASE_HRESULT(OLE_E_NOSTORAGE)// 0x80040012L
CASE_HRESULT(DV_E_FORMATETC)// 0x80040064L
CASE_HRESULT(DV_E_DVTARGETDEVICE)// 0x80040065L
CASE_HRESULT(DV_E_STGMEDIUM)// 0x80040066L
CASE_HRESULT(DV_E_STATDATA)// 0x80040067L
CASE_HRESULT(DV_E_LINDEX)// 0x80040068L
CASE_HRESULT(DV_E_TYMED)// 0x80040069L
CASE_HRESULT(DV_E_CLIPFORMAT)// 0x8004006AL
CASE_HRESULT(DV_E_DVASPECT)// 0x8004006BL
CASE_HRESULT(DV_E_DVTARGETDEVICE_SIZE)// 0x8004006CL
CASE_HRESULT(DV_E_NOIVIEWOBJECT)// 0x8004006DL
CASE_HRESULT(DRAGDROP_E_NOTREGISTERED)// 0x80040100L
CASE_HRESULT(DRAGDROP_E_ALREADYREGISTERED)// 0x80040101L
CASE_HRESULT(DRAGDROP_E_INVALIDHWND)// 0x80040102L
CASE_HRESULT(CLASS_E_NOAGGREGATION)// 0x80040110L
CASE_HRESULT(CLASS_E_CLASSNOTAVAILABLE)// 0x80040111L
CASE_HRESULT(VIEW_E_DRAW)// 0x80040140L
CASE_HRESULT(REGDB_E_READREGDB)// 0x80040150L
CASE_HRESULT(REGDB_E_WRITEREGDB)// 0x80040151L
CASE_HRESULT(REGDB_E_KEYMISSING)// 0x80040152L
CASE_HRESULT(REGDB_E_INVALIDVALUE)// 0x80040153L
CASE_HRESULT(REGDB_E_CLASSNOTREG)// 0x80040154L
CASE_HRESULT(CACHE_E_NOCACHE_UPDATED)// 0x80040170L
CASE_HRESULT(OLEOBJ_E_NOVERBS)// 0x80040180L
CASE_HRESULT(INPLACE_E_NOTUNDOABLE)// 0x800401A0L
CASE_HRESULT(INPLACE_E_NOTOOLSPACE)// 0x800401A1L
CASE_HRESULT(CONVERT10_E_OLESTREAM_GET)// 0x800401C0L
CASE_HRESULT(CONVERT10_E_OLESTREAM_PUT)// 0x800401C1L
CASE_HRESULT(CONVERT10_E_OLESTREAM_FMT)// 0x800401C2L
CASE_HRESULT(CONVERT10_E_OLESTREAM_BITMAP_TO_DIB)// 0x800401C3L
CASE_HRESULT(CONVERT10_E_STG_FMT)// 0x800401C4L
CASE_HRESULT(CONVERT10_E_STG_NO_STD_STREAM)// 0x800401C5L
CASE_HRESULT(CONVERT10_E_STG_DIB_TO_BITMAP)// 0x800401C6L
CASE_HRESULT(CLIPBRD_E_CANT_OPEN)// 0x800401D0L
CASE_HRESULT(CLIPBRD_E_CANT_EMPTY)// 0x800401D1L
CASE_HRESULT(CLIPBRD_E_CANT_SET)// 0x800401D2L
CASE_HRESULT(CLIPBRD_E_BAD_DATA)// 0x800401D3L
CASE_HRESULT(CLIPBRD_E_CANT_CLOSE)// 0x800401D4L
CASE_HRESULT(MK_E_CONNECTMANUALLY)// 0x800401E0L
CASE_HRESULT(MK_E_EXCEEDEDDEADLINE)// 0x800401E1L
CASE_HRESULT(MK_E_NEEDGENERIC)// 0x800401E2L
CASE_HRESULT(MK_E_UNAVAILABLE)// 0x800401E3L
CASE_HRESULT(MK_E_SYNTAX)// 0x800401E4L
CASE_HRESULT(MK_E_NOOBJECT)// 0x800401E5L
CASE_HRESULT(MK_E_INVALIDEXTENSION)// 0x800401E6L
CASE_HRESULT(MK_E_INTERMEDIATEINTERFACENOTSUPPORTED)// 0x800401E7L
CASE_HRESULT(MK_E_NOTBINDABLE)// 0x800401E8L
CASE_HRESULT(MK_E_NOTBOUND)// 0x800401E9L
CASE_HRESULT(MK_E_CANTOPENFILE)// 0x800401EAL
CASE_HRESULT(MK_E_MUSTBOTHERUSER)// 0x800401EBL
CASE_HRESULT(MK_E_NOINVERSE)// 0x800401ECL
CASE_HRESULT(MK_E_NOSTORAGE)// 0x800401EDL
CASE_HRESULT(MK_E_NOPREFIX)// 0x800401EEL
CASE_HRESULT(MK_E_ENUMERATION_FAILED)// 0x800401EFL
CASE_HRESULT(CO_E_NOTINITIALIZED)// 0x800401F0L
CASE_HRESULT(CO_E_ALREADYINITIALIZED)// 0x800401F1L
CASE_HRESULT(CO_E_CANTDETERMINECLASS)// 0x800401F2L
CASE_HRESULT(CO_E_CLASSSTRING)// 0x800401F3L
CASE_HRESULT(CO_E_IIDSTRING)// 0x800401F4L
CASE_HRESULT(CO_E_APPNOTFOUND)// 0x800401F5L
CASE_HRESULT(CO_E_APPSINGLEUSE)// 0x800401F6L
CASE_HRESULT(CO_E_ERRORINAPP)// 0x800401F7L
CASE_HRESULT(CO_E_DLLNOTFOUND)// 0x800401F8L
CASE_HRESULT(CO_E_ERRORINDLL)// 0x800401F9L
CASE_HRESULT(CO_E_WRONGOSFORAPP)// 0x800401FAL
CASE_HRESULT(CO_E_OBJNOTREG)// 0x800401FBL
CASE_HRESULT(CO_E_OBJISREG)// 0x800401FCL
CASE_HRESULT(CO_E_OBJNOTCONNECTED)// 0x800401FDL
CASE_HRESULT(CO_E_APPDIDNTREG)// 0x800401FEL
CASE_HRESULT(CO_E_RELEASED)// 0x800401FFL
CASE_HRESULT(OLE_S_USEREG)// 0x00040000L
CASE_HRESULT(OLE_S_STATIC)// 0x00040001L
CASE_HRESULT(OLE_S_MAC_CLIPFORMAT)// 0x00040002L
CASE_HRESULT(DRAGDROP_S_DROP)// 0x00040100L
CASE_HRESULT(DRAGDROP_S_CANCEL)// 0x00040101L
CASE_HRESULT(DRAGDROP_S_USEDEFAULTCURSORS)// 0x00040102L
CASE_HRESULT(DATA_S_SAMEFORMATETC)// 0x00040130L
CASE_HRESULT(VIEW_S_ALREADY_FROZEN)// 0x00040140L
CASE_HRESULT(CACHE_S_FORMATETC_NOTSUPPORTED)// 0x00040170L
CASE_HRESULT(CACHE_S_SAMECACHE)// 0x00040171L
CASE_HRESULT(CACHE_S_SOMECACHES_NOTUPDATED)// 0x00040172L
CASE_HRESULT(OLEOBJ_S_INVALIDVERB)// 0x00040180L
CASE_HRESULT(OLEOBJ_S_CANNOT_DOVERB_NOW)// 0x00040181L
CASE_HRESULT(OLEOBJ_S_INVALIDHWND)// 0x00040182L
CASE_HRESULT(INPLACE_S_TRUNCATED)// 0x000401A0L
CASE_HRESULT(CONVERT10_S_NO_PRESENTATION)// 0x000401C0L
CASE_HRESULT(MK_S_REDUCED_TO_SELF)// 0x000401E2L
CASE_HRESULT(MK_S_ME)// 0x000401E4L
CASE_HRESULT(MK_S_HIM)// 0x000401E5L
CASE_HRESULT(MK_S_US)// 0x000401E6L
CASE_HRESULT(MK_S_MONIKERALREADYREGISTERED)// 0x000401E7L
// ******************
// FACILITY_WINDOWS
// ******************
CASE_HRESULT(CO_E_CLASS_CREATE_FAILED)// 0x80080001L
CASE_HRESULT(CO_E_SCM_ERROR)// 0x80080002L
CASE_HRESULT(CO_E_SCM_RPC_FAILURE)// 0x80080003L
CASE_HRESULT(CO_E_BAD_PATH)// 0x80080004L
CASE_HRESULT(CO_E_SERVER_EXEC_FAILURE)// 0x80080005L
CASE_HRESULT(CO_E_OBJSRV_RPC_FAILURE)// 0x80080006L
CASE_HRESULT(MK_E_NO_NORMALIZED)// 0x80080007L
CASE_HRESULT(CO_E_SERVER_STOPPING)// 0x80080008L
CASE_HRESULT(MEM_E_INVALID_ROOT)// 0x80080009L
CASE_HRESULT(MEM_E_INVALID_LINK)// 0x80080010L
CASE_HRESULT(MEM_E_INVALID_SIZE)// 0x80080011L
// ******************
// FACILITY_DISPATCH
// ******************
CASE_HRESULT(DISP_E_UNKNOWNINTERFACE)// 0x80020001L
CASE_HRESULT(DISP_E_MEMBERNOTFOUND)// 0x80020003L
CASE_HRESULT(DISP_E_PARAMNOTFOUND)// 0x80020004L
CASE_HRESULT(DISP_E_TYPEMISMATCH)// 0x80020005L
CASE_HRESULT(DISP_E_UNKNOWNNAME)// 0x80020006L
CASE_HRESULT(DISP_E_NONAMEDARGS)// 0x80020007L
CASE_HRESULT(DISP_E_BADVARTYPE)// 0x80020008L
CASE_HRESULT(DISP_E_EXCEPTION)// 0x80020009L
CASE_HRESULT(DISP_E_OVERFLOW)// 0x8002000AL
CASE_HRESULT(DISP_E_BADINDEX)// 0x8002000BL
CASE_HRESULT(DISP_E_UNKNOWNLCID)// 0x8002000CL
CASE_HRESULT(DISP_E_ARRAYISLOCKED)// 0x8002000DL
CASE_HRESULT(DISP_E_BADPARAMCOUNT)// 0x8002000EL
CASE_HRESULT(DISP_E_PARAMNOTOPTIONAL)// 0x8002000FL
CASE_HRESULT(DISP_E_BADCALLEE)// 0x80020010L
CASE_HRESULT(DISP_E_NOTACOLLECTION)// 0x80020011L
CASE_HRESULT(TYPE_E_BUFFERTOOSMALL)// 0x80028016L
CASE_HRESULT(TYPE_E_INVDATAREAD)// 0x80028018L
CASE_HRESULT(TYPE_E_UNSUPFORMAT)// 0x80028019L
CASE_HRESULT(TYPE_E_REGISTRYACCESS)// 0x8002801CL
CASE_HRESULT(TYPE_E_LIBNOTREGISTERED)// 0x8002801DL
CASE_HRESULT(TYPE_E_UNDEFINEDTYPE)// 0x80028027L
CASE_HRESULT(TYPE_E_QUALIFIEDNAMEDISALLOWED)// 0x80028028L
CASE_HRESULT(TYPE_E_INVALIDSTATE)// 0x80028029L
CASE_HRESULT(TYPE_E_WRONGTYPEKIND)// 0x8002802AL
CASE_HRESULT(TYPE_E_ELEMENTNOTFOUND)// 0x8002802BL
CASE_HRESULT(TYPE_E_AMBIGUOUSNAME)// 0x8002802CL
CASE_HRESULT(TYPE_E_NAMECONFLICT)// 0x8002802DL
CASE_HRESULT(TYPE_E_UNKNOWNLCID)// 0x8002802EL
CASE_HRESULT(TYPE_E_DLLFUNCTIONNOTFOUND)// 0x8002802FL
CASE_HRESULT(TYPE_E_BADMODULEKIND)// 0x800288BDL
CASE_HRESULT(TYPE_E_SIZETOOBIG)// 0x800288C5L
CASE_HRESULT(TYPE_E_DUPLICATEID)// 0x800288C6L
CASE_HRESULT(TYPE_E_INVALIDID)// 0x800288CFL
CASE_HRESULT(TYPE_E_TYPEMISMATCH)// 0x80028CA0L
CASE_HRESULT(TYPE_E_OUTOFBOUNDS)// 0x80028CA1L
CASE_HRESULT(TYPE_E_IOERROR)// 0x80028CA2L
CASE_HRESULT(TYPE_E_CANTCREATETMPFILE)// 0x80028CA3L
CASE_HRESULT(TYPE_E_CANTLOADLIBRARY)// 0x80029C4AL
CASE_HRESULT(TYPE_E_INCONSISTENTPROPFUNCS)// 0x80029C83L
CASE_HRESULT(TYPE_E_CIRCULARTYPE)// 0x80029C84L
// ******************
// FACILITY_STORAGE
// ******************
CASE_HRESULT(STG_E_INVALIDFUNCTION)// 0x80030001L
CASE_HRESULT(STG_E_FILENOTFOUND)// 0x80030002L
CASE_HRESULT(STG_E_PATHNOTFOUND)// 0x80030003L
CASE_HRESULT(STG_E_TOOMANYOPENFILES)// 0x80030004L
CASE_HRESULT(STG_E_ACCESSDENIED)// 0x80030005L
CASE_HRESULT(STG_E_INVALIDHANDLE)// 0x80030006L
CASE_HRESULT(STG_E_INSUFFICIENTMEMORY)// 0x80030008L
CASE_HRESULT(STG_E_INVALIDPOINTER)// 0x80030009L
CASE_HRESULT(STG_E_NOMOREFILES)// 0x80030012L
CASE_HRESULT(STG_E_DISKISWRITEPROTECTED)// 0x80030013L
CASE_HRESULT(STG_E_SEEKERROR)// 0x80030019L
CASE_HRESULT(STG_E_WRITEFAULT)// 0x8003001DL
CASE_HRESULT(STG_E_READFAULT)// 0x8003001EL
CASE_HRESULT(STG_E_SHAREVIOLATION)// 0x80030020L
CASE_HRESULT(STG_E_LOCKVIOLATION)// 0x80030021L
CASE_HRESULT(STG_E_FILEALREADYEXISTS)// 0x80030050L
CASE_HRESULT(STG_E_INVALIDPARAMETER)// 0x80030057L
CASE_HRESULT(STG_E_MEDIUMFULL)// 0x80030070L
CASE_HRESULT(STG_E_ABNORMALAPIEXIT)// 0x800300FAL
CASE_HRESULT(STG_E_INVALIDHEADER)// 0x800300FBL
CASE_HRESULT(STG_E_INVALIDNAME)// 0x800300FCL
CASE_HRESULT(STG_E_UNKNOWN)// 0x800300FDL
CASE_HRESULT(STG_E_UNIMPLEMENTEDFUNCTION)// 0x800300FEL
CASE_HRESULT(STG_E_INVALIDFLAG)// 0x800300FFL
CASE_HRESULT(STG_E_INUSE)// 0x80030100L
CASE_HRESULT(STG_E_NOTCURRENT)// 0x80030101L
CASE_HRESULT(STG_E_REVERTED)// 0x80030102L
CASE_HRESULT(STG_E_CANTSAVE)// 0x80030103L
CASE_HRESULT(STG_E_OLDFORMAT)// 0x80030104L
CASE_HRESULT(STG_E_OLDDLL)// 0x80030105L
CASE_HRESULT(STG_E_SHAREREQUIRED)// 0x80030106L
CASE_HRESULT(STG_E_NOTFILEBASEDSTORAGE)// 0x80030107L
CASE_HRESULT(STG_S_CONVERTED)// 0x00030200L
// ******************
// FACILITY_RPC
// ******************
CASE_HRESULT(RPC_E_CALL_REJECTED)// 0x80010001L
CASE_HRESULT(RPC_E_CALL_CANCELED)// 0x80010002L
CASE_HRESULT(RPC_E_CANTPOST_INSENDCALL)// 0x80010003L
CASE_HRESULT(RPC_E_CANTCALLOUT_INASYNCCALL)// 0x80010004L
CASE_HRESULT(RPC_E_CANTCALLOUT_INEXTERNALCALL)// 0x80010005L
CASE_HRESULT(RPC_E_CONNECTION_TERMINATED)// 0x80010006L
CASE_HRESULT(RPC_E_SERVER_DIED)// 0x80010007L
CASE_HRESULT(RPC_E_CLIENT_DIED)// 0x80010008L
CASE_HRESULT(RPC_E_INVALID_DATAPACKET)// 0x80010009L
CASE_HRESULT(RPC_E_CANTTRANSMIT_CALL)// 0x8001000AL
CASE_HRESULT(RPC_E_CLIENT_CANTMARSHAL_DATA)// 0x8001000BL
CASE_HRESULT(RPC_E_CLIENT_CANTUNMARSHAL_DATA)// 0x8001000CL
CASE_HRESULT(RPC_E_SERVER_CANTMARSHAL_DATA)// 0x8001000DL
CASE_HRESULT(RPC_E_SERVER_CANTUNMARSHAL_DATA)// 0x8001000EL
CASE_HRESULT(RPC_E_INVALID_DATA)// 0x8001000FL
CASE_HRESULT(RPC_E_INVALID_PARAMETER)// 0x80010010L
CASE_HRESULT(RPC_E_CANTCALLOUT_AGAIN)// 0x80010011L
CASE_HRESULT(RPC_E_SERVER_DIED_DNE)// 0x80010012L
CASE_HRESULT(RPC_E_SYS_CALL_FAILED)// 0x80010100L
CASE_HRESULT(RPC_E_OUT_OF_RESOURCES)// 0x80010101L
CASE_HRESULT(RPC_E_ATTEMPTED_MULTITHREAD)// 0x80010102L
CASE_HRESULT(RPC_E_NOT_REGISTERED)// 0x80010103L
CASE_HRESULT(RPC_E_FAULT)// 0x80010104L
CASE_HRESULT(RPC_E_SERVERFAULT)// 0x80010105L
CASE_HRESULT(RPC_E_CHANGED_MODE)// 0x80010106L
CASE_HRESULT(RPC_E_INVALIDMETHOD)// 0x80010107L
CASE_HRESULT(RPC_E_DISCONNECTED)// 0x80010108L
CASE_HRESULT(RPC_E_RETRY)// 0x80010109L
CASE_HRESULT(RPC_E_SERVERCALL_RETRYLATER)// 0x8001010AL
CASE_HRESULT(RPC_E_SERVERCALL_REJECTED)// 0x8001010BL
CASE_HRESULT(RPC_E_INVALID_CALLDATA)// 0x8001010CL
CASE_HRESULT(RPC_E_CANTCALLOUT_ININPUTSYNCCALL)// 0x8001010DL
CASE_HRESULT(RPC_E_WRONG_THREAD)// 0x8001010EL
CASE_HRESULT(RPC_E_THREAD_NOT_INIT)// 0x8001010FL
CASE_HRESULT(RPC_E_UNEXPECTED)// 0x8001FFFFL
// ******************
// FACILITY_CTL
// ******************
CASE_HRESULT(CTL_E_ILLEGALFUNCTIONCALL)
CASE_HRESULT(CTL_E_OVERFLOW)
CASE_HRESULT(CTL_E_OUTOFMEMORY)
CASE_HRESULT(CTL_E_DIVISIONBYZERO)
CASE_HRESULT(CTL_E_OUTOFSTRINGSPACE)
CASE_HRESULT(CTL_E_OUTOFSTACKSPACE)
CASE_HRESULT(CTL_E_BADFILENAMEORNUMBER)
CASE_HRESULT(CTL_E_FILENOTFOUND)
CASE_HRESULT(CTL_E_BADFILEMODE)
CASE_HRESULT(CTL_E_FILEALREADYOPEN)
CASE_HRESULT(CTL_E_DEVICEIOERROR)
CASE_HRESULT(CTL_E_FILEALREADYEXISTS)
CASE_HRESULT(CTL_E_BADRECORDLENGTH)
CASE_HRESULT(CTL_E_DISKFULL)
CASE_HRESULT(CTL_E_BADRECORDNUMBER)
CASE_HRESULT(CTL_E_BADFILENAME)
CASE_HRESULT(CTL_E_TOOMANYFILES)
CASE_HRESULT(CTL_E_DEVICEUNAVAILABLE)
CASE_HRESULT(CTL_E_PERMISSIONDENIED)
CASE_HRESULT(CTL_E_DISKNOTREADY)
CASE_HRESULT(CTL_E_PATHFILEACCESSERROR)
CASE_HRESULT(CTL_E_PATHNOTFOUND)
CASE_HRESULT(CTL_E_INVALIDPATTERNSTRING)
CASE_HRESULT(CTL_E_INVALIDUSEOFNULL)
CASE_HRESULT(CTL_E_INVALIDFILEFORMAT)
CASE_HRESULT(CTL_E_INVALIDPROPERTYVALUE)
CASE_HRESULT(CTL_E_INVALIDPROPERTYARRAYINDEX)
CASE_HRESULT(CTL_E_SETNOTSUPPORTEDATRUNTIME)
CASE_HRESULT(CTL_E_SETNOTSUPPORTED)
CASE_HRESULT(CTL_E_NEEDPROPERTYARRAYINDEX)
CASE_HRESULT(CTL_E_SETNOTPERMITTED)
CASE_HRESULT(CTL_E_GETNOTSUPPORTEDATRUNTIME)
CASE_HRESULT(CTL_E_GETNOTSUPPORTED)
CASE_HRESULT(CTL_E_PROPERTYNOTFOUND)
CASE_HRESULT(CTL_E_INVALIDCLIPBOARDFORMAT)
CASE_HRESULT(CTL_E_INVALIDPICTURE)
CASE_HRESULT(CTL_E_PRINTERERROR)
CASE_HRESULT(CTL_E_CANTSAVEFILETOTEMP)
CASE_HRESULT(CTL_E_SEARCHTEXTNOTFOUND)
CASE_HRESULT(CTL_E_REPLACEMENTSTOOLONG)
#endif // FEATURE_COMINTEROP
#ifdef _DEBUG // @todo: do we want to burn strings for this in a free build?
CASE_HRESULT(CEE_E_ENTRYPOINT)
CASE_HRESULT(CEE_E_CVTRES_NOT_FOUND)
CASE_HRESULT(MSEE_E_LOADLIBFAILED)
CASE_HRESULT(MSEE_E_GETPROCFAILED)
CASE_HRESULT(MSEE_E_MULTCOPIESLOADED)
CASE_HRESULT(COR_E_APPDOMAINUNLOADED)
CASE_HRESULT(COR_E_CANNOTUNLOADAPPDOMAIN)
CASE_HRESULT(MSEE_E_ASSEMBLYLOADINPROGRESS)
CASE_HRESULT(MSEE_E_CANNOTCREATEAPPDOMAIN)
CASE_HRESULT(COR_E_FIXUPSINEXE)
CASE_HRESULT(COR_E_NO_LOADLIBRARY_ALLOWED)
CASE_HRESULT(COR_E_MODULE_HASH_CHECK_FAILED)
CASE_HRESULT(FUSION_E_LOADFROM_BLOCKED)
CASE_HRESULT(FUSION_E_CACHEFILE_FAILED)
CASE_HRESULT(FUSION_E_REF_DEF_MISMATCH)
CASE_HRESULT(FUSION_E_INVALID_PRIVATE_ASM_LOCATION)
CASE_HRESULT(FUSION_E_ASM_MODULE_MISSING)
CASE_HRESULT(FUSION_E_UNEXPECTED_MODULE_FOUND)
CASE_HRESULT(FUSION_E_PRIVATE_ASM_DISALLOWED)
CASE_HRESULT(FUSION_E_SIGNATURE_CHECK_FAILED)
CASE_HRESULT(FUSION_E_DATABASE_ERROR)
CASE_HRESULT(FUSION_E_INVALID_NAME)
CASE_HRESULT(FUSION_E_CODE_DOWNLOAD_DISABLED)
CASE_HRESULT(FUSION_E_UNINSTALL_DISALLOWED)
CASE_HRESULT(CLDB_E_FILE_BADREAD)
CASE_HRESULT(CLDB_E_FILE_BADWRITE)
CASE_HRESULT(CLDB_E_FILE_READONLY)
CASE_HRESULT(CLDB_E_NAME_ERROR)
CASE_HRESULT(CLDB_S_TRUNCATION)
CASE_HRESULT(CLDB_E_TRUNCATION)
CASE_HRESULT(CLDB_E_FILE_OLDVER)
CASE_HRESULT(CLDB_E_RELOCATED)
CASE_HRESULT(CLDB_S_NULL)
CASE_HRESULT(CLDB_E_SMDUPLICATE)
CASE_HRESULT(CLDB_E_NO_DATA)
CASE_HRESULT(CLDB_E_READONLY)
CASE_HRESULT(CLDB_E_INCOMPATIBLE)
CASE_HRESULT(CLDB_E_FILE_CORRUPT)
CASE_HRESULT(CLDB_E_SCHEMA_VERNOTFOUND)
CASE_HRESULT(CLDB_E_BADUPDATEMODE)
CASE_HRESULT(CLDB_E_INDEX_NONULLKEYS)
CASE_HRESULT(CLDB_E_INDEX_DUPLICATE)
CASE_HRESULT(CLDB_E_INDEX_BADTYPE)
CASE_HRESULT(CLDB_E_INDEX_NOTFOUND)
CASE_HRESULT(CLDB_S_INDEX_TABLESCANREQUIRED)
CASE_HRESULT(CLDB_E_RECORD_NOTFOUND)
CASE_HRESULT(CLDB_E_RECORD_OVERFLOW)
CASE_HRESULT(CLDB_E_RECORD_DUPLICATE)
CASE_HRESULT(CLDB_E_RECORD_PKREQUIRED)
CASE_HRESULT(CLDB_E_RECORD_DELETED)
CASE_HRESULT(CLDB_E_RECORD_OUTOFORDER)
CASE_HRESULT(CLDB_E_COLUMN_OVERFLOW)
CASE_HRESULT(CLDB_E_COLUMN_READONLY)
CASE_HRESULT(CLDB_E_COLUMN_SPECIALCOL)
CASE_HRESULT(CLDB_E_COLUMN_PKNONULLS)
CASE_HRESULT(CLDB_E_TABLE_CANTDROP)
CASE_HRESULT(CLDB_E_OBJECT_NOTFOUND)
CASE_HRESULT(CLDB_E_OBJECT_COLNOTFOUND)
CASE_HRESULT(CLDB_E_VECTOR_BADINDEX)
CASE_HRESULT(CLDB_E_TOO_BIG)
CASE_HRESULT(META_E_DUPLICATE)
CASE_HRESULT(META_E_GUID_REQUIRED)
CASE_HRESULT(META_E_TYPEDEF_MISMATCH)
CASE_HRESULT(META_E_MERGE_COLLISION)
CASE_HRESULT(META_E_METHD_NOT_FOUND)
CASE_HRESULT(META_E_FIELD_NOT_FOUND)
CASE_HRESULT(META_S_PARAM_MISMATCH)
CASE_HRESULT(META_E_PARAM_MISMATCH)
CASE_HRESULT(META_E_BADMETADATA)
CASE_HRESULT(META_E_INTFCEIMPL_NOT_FOUND)
CASE_HRESULT(META_E_CLASS_LAYOUT_INCONSISTENT)
CASE_HRESULT(META_E_FIELD_MARSHAL_NOT_FOUND)
CASE_HRESULT(META_E_METHODSEM_NOT_FOUND)
CASE_HRESULT(META_E_EVENT_NOT_FOUND)
CASE_HRESULT(META_E_PROP_NOT_FOUND)
CASE_HRESULT(META_E_BAD_SIGNATURE)
CASE_HRESULT(META_E_BAD_INPUT_PARAMETER)
CASE_HRESULT(META_E_METHDIMPL_INCONSISTENT)
CASE_HRESULT(META_E_MD_INCONSISTENCY)
CASE_HRESULT(META_E_CANNOTRESOLVETYPEREF)
CASE_HRESULT(META_S_DUPLICATE)
CASE_HRESULT(META_E_STRINGSPACE_FULL)
CASE_HRESULT(META_E_UNEXPECTED_REMAP)
CASE_HRESULT(META_E_HAS_UNMARKALL)
CASE_HRESULT(META_E_MUST_CALL_UNMARKALL)
CASE_HRESULT(TLBX_E_CANT_LOAD_MODULE)
CASE_HRESULT(TLBX_E_CANT_LOAD_CLASS)
CASE_HRESULT(TLBX_E_NULL_MODULE)
CASE_HRESULT(TLBX_E_NO_CLSID_KEY)
CASE_HRESULT(TLBX_E_CIRCULAR_EXPORT)
CASE_HRESULT(TLBX_E_CIRCULAR_EXPORT2)
CASE_HRESULT(TLBX_E_CIRCULAR_IMPORT)
CASE_HRESULT(TLBX_E_BAD_NATIVETYPE)
CASE_HRESULT(TLBX_E_BAD_VTABLE)
CASE_HRESULT(TLBX_E_CRM_NON_STATIC)
CASE_HRESULT(TLBX_E_CRM_INVALID_SIG)
CASE_HRESULT(TLBX_E_CLASS_LOAD_EXCEPTION)
CASE_HRESULT(TLBX_E_UNKNOWN_SIGNATURE)
CASE_HRESULT(TLBX_E_REFERENCED_TYPELIB)
CASE_HRESULT(TLBX_S_REFERENCED_TYPELIB)
CASE_HRESULT(TLBX_E_LAYOUT_ERROR)
CASE_HRESULT(TLBX_E_NOTIUNKNOWN)
CASE_HRESULT(TLBX_E_NONVISIBLEVALUECLASS)
CASE_HRESULT(TLBX_E_LPTSTR_NOT_ALLOWED)
CASE_HRESULT(TLBX_E_AUTO_CS_NOT_ALLOWED)
CASE_HRESULT(TLBX_S_NOSTDINTERFACE)
CASE_HRESULT(TLBX_S_DUPLICATE_DISPID)
CASE_HRESULT(TLBX_E_ENUM_VALUE_INVALID)
CASE_HRESULT(TLBX_W_ENUM_VALUE_TOOBIG)
CASE_HRESULT(TLBX_E_DUPLICATE_IID)
CASE_HRESULT(TLBX_E_NO_NESTED_ARRAYS)
CASE_HRESULT(TLBX_E_PARAM_ERROR_NAMED)
CASE_HRESULT(TLBX_E_PARAM_ERROR_UNNAMED)
CASE_HRESULT(TLBX_E_AGNOST_SIGNATURE)
CASE_HRESULT(TLBX_E_CONVERT_FAIL)
CASE_HRESULT(TLBX_W_DUAL_NOT_DISPATCH)
CASE_HRESULT(TLBX_E_BAD_SIGNATURE)
CASE_HRESULT(TLBX_E_ARRAY_NEEDS_NT_FIXED)
CASE_HRESULT(TLBX_E_CLASS_NEEDS_NT_INTF)
CASE_HRESULT(TLBX_E_INVALID_TYPEINFO)
CASE_HRESULT(TLBX_E_INVALID_TYPEINFO_UNNAMED)
CASE_HRESULT(TLBX_E_CTX_NESTED)
CASE_HRESULT(TLBX_E_ERROR_MESSAGE)
CASE_HRESULT(TLBX_E_CANT_SAVE)
CASE_HRESULT(TLBX_W_LIBNOTREGISTERED)
CASE_HRESULT(TLBX_E_CANTLOADLIBRARY)
CASE_HRESULT(TLBX_E_BAD_VT_TYPE)
CASE_HRESULT(TLBX_E_NO_MSCOREE_TLB)
CASE_HRESULT(TLBX_E_BAD_MSCOREE_TLB)
CASE_HRESULT(TLBX_E_TLB_EXCEPTION)
CASE_HRESULT(TLBX_E_MULTIPLE_LCIDS)
CASE_HRESULT(TLBX_I_TYPEINFO_IMPORTED)
CASE_HRESULT(TLBX_E_AMBIGUOUS_RETURN)
CASE_HRESULT(TLBX_E_PROPGET_WITHOUT_RETURN)
CASE_HRESULT(TLBX_E_DUPLICATE_TYPE_NAME)
CASE_HRESULT(TLBX_I_USEIUNKNOWN)
CASE_HRESULT(TLBX_I_UNCONVERTABLE_ARGS)
CASE_HRESULT(TLBX_I_UNCONVERTABLE_FIELD)
CASE_HRESULT(TLBX_I_NONSEQUENTIALSTRUCT)
CASE_HRESULT(TLBX_W_WARNING_MESSAGE)
CASE_HRESULT(TLBX_I_RESOLVEREFFAILED)
CASE_HRESULT(TLBX_E_ASANY)
CASE_HRESULT(TLBX_E_INVALIDLCIDPARAM)
CASE_HRESULT(TLBX_E_LCIDONDISPONLYITF)
CASE_HRESULT(TLBX_E_NONPUBLIC_FIELD)
CASE_HRESULT(TLBX_I_TYPE_EXPORTED)
CASE_HRESULT(TLBX_I_DUPLICATE_DISPID)
CASE_HRESULT(TLBX_E_BAD_NAMES)
CASE_HRESULT(TLBX_E_BITNESS_MISMATCH)
CASE_HRESULT(TLBX_I_REF_TYPE_AS_STRUCT)
CASE_HRESULT(TLBX_E_GENERICINST_SIGNATURE)
CASE_HRESULT(TLBX_E_GENERICPAR_SIGNATURE)
CASE_HRESULT(TLBX_I_GENERIC_TYPE)
CASE_HRESULT(TLBX_W_EXPORTING_AUTO_LAYOUT)
CASE_HRESULT(TLBX_E_TYPED_REF)
CASE_HRESULT(TLBX_W_DEFAULT_INTF_NOT_VISIBLE)
CASE_HRESULT(TLBX_W_NON_INTEGRAL_CA_TYPE)
CASE_HRESULT(TLBX_W_IENUM_CA_ON_IUNK)
CASE_HRESULT(TLBX_E_NO_SAFEHANDLE_ARRAYS)
CASE_HRESULT(TLBX_W_NO_PROPS_IN_EVENTS)
CASE_HRESULT(META_E_CA_INVALID_TARGET)
CASE_HRESULT(META_E_CA_INVALID_VALUE)
CASE_HRESULT(META_E_CA_INVALID_BLOB)
CASE_HRESULT(META_E_CA_REPEATED_ARG)
CASE_HRESULT(META_E_CA_UNKNOWN_ARGUMENT)
CASE_HRESULT(META_E_CA_VARIANT_NYI)
CASE_HRESULT(META_E_CA_ARRAY_NYI)
CASE_HRESULT(META_E_CA_UNEXPECTED_TYPE)
CASE_HRESULT(META_E_CA_INVALID_ARGTYPE)
CASE_HRESULT(META_E_CA_INVALID_ARG_FOR_TYPE)
CASE_HRESULT(META_E_CA_INVALID_UUID)
CASE_HRESULT(META_E_CA_INVALID_MARSHALAS_FIELDS)
CASE_HRESULT(META_E_CA_NT_FIELDONLY)
CASE_HRESULT(META_E_CA_NEGATIVE_PARAMINDEX)
CASE_HRESULT(META_E_CA_NEGATIVE_MULTIPLIER)
CASE_HRESULT(META_E_CA_NEGATIVE_CONSTSIZE)
CASE_HRESULT(META_E_CA_FIXEDSTR_SIZE_REQUIRED)
CASE_HRESULT(META_E_CA_CUSTMARSH_TYPE_REQUIRED)
CASE_HRESULT(META_E_CA_FILENAME_REQUIRED)
CASE_HRESULT(META_E_CA_BAD_FRIENDS_ARGS)
CASE_HRESULT(VLDTR_S_WRN)
CASE_HRESULT(VLDTR_S_ERR)
CASE_HRESULT(VLDTR_S_WRNERR)
CASE_HRESULT(VLDTR_E_RID_OUTOFRANGE)
CASE_HRESULT(VLDTR_E_CDTKN_OUTOFRANGE)
CASE_HRESULT(VLDTR_E_CDRID_OUTOFRANGE)
CASE_HRESULT(VLDTR_E_STRING_INVALID)
CASE_HRESULT(VLDTR_E_GUID_INVALID)
CASE_HRESULT(VLDTR_E_BLOB_INVALID)
CASE_HRESULT(VLDTR_E_MOD_MULTI)
CASE_HRESULT(VLDTR_E_MOD_NULLMVID)
CASE_HRESULT(VLDTR_E_TR_NAMENULL)
CASE_HRESULT(VLDTR_E_TR_DUP)
CASE_HRESULT(VLDTR_E_TD_NAMENULL)
CASE_HRESULT(VLDTR_E_TD_DUPNAME)
CASE_HRESULT(VLDTR_E_TD_DUPGUID)
CASE_HRESULT(VLDTR_E_TD_NOTIFACEOBJEXTNULL)
CASE_HRESULT(VLDTR_E_TD_OBJEXTENDSNONNULL)
CASE_HRESULT(VLDTR_E_TD_EXTENDSSEALED)
CASE_HRESULT(VLDTR_E_TD_DLTNORTSPCL)
CASE_HRESULT(VLDTR_E_TD_RTSPCLNOTDLT)
CASE_HRESULT(VLDTR_E_MI_DECLPRIV)
CASE_HRESULT(VLDTR_E_AS_BADNAME)
CASE_HRESULT(VLDTR_E_FILE_SYSNAME)
CASE_HRESULT(VLDTR_E_MI_BODYSTATIC)
CASE_HRESULT(VLDTR_E_TD_IFACENOTABS)
CASE_HRESULT(VLDTR_E_TD_IFACEPARNOTNIL)
CASE_HRESULT(VLDTR_E_TD_IFACEGUIDNULL)
CASE_HRESULT(VLDTR_E_MI_DECLFINAL)
CASE_HRESULT(VLDTR_E_TD_VTNOTSEAL)
CASE_HRESULT(VLDTR_E_PD_BADFLAGS)
CASE_HRESULT(VLDTR_E_IFACE_DUP)
CASE_HRESULT(VLDTR_E_MR_NAMENULL)
CASE_HRESULT(VLDTR_E_MR_VTBLNAME)
CASE_HRESULT(VLDTR_E_MR_DELNAME)
CASE_HRESULT(VLDTR_E_MR_PARNIL)
CASE_HRESULT(VLDTR_E_MR_BADCALLINGCONV)
CASE_HRESULT(VLDTR_E_MR_NOTVARARG)
CASE_HRESULT(VLDTR_E_MR_NAMEDIFF)
CASE_HRESULT(VLDTR_E_MR_SIGDIFF)
CASE_HRESULT(VLDTR_E_MR_DUP)
CASE_HRESULT(VLDTR_E_CL_TDAUTO)
CASE_HRESULT(VLDTR_E_CL_BADPCKSZ)
CASE_HRESULT(VLDTR_E_CL_DUP)
CASE_HRESULT(VLDTR_E_FL_BADOFFSET)
CASE_HRESULT(VLDTR_E_FL_TDNIL)
CASE_HRESULT(VLDTR_E_FL_NOCL)
CASE_HRESULT(VLDTR_E_FL_TDNOTEXPLCT)
CASE_HRESULT(VLDTR_E_FL_FLDSTATIC)
CASE_HRESULT(VLDTR_E_FL_DUP)
CASE_HRESULT(VLDTR_E_MODREF_NAMENULL)
CASE_HRESULT(VLDTR_E_MODREF_DUP)
CASE_HRESULT(VLDTR_E_TR_BADSCOPE)
CASE_HRESULT(VLDTR_E_TD_NESTEDNOENCL)
CASE_HRESULT(VLDTR_E_TD_EXTTRRES)
CASE_HRESULT(VLDTR_E_SIGNULL)
CASE_HRESULT(VLDTR_E_SIGNODATA)
CASE_HRESULT(VLDTR_E_MD_BADCALLINGCONV)
CASE_HRESULT(VLDTR_E_MD_THISSTATIC)
CASE_HRESULT(VLDTR_E_MD_NOTTHISNOTSTATIC)
CASE_HRESULT(VLDTR_E_MD_NOARGCNT)
CASE_HRESULT(VLDTR_E_SIG_MISSELTYPE)
CASE_HRESULT(VLDTR_E_SIG_MISSTKN)
CASE_HRESULT(VLDTR_E_SIG_TKNBAD)
CASE_HRESULT(VLDTR_E_SIG_MISSFPTR)
CASE_HRESULT(VLDTR_E_SIG_MISSFPTRARGCNT)
CASE_HRESULT(VLDTR_E_SIG_MISSRANK)
CASE_HRESULT(VLDTR_E_SIG_MISSNSIZE)
CASE_HRESULT(VLDTR_E_SIG_MISSSIZE)
CASE_HRESULT(VLDTR_E_SIG_MISSNLBND)
CASE_HRESULT(VLDTR_E_SIG_MISSLBND)
CASE_HRESULT(VLDTR_E_SIG_BADELTYPE)
CASE_HRESULT(VLDTR_E_FD_BADCALLINGCONV)
CASE_HRESULT(VLDTR_E_MD_NAMENULL)
CASE_HRESULT(VLDTR_E_MD_PARNIL)
CASE_HRESULT(VLDTR_E_MD_DUP)
CASE_HRESULT(VLDTR_E_FD_NAMENULL)
CASE_HRESULT(VLDTR_E_FD_PARNIL)
CASE_HRESULT(VLDTR_E_FD_DUP)
CASE_HRESULT(VLDTR_E_AS_MULTI)
CASE_HRESULT(VLDTR_E_AS_NAMENULL)
CASE_HRESULT(VLDTR_E_SIG_TOKTYPEMISMATCH)
CASE_HRESULT(VLDTR_E_CL_TDINTF)
CASE_HRESULT(VLDTR_E_ASOS_OSPLTFRMIDINVAL)
CASE_HRESULT(VLDTR_E_AR_NAMENULL)
CASE_HRESULT(VLDTR_E_TD_ENCLNOTNESTED)
CASE_HRESULT(VLDTR_E_AROS_OSPLTFRMIDINVAL)
CASE_HRESULT(VLDTR_E_FILE_NAMENULL)
CASE_HRESULT(VLDTR_E_CT_NAMENULL)
CASE_HRESULT(VLDTR_E_TD_EXTENDSCHILD)
CASE_HRESULT(VLDTR_E_MAR_NAMENULL)
CASE_HRESULT(VLDTR_E_FILE_DUP)
CASE_HRESULT(VLDTR_E_FILE_NAMEFULLQLFD)
CASE_HRESULT(VLDTR_E_CT_DUP)
CASE_HRESULT(VLDTR_E_MAR_DUP)
CASE_HRESULT(VLDTR_E_MAR_NOTPUBPRIV)
CASE_HRESULT(VLDTR_E_TD_ENUMNOVALUE)
CASE_HRESULT(VLDTR_E_TD_ENUMVALSTATIC)
CASE_HRESULT(VLDTR_E_TD_ENUMVALNOTSN)
CASE_HRESULT(VLDTR_E_TD_ENUMFLDNOTST)
CASE_HRESULT(VLDTR_E_TD_ENUMFLDNOTLIT)
CASE_HRESULT(VLDTR_E_TD_ENUMNOLITFLDS)
CASE_HRESULT(VLDTR_E_TD_ENUMFLDSIGMISMATCH)
CASE_HRESULT(VLDTR_E_TD_ENUMVALNOT1ST)
CASE_HRESULT(VLDTR_E_FD_NOTVALUERTSN)
CASE_HRESULT(VLDTR_E_FD_VALUEPARNOTENUM)
CASE_HRESULT(VLDTR_E_FD_INSTINIFACE)
CASE_HRESULT(VLDTR_E_FD_NOTPUBINIFACE)
CASE_HRESULT(VLDTR_E_FMD_GLOBALNOTPUBPRIVSC)
CASE_HRESULT(VLDTR_E_FMD_GLOBALNOTSTATIC)
CASE_HRESULT(VLDTR_E_FD_GLOBALNORVA)
CASE_HRESULT(VLDTR_E_MD_CTORZERORVA)
CASE_HRESULT(VLDTR_E_FD_MARKEDNOMARSHAL)
CASE_HRESULT(VLDTR_E_FD_MARSHALNOTMARKED)
CASE_HRESULT(VLDTR_E_FD_MARKEDNODEFLT)
CASE_HRESULT(VLDTR_E_FD_DEFLTNOTMARKED)
CASE_HRESULT(VLDTR_E_FMD_MARKEDNOSECUR)
CASE_HRESULT(VLDTR_E_FMD_SECURNOTMARKED)
CASE_HRESULT(VLDTR_E_FMD_PINVOKENOTSTATIC)
CASE_HRESULT(VLDTR_E_FMD_MARKEDNOPINVOKE)
CASE_HRESULT(VLDTR_E_FMD_PINVOKENOTMARKED)
CASE_HRESULT(VLDTR_E_FMD_BADIMPLMAP)
CASE_HRESULT(VLDTR_E_IMAP_BADMODREF)
CASE_HRESULT(VLDTR_E_IMAP_BADMEMBER)
CASE_HRESULT(VLDTR_E_IMAP_BADIMPORTNAME)
CASE_HRESULT(VLDTR_E_IMAP_BADCALLCONV)
CASE_HRESULT(VLDTR_E_FMD_BADACCESSFLAG)
CASE_HRESULT(VLDTR_E_FD_INITONLYANDLITERAL)
CASE_HRESULT(VLDTR_E_FD_LITERALNOTSTATIC)
CASE_HRESULT(VLDTR_E_FMD_RTSNNOTSN)
CASE_HRESULT(VLDTR_E_MD_ABSTPARNOTABST)
CASE_HRESULT(VLDTR_E_MD_NOTSTATABSTININTF)
CASE_HRESULT(VLDTR_E_MD_NOTPUBININTF)
CASE_HRESULT(VLDTR_E_MD_CTORININTF)
CASE_HRESULT(VLDTR_E_MD_GLOBALCTORCCTOR)
CASE_HRESULT(VLDTR_E_MD_CTORSTATIC)
CASE_HRESULT(VLDTR_E_MD_CTORNOTSNRTSN)
CASE_HRESULT(VLDTR_E_MD_CTORVIRT)
CASE_HRESULT(VLDTR_E_MD_CTORABST)
CASE_HRESULT(VLDTR_E_MD_CCTORNOTSTATIC)
CASE_HRESULT(VLDTR_E_MD_ZERORVA)
CASE_HRESULT(VLDTR_E_MD_FINNOTVIRT)
CASE_HRESULT(VLDTR_E_MD_STATANDFINORVIRT)
CASE_HRESULT(VLDTR_E_MD_ABSTANDFINAL)
CASE_HRESULT(VLDTR_E_MD_ABSTANDIMPL)
CASE_HRESULT(VLDTR_E_MD_ABSTANDPINVOKE)
CASE_HRESULT(VLDTR_E_MD_ABSTNOTVIRT)
CASE_HRESULT(VLDTR_E_MD_NOTABSTNOTIMPL)
CASE_HRESULT(VLDTR_E_MD_NOTABSTBADFLAGSRVA)
CASE_HRESULT(VLDTR_E_MD_PRIVSCOPENORVA)
CASE_HRESULT(VLDTR_E_MD_GLOBALABSTORVIRT)
CASE_HRESULT(VLDTR_E_SIG_LONGFORM)
CASE_HRESULT(VLDTR_E_MD_MULTIPLESEMANTICS)
CASE_HRESULT(VLDTR_E_MD_INVALIDSEMANTICS)
CASE_HRESULT(VLDTR_E_MD_SEMANTICSNOTEXIST)
CASE_HRESULT(VLDTR_E_MI_DECLNOTVIRT)
CASE_HRESULT(VLDTR_E_FMD_GLOBALITEM)
CASE_HRESULT(VLDTR_E_MD_MULTSEMANTICFLAGS)
CASE_HRESULT(VLDTR_E_MD_NOSEMANTICFLAGS)
CASE_HRESULT(VLDTR_E_FD_FLDINIFACE)
CASE_HRESULT(VLDTR_E_AS_HASHALGID)
CASE_HRESULT(VLDTR_E_AS_PROCID)
CASE_HRESULT(VLDTR_E_AR_PROCID)
CASE_HRESULT(VLDTR_E_CN_PARENTRANGE)
CASE_HRESULT(VLDTR_E_AS_BADFLAGS)
CASE_HRESULT(VLDTR_E_TR_HASTYPEDEF)
CASE_HRESULT(VLDTR_E_IFACE_BADIMPL)
CASE_HRESULT(VLDTR_E_IFACE_BADIFACE)
CASE_HRESULT(VLDTR_E_TD_SECURNOTMARKED)
CASE_HRESULT(VLDTR_E_TD_MARKEDNOSECUR)
CASE_HRESULT(VLDTR_E_MD_CCTORHASARGS)
CASE_HRESULT(VLDTR_E_CT_BADIMPL)
CASE_HRESULT(VLDTR_E_MI_ALIENBODY)
CASE_HRESULT(VLDTR_E_MD_CCTORCALLCONV)
CASE_HRESULT(VLDTR_E_MI_BADCLASS)
CASE_HRESULT(VLDTR_E_MI_CLASSISINTF)
CASE_HRESULT(VLDTR_E_MI_BADDECL)
CASE_HRESULT(VLDTR_E_MI_BADBODY)
CASE_HRESULT(VLDTR_E_MI_DUP)
CASE_HRESULT(VLDTR_E_FD_BADPARENT)
CASE_HRESULT(VLDTR_E_MD_PARAMOUTOFSEQ)
CASE_HRESULT(VLDTR_E_MD_PARASEQTOOBIG)
CASE_HRESULT(VLDTR_E_MD_PARMMARKEDNOMARSHAL)
CASE_HRESULT(VLDTR_E_MD_PARMMARSHALNOTMARKED)
CASE_HRESULT(VLDTR_E_MD_PARMMARKEDNODEFLT)
CASE_HRESULT(VLDTR_E_MD_PARMDEFLTNOTMARKED)
CASE_HRESULT(VLDTR_E_PR_BADSCOPE)
CASE_HRESULT(VLDTR_E_PR_NONAME)
CASE_HRESULT(VLDTR_E_PR_NOSIG)
CASE_HRESULT(VLDTR_E_PR_DUP)
CASE_HRESULT(VLDTR_E_PR_BADCALLINGCONV)
CASE_HRESULT(VLDTR_E_PR_MARKEDNODEFLT)
CASE_HRESULT(VLDTR_E_PR_DEFLTNOTMARKED)
CASE_HRESULT(VLDTR_E_PR_BADSEMANTICS)
CASE_HRESULT(VLDTR_E_PR_BADMETHOD)
CASE_HRESULT(VLDTR_E_PR_ALIENMETHOD)
CASE_HRESULT(VLDTR_E_CN_BLOBNOTNULL)
CASE_HRESULT(VLDTR_E_CN_BLOBNULL)
CASE_HRESULT(VLDTR_E_EV_BADSCOPE)
CASE_HRESULT(VLDTR_E_EV_NONAME)
CASE_HRESULT(VLDTR_E_EV_DUP)
CASE_HRESULT(VLDTR_E_EV_BADEVTYPE)
CASE_HRESULT(VLDTR_E_EV_EVTYPENOTCLASS)
CASE_HRESULT(VLDTR_E_EV_BADSEMANTICS)
CASE_HRESULT(VLDTR_E_EV_BADMETHOD)
CASE_HRESULT(VLDTR_E_EV_ALIENMETHOD)
CASE_HRESULT(VLDTR_E_EV_NOADDON)
CASE_HRESULT(VLDTR_E_EV_NOREMOVEON)
CASE_HRESULT(VLDTR_E_CT_DUPTDNAME)
CASE_HRESULT(VLDTR_E_MAR_BADOFFSET)
CASE_HRESULT(VLDTR_E_DS_BADOWNER)
CASE_HRESULT(VLDTR_E_DS_BADFLAGS)
CASE_HRESULT(VLDTR_E_DS_NOBLOB)
CASE_HRESULT(VLDTR_E_MAR_BADIMPL)
CASE_HRESULT(VLDTR_E_MR_VARARGCALLINGCONV)
CASE_HRESULT(VLDTR_E_MD_CTORNOTVOID)
CASE_HRESULT(VLDTR_E_EV_FIRENOTVOID)
CASE_HRESULT(VLDTR_E_AS_BADLOCALE)
CASE_HRESULT(VLDTR_E_CN_PARENTTYPE)
CASE_HRESULT(VLDTR_E_SIG_SENTINMETHODDEF)
CASE_HRESULT(VLDTR_E_SIG_SENTMUSTVARARG)
CASE_HRESULT(VLDTR_E_SIG_MULTSENTINELS)
CASE_HRESULT(VLDTR_E_SIG_LASTSENTINEL)
CASE_HRESULT(VLDTR_E_SIG_MISSARG)
CASE_HRESULT(VLDTR_E_SIG_BYREFINFIELD)
CASE_HRESULT(VLDTR_E_MD_SYNCMETHODINVTYPE)
CASE_HRESULT(VLDTR_E_TD_NAMETOOLONG)
CASE_HRESULT(VLDTR_E_AS_PROCDUP)
CASE_HRESULT(VLDTR_E_ASOS_DUP)
CASE_HRESULT(VLDTR_E_MAR_BADFLAGS)
CASE_HRESULT(VLDTR_E_CT_NOTYPEDEFID)
CASE_HRESULT(VLDTR_E_FILE_BADFLAGS)
CASE_HRESULT(VLDTR_E_FILE_NULLHASH)
CASE_HRESULT(VLDTR_E_MOD_NONAME)
CASE_HRESULT(VLDTR_E_MOD_NAMEFULLQLFD)
CASE_HRESULT(VLDTR_E_TD_RTSPCLNOTSPCL)
CASE_HRESULT(VLDTR_E_TD_EXTENDSIFACE)
CASE_HRESULT(VLDTR_E_MD_CTORPINVOKE)
CASE_HRESULT(VLDTR_E_TD_SYSENUMNOTCLASS)
CASE_HRESULT(VLDTR_E_TD_SYSENUMNOTEXTVTYPE)
CASE_HRESULT(VLDTR_E_MI_SIGMISMATCH)
CASE_HRESULT(VLDTR_E_TD_ENUMHASMETHODS)
CASE_HRESULT(VLDTR_E_TD_ENUMIMPLIFACE)
CASE_HRESULT(VLDTR_E_TD_ENUMHASPROP)
CASE_HRESULT(VLDTR_E_TD_ENUMHASEVENT)
CASE_HRESULT(VLDTR_E_TD_BADMETHODLST)
CASE_HRESULT(VLDTR_E_TD_BADFIELDLST)
CASE_HRESULT(VLDTR_E_CN_BADTYPE)
CASE_HRESULT(VLDTR_E_TD_ENUMNOINSTFLD)
CASE_HRESULT(VLDTR_E_TD_ENUMMULINSTFLD)
CASE_HRESULT(VLDTR_E_INTERRUPTED)
CASE_HRESULT(VLDTR_E_NOTINIT)
CASE_HRESULT(VLDTR_E_IFACE_NOTIFACE)
CASE_HRESULT(VLDTR_E_FD_RVAHASNORVA)
CASE_HRESULT(VLDTR_E_FD_RVAHASZERORVA)
CASE_HRESULT(VLDTR_E_MD_RVAANDIMPLMAP)
CASE_HRESULT(VLDTR_E_TD_EXTRAFLAGS)
CASE_HRESULT(VLDTR_E_TD_EXTENDSITSELF)
CASE_HRESULT(VLDTR_E_TD_SYSVTNOTEXTOBJ)
CASE_HRESULT(VLDTR_E_TD_EXTTYPESPEC)
CASE_HRESULT(VLDTR_E_TD_VTNOSIZE)
CASE_HRESULT(VLDTR_E_TD_IFACESEALED)
CASE_HRESULT(VLDTR_E_NC_BADNESTED)
CASE_HRESULT(VLDTR_E_NC_BADENCLOSER)
CASE_HRESULT(VLDTR_E_NC_DUP)
CASE_HRESULT(VLDTR_E_NC_DUPENCLOSER)
CASE_HRESULT(VLDTR_E_FRVA_ZERORVA)
CASE_HRESULT(VLDTR_E_FRVA_BADFIELD)
CASE_HRESULT(VLDTR_E_FRVA_DUPRVA)
CASE_HRESULT(VLDTR_E_FRVA_DUPFIELD)
CASE_HRESULT(VLDTR_E_EP_BADTOKEN)