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 | |
5 | #ifndef __RESOURCE_STRING_H_ |
6 | #define __RESOURCE_STRING_H_ |
7 | |
8 | // Struct to contain a resource ID and its corresponding |
9 | // English language string. |
10 | struct NativeStringResource |
11 | { |
12 | unsigned int resourceId; |
13 | const char* resourceString; |
14 | }; |
15 | |
16 | struct NativeStringResourceTable |
17 | { |
18 | const int size; |
19 | const NativeStringResource *table; |
20 | }; |
21 | |
22 | int LoadNativeStringResource(const NativeStringResourceTable &nativeStringResourceTable, unsigned int iResourceID, char16_t* szBuffer, int iMax, int *pcwchUsed); |
23 | |
24 | #define CONCAT(a, b) a ## b |
25 | |
26 | #define NATIVE_STRING_RESOURCE_TABLE(name) CONCAT(nativeStringResourceTable_, name) |
27 | |
28 | #define DECLARE_NATIVE_STRING_RESOURCE_TABLE(name) \ |
29 | extern const NativeStringResourceTable NATIVE_STRING_RESOURCE_TABLE(name) |
30 | |
31 | #endif // __RESOURCE_STRING_H_ |
32 | |
33 | |