Labview 生成的函数原型如下:
#include "extcode.h"
#ifdef __cplusplus
extern "C" {
#endif
/*!
- StringTest */ void __cdecl StringTest(char String_Input[]);
MgErr __cdecl LVDLLStatus(char *errStr, int errStrLen, void *module);
#ifdef __cplusplus
} // extern "C"
#endif
调用代码:
[DllImport("TypeTest.dll", EntryPoint = "OutTest", CallingConvention = CallingConvention.Cdecl)]
public static extern double OutTest(char[] path);
static void Main(string[] args)
{
LvDll.OutTest("Test".ToCharArray());
Console.ReadLine();
}
在c#中如何调用???/