如何使用GO导入用C编写的DLL函数? [英] how to import a DLL function written in C using GO?

查看:92
本文介绍了如何使用GO导入用C编写的DLL函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个示例代码,该示例代码如何从用C语言编写的dll中导入与 C#.NET的 DllImport 等价的。这是可能的?
我正在使用Windows。
任何帮助表示赞赏。提前致谢。

I'm looking for an example code how import a function from a dll written in C. equivalent to DllImport of C#.NET. It's possible? I'm using windows. any help is appreciated. thanks in advance.

推荐答案

您要使用 cgo 这里是简介。

这篇关于如何使用GO导入用C编写的DLL函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆