1 | // Copyright (c) Microsoft. All rights reserved. |
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. |
3 | |
4 | #include "native.h" |
5 | |
6 | |
7 | struct MyValueType { |
8 | int count; |
9 | __int64 sum; |
10 | double average; |
11 | __int64 dummy1; |
12 | double dummy2; |
13 | }; |
14 | |
15 | |
16 | MCC_API MyValueType WINAPI sum( |
17 | unsigned __int64 a01, unsigned __int64 a02, unsigned __int64 a03, |
18 | unsigned __int64 a04, unsigned __int64 a05, unsigned __int64 a06, |
19 | unsigned __int64 a07, unsigned __int64 a08, unsigned __int64 a09, |
20 | unsigned __int64 a10, unsigned __int64 a11, unsigned __int64 a12) { |
21 | MyValueType result; |
22 | |
23 | result.sum = static_cast<__int64>(a01 + a02 + a03 + a04 + a05 + a06 + a07 + a08 + a09 + a10 + a11 + a12); |
24 | result.count = 12; |
25 | result.average = (double)result.sum / result.count; |
26 | result.dummy1 = result.sum; |
27 | result.dummy2 = result.average; |
28 | return result; |
29 | } |
30 | |