I've created a CLR project and now I need to convert a C# textBox.Text property into a C-ansi characters array (null-terminated). I need to pass the text to a C function, something like this:
UPDATE2:
// Form1.h (C#)
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
myCFunction(textBoxName.Text); // wrong
}
// utils.h (C) - inside the same project as Form1.h
void myCFunction(char* szName);
// utils.cpp (C) - inside the same project as Form1.h
void myCFunction(char* szName)
{
// do something
}