Hello,
I have a C# DLL. I need to call these functions from C++ unmanaged application which is statically bound, no CLI is possible.
What are my options?
Maybe I don't need a CLI wrapper class. Maybe it is easier. Can you make sample for all three functions, please? Thanks in advance!
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace ManagedCSharp
{
public static class ManagedClass
{
static List<string> ListSerials;
static Dictionary<int, string> DicPosSerial;
public static void ShowValue(ref int value)
{
DialogResult result = MessageBox.Show("C# Message Box", "C# Message Box", MessageBoxButtons.OKCancel);
if (result == DialogResult.OK)
{
value = 1;
ListSerials = new List<string>();
DicPosSerial = new Dictionary<int, string>();
}
else
value = 2;
return;
}
public static string GetOrder(string input)
{
return "[ORDER_RES]|2424245|0793|1000|2421Ad";
}
public static bool SendResult(int pos, string serial)
{
ListSerials.Add(serial);
DicPosSerial.Add(pos, serial);
return true;
}
}
}




