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#include <stdlib.h>
6#include <stdio.h>
7#include <string.h>
8#include <xplatform.h>
9
10
11extern "C" bool DLL_EXPORT STDMETHODCALLTYPE Char_In(char c)
12{
13 printf ("Char_In ");
14 printf ("%c",c);
15 printf ("\n");
16
17 return TRUE;
18}
19
20extern "C" bool DLL_EXPORT STDMETHODCALLTYPE Char_InByRef(char* c)
21{
22 printf ("Char_InByRef ");
23 printf ("%c",*c);
24 printf ("\n");
25
26 return TRUE;
27}
28
29extern "C" bool DLL_EXPORT STDMETHODCALLTYPE Char_InOutByRef(char* c)
30{
31 printf ("Char_InOutByRef ");
32 printf ("%c",*c);
33 printf ("\n");
34
35 return TRUE;
36}
37
38extern "C" bool DLL_EXPORT STDMETHODCALLTYPE CharBuffer_In_String(char* c)
39{
40 printf ("native %s \n", c);
41
42 return TRUE;
43}
44
45extern "C" bool DLL_EXPORT STDMETHODCALLTYPE CharBuffer_InByRef_String(char** c)
46{
47 printf ("native %s \n", *c);
48
49 return TRUE;
50}
51
52extern "C" bool DLL_EXPORT STDMETHODCALLTYPE CharBuffer_InOutByRef_String(char** c)
53{
54 printf ("native %s \n", *c);
55
56 return TRUE;
57}
58
59extern "C" bool DLL_EXPORT STDMETHODCALLTYPE CharBuffer_In_StringBuilder(char* c)
60{
61 printf ("native %s \n", c);
62
63 return TRUE;
64}
65
66extern "C" bool DLL_EXPORT STDMETHODCALLTYPE CharBuffer_InByRef_StringBuilder(char** c)
67{
68 printf ("native %s \n", *c);
69
70 return TRUE;
71}
72
73extern "C" bool DLL_EXPORT STDMETHODCALLTYPE CharBuffer_InOutByRef_StringBuilder(char** c)
74{
75 printf ("native %s \n", *c);
76
77 return TRUE;
78}
79
80extern "C" bool DLL_EXPORT STDMETHODCALLTYPE Char_In_ArrayWithOffset (char* pArrayWithOffset)
81{
82 return TRUE;
83}
84
85extern "C" bool DLL_EXPORT STDMETHODCALLTYPE Char_InOut_ArrayWithOffset (char* pArrayWithOffset)
86{
87 return TRUE;
88}
89
90extern "C" bool DLL_EXPORT STDMETHODCALLTYPE Char_InByRef_ArrayWithOffset (char** ppArrayWithOffset)
91{
92 return TRUE;
93}
94
95extern "C" bool DLL_EXPORT STDMETHODCALLTYPE Char_InOutByRef_ArrayWithOffset (char** ppArrayWithOffset)
96{
97 return TRUE;
98}
99