Skip to main content
 首页 » 编程设计

c#之如何从 c# dll、c++/cli 调用的 dll 返回字节数组、uint 值

2024年02月06日15bjzhanghao

我正在编写一个 c# DLL,它将计算并生成:-

-byte array [byte array] 
-unit       [2 byte error code] 
-bool       [true/false for success and failure] 

此函数将由 C++/CLI 项目调用。一个函数只能返回一个值,但在 C# 函数执行后我需要这 3 个值。

C# 中的函数原型(prototype)是什么以及 C++/CLI 代码如何调用它。

提前致谢

请您参考如下方法:

尝试返回该元素的结构或类。