C#写上位机调用dll推理库

生成dll文件

移步我的另一篇博客
生成可供调用的dll推理库

C#上位机调用

会写的都会写,就没必要多说了,主要是添加上

sharp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
using System.Runtime.InteropServices;
namespace WindowsFormsApp1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

[DllImport("video_detector.dll", EntryPoint = "CreateModel", CharSet = CharSet.Ansi)]
public static extern IntPtr CreateModel();
}
}

然后正常用就完了

结果