C/C++/C# 接口

2020-08-21 19:10:49
文子
376
最后编辑:aliang 于 2020-08-21 22:02:10

1、QT 专用接口:

extern "C" bool DWAPI_SendCmd(QString cmd);


2、C/C++ 使用:

extern "C" bool DWAPI_SendCmdA(const char * cmd);


3、C# 引入 DLL:

[DllImport("dwApiLib.dll", EntryPoint = "DWAPI_SendCmdA", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]

private static extern bool DWAPI_SendCmdA(StringBuilder fullPath);