0

I have a function

int func(CString InputParm1, CString InputParm2, 
         CString *OutputParm1, CString *OutputParm2)

Now I call that from

int DDManaged::func(String ^InputParm1, String ^InputParm2,
                    String ^OuputParm1, String ^OutputParm2)

Input variables pass in fine. Output variables I have an issue going from the CString result to the OutputParm1 for example.

How would I do that?

The answer posted is different because it is going from System::String^ to CString. My software does that for the input just fine. My issue is getting the output string back out of the clr function to the c# code. Any ideas?

  • I can printf(OutputParm1) in the CLR but the caller never sees the value, so I am not prototyping my function such that my c# program sees the value...any ideas on what i might be going wrong? –  Apr 01 '16 at 15:44
  • I found the issue in my case. The console.writeline was incorrect. –  Apr 01 '16 at 20:02

0 Answers0