M
M0
I am referencing a function in a evc++ dll that has the following info
//I can get this function to work fine.
function epNormalLaunchApp(UInt32 creator);
//issues with this function
function epLaunchApp(UInt32 creator, LPCWSTR arg[]);
sample c++ input:
LPCWSTR args[3] = { L"-d" , L"123" , NULL }
epLaunchApp(EP_APP_RX , args );
I am trying to pinvoke from a c# function but keep on getting
System.NotSupportedException
code is below:
[DllImport("epLauncherLib.dll", CharSet=CharSet.Unicode,
EntryPoint="epLaunchApp")]
public static extern int MyFunc(UInt32 creator, string[] parameter);
private void button1_Click(object sender, System.EventArgs e)
{
UInt32 creator = Convert.ToUInt32("6E633532",16); //nc52
string[] xx =new string[]{"-c", "11", null };
MyFunc(creator, xx );
}
is "LPCWSTR arg[]" not the same as "string[] arg" if not how should I
pass my string array to the dll.
//I can get this function to work fine.
function epNormalLaunchApp(UInt32 creator);
//issues with this function
function epLaunchApp(UInt32 creator, LPCWSTR arg[]);
sample c++ input:
LPCWSTR args[3] = { L"-d" , L"123" , NULL }
epLaunchApp(EP_APP_RX , args );
I am trying to pinvoke from a c# function but keep on getting
System.NotSupportedException
code is below:
[DllImport("epLauncherLib.dll", CharSet=CharSet.Unicode,
EntryPoint="epLaunchApp")]
public static extern int MyFunc(UInt32 creator, string[] parameter);
private void button1_Click(object sender, System.EventArgs e)
{
UInt32 creator = Convert.ToUInt32("6E633532",16); //nc52
string[] xx =new string[]{"-c", "11", null };
MyFunc(creator, xx );
}
is "LPCWSTR arg[]" not the same as "string[] arg" if not how should I
pass my string array to the dll.