Hi all,
also,my problem is:
I have a DLL in C++
and I want link a function of this DLL in the programm language C#:
my problem is passing this string "COM1" from C# to the
type char *port .
---------------------------------------------------------------------
---C++ DLL---
extern "C" _declspec(dllexport) double getT_AV (long baud, char *port)
{
//port should point at "COM1" :char *port = "COM1"
...
}
---
---My C# Code---this code doesn't working
[DllImport("ChamberDriver.dll")]
public static extern double getT_AV(long baud,string port);
private void get_Temp_Click(object sender, System.EventArgs e)
{
long baud = 19200;
string port ="COM1"
double temp = getT_AV (baud,port);
Output.Text = temp.ToString();
}
---
----------------------------------------------------------------------
I hope my description is understandable ;)
thank you for Help !!!