I have a C# application that calls functions in a DLL written in C++. The calls work fine and the code is executed using this method in the C#:
[DllImport("myDLL.dll")]
public static extern void Function();
static void Main()
{
Function();
}
Now this works, I need the executing C++ code to send back the text to the C# where it can be displayed in a panel.
The text is “stage one…” executes code…then “stage two” etc, showing the processes running. Just basic stuff. I’m not sure how to approach this as I’m not a C++ guy. My main skills are .NET.
Cheers
Try using callbacks in C++ and sign them in C#
C++ part
In C++ Function call make call of pfNotifyMessage
C# part
in С# assign delegate with function