C++ CLI error C3767: candidate function(s) not accessible

The problem is that std::string will compile as a internal (non public) type. This is actually a change in VS 2005+: http://msdn.microsoft.com/en-us/library/ms177253(VS.80).aspx: Native types are private by default outside the assembly Native types now will not be visible outside the assembly by default. For more information on type visibility outside the assembly, see Type Visibility. … Read more

how to convert System::String to const char*?

You can do this using the msclr::interop::marshal_context class: #include <msclr/marshal.h> Then: String^ something = “something”; msclr::interop::marshal_context ctx; const char* converted = ctx.marshal_as<const char*>(something); system(converted); The buffer for converted will be freed when ctx goes out of scope. But in your case it would be much easier to just call an equivalent managed API: System::Diagnostics::Process::Start(“netsh”, “the … Read more