1 | // Licensed to the .NET Foundation under one or more agreements. |
2 | // The .NET Foundation licenses this file to you under the MIT license. |
3 | // See the LICENSE file in the project root for more information. |
4 | // NSENUMS.H - |
5 | // |
6 | |
7 | // |
8 | // Defines NStruct-related enums |
9 | // |
10 | |
11 | // NStruct Field Type's |
12 | // |
13 | // Columns: |
14 | // Name - name of enum |
15 | // Size - the native size (in bytes) of the field. |
16 | // for some fields, this value cannot be computed |
17 | // without more information. if so, put a zero here |
18 | // and make sure CollectNStructFieldMetadata() |
19 | // has code to compute the size. |
20 | // WinRTSupported - true if the field type is supported in WinRT |
21 | // scenarios. |
22 | // |
23 | // PS - Append new entries only at the end of the enum to avoid phone versioning break. |
24 | // Name (COM+ - Native) Size |
25 | |
26 | DEFINE_NFT(NFT_NONE, 0, false) |
27 | |
28 | DEFINE_NFT(NFT_STRINGUNI, sizeof(LPVOID), false) |
29 | DEFINE_NFT(NFT_STRINGANSI, sizeof(LPVOID), false) |
30 | DEFINE_NFT(NFT_FIXEDSTRINGUNI, 0, false) |
31 | DEFINE_NFT(NFT_FIXEDSTRINGANSI, 0, false) |
32 | |
33 | DEFINE_NFT(NFT_FIXEDCHARARRAYANSI, 0, false) |
34 | DEFINE_NFT(NFT_FIXEDARRAY, 0, false) |
35 | |
36 | DEFINE_NFT(NFT_DELEGATE, sizeof(LPVOID), false) |
37 | |
38 | DEFINE_NFT(NFT_COPY1, 1, true) |
39 | DEFINE_NFT(NFT_COPY2, 2, true) |
40 | DEFINE_NFT(NFT_COPY4, 4, true) |
41 | DEFINE_NFT(NFT_COPY8, 8, true) |
42 | |
43 | DEFINE_NFT(NFT_ANSICHAR, 1, false) |
44 | DEFINE_NFT(NFT_WINBOOL, sizeof(BOOL), false) |
45 | |
46 | DEFINE_NFT(NFT_NESTEDLAYOUTCLASS, 0, false) |
47 | DEFINE_NFT(NFT_NESTEDVALUECLASS, 0, true) |
48 | |
49 | DEFINE_NFT(NFT_CBOOL, 1, true) |
50 | |
51 | DEFINE_NFT(NFT_DATE, sizeof(DATE), false) |
52 | DEFINE_NFT(NFT_DECIMAL, sizeof(DECIMAL), false) |
53 | DEFINE_NFT(NFT_INTERFACE, sizeof(IUnknown*), false) |
54 | |
55 | DEFINE_NFT(NFT_SAFEHANDLE, sizeof(LPVOID), false) |
56 | DEFINE_NFT(NFT_CRITICALHANDLE, sizeof(LPVOID), false) |
57 | DEFINE_NFT(NFT_BSTR, sizeof(BSTR), false) |
58 | |
59 | #ifdef FEATURE_COMINTEROP |
60 | DEFINE_NFT(NFT_SAFEARRAY, 0, false) |
61 | DEFINE_NFT(NFT_HSTRING, sizeof(HSTRING), true) |
62 | DEFINE_NFT(NFT_VARIANT, sizeof(VARIANT), false) |
63 | DEFINE_NFT(NFT_VARIANTBOOL, sizeof(VARIANT_BOOL), false) |
64 | DEFINE_NFT(NFT_CURRENCY, sizeof(CURRENCY), false) |
65 | DEFINE_NFT(NFT_DATETIMEOFFSET, sizeof(INT64), true) |
66 | DEFINE_NFT(NFT_SYSTEMTYPE, sizeof(TypeNameNative), true) // System.Type -> Windows.UI.Xaml.Interop.TypeName |
67 | DEFINE_NFT(NFT_WINDOWSFOUNDATIONHRESULT, sizeof(int), true) // Windows.Foundation.HResult is marshaled to System.Exception. |
68 | #endif // FEATURE_COMINTEROP |
69 | DEFINE_NFT(NFT_STRINGUTF8, sizeof(LPVOID), false) |
70 | DEFINE_NFT(NFT_ILLEGAL, 1, true) |
71 | |
72 | #ifdef FEATURE_COMINTEROP |
73 | DEFINE_NFT(NFT_WINDOWSFOUNDATIONIREFERENCE, sizeof(IUnknown*), true) // Windows.Foundation.IReference`1 is marshaled to System.Nullable`1. |
74 | #endif // FEATURE_COMINTEROP |
75 | |
76 | // Append new entries only at the end of the enum to avoid phone versioning break. |
77 | |