summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/AutoExportDll/cppCLI.cxx
blob: 816bb6e89bb7b74f38ebdd71dded1ba1d166aeb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <stdio.h>

#ifdef __cplusplus_cli
#  include <msclr\marshal_cppstd.h>

void cliFunction()
{
  System::String ^ result = "cliFunction";
  result = result->Trim();
  printf(msclr::interop::marshal_as<std::string>(result).c_str());
}
#else
void cliFunction()
{
  printf("cliFunction (but /cli was not passed to the compiler)");
}
#endif

void nonCliFunction()
{
  printf("nonCliFunction");
}