#include "stdafx.h"
#include <msclr/marshal.h>
#using <mscorlib.dll>
using namespace System;
using namespace System::Text;
using namespace System::Runtime::InteropServices;
#ifdef _MANAGED
#endif
void abc123()
{
using namespace msclr::interop;
const char* msg1 = "Test String to Marshal";
const wchar_t* msg2= L"Good Luck Aaron";
String^ aMsg = marshal_as<String^>(msg1);
String^ uMsg = marshal_as<String^>(msg2);
Console::WriteLine(aMsg);
Console::WriteLine(uMsg);
}
#pragma unmanaged
int _tmain(int argc, _TCHAR* argv[])
{
abc123();
system("pause");
return 0;
}
#pragma managed