I am redesigning an interface of an existing application with a command driven interface that is written in C. I am designing the new front end using c#.net to improve the interface with button's and menu's. I have the source code for the original program and am happy to keep the existing functionality. I have set up the c code as a DLL and exported a few test functions from it so I can interact with my interface. The integer values passing from the front end to the DLL and back again with no problem. I need to pass strings to the DLL to replace the existing drag and drop method of loading with a file open menu. This generates errors as the types in c are defined as char and I haven't figured out how to pass these suceesfully.
Here is the C#.net code I have tried so far.
private void button5_Click(object sender, System.EventArgs e)
filename = "Testing";
textBox5.Text = Win32.testin(filename).ToString();
public class Win32
public static extern string testin(string var1);
Here is the c DLL code
char testin(char var2)
char var3 = var2;
char var4 = "Test Back";
Help would be greatly appreaciated.