sanjapar
March 6th, 2009, 07:21 PM
Hello All,
Please help my urgent situation. I am so so new to c++ and c#
my c++ side code is the following - unmanaged call function
pSWC->SwAction(FunctionName, &Period, &Message, &MsgLength);
Basically here iam passing FunctionName which is char to c# side and asking it to give me information about Period, Message and MsgLength
so C# side I have
public interface SWC
{
void SwAction(string FunctionName, ref long Period, ref string Message, ref long MsgLength);
};
public class ManagedClass: SWC
{
public void SwAction(string FunctionName, ref long Period, ref string Message, ref long
MsgLength)
{
Message = "yes";
Period = 500;
MsgLength = 10;
}
now with this i am basically trying to pass values of Message, Period and MsgLength back to C++.
I am getting error on c++ side saying function does not take 4 arguments
Please help
Please help my urgent situation. I am so so new to c++ and c#
my c++ side code is the following - unmanaged call function
pSWC->SwAction(FunctionName, &Period, &Message, &MsgLength);
Basically here iam passing FunctionName which is char to c# side and asking it to give me information about Period, Message and MsgLength
so C# side I have
public interface SWC
{
void SwAction(string FunctionName, ref long Period, ref string Message, ref long MsgLength);
};
public class ManagedClass: SWC
{
public void SwAction(string FunctionName, ref long Period, ref string Message, ref long
MsgLength)
{
Message = "yes";
Period = 500;
MsgLength = 10;
}
now with this i am basically trying to pass values of Message, Period and MsgLength back to C++.
I am getting error on c++ side saying function does not take 4 arguments
Please help