VS2017 C#调用labview 2015 生成的Dll-报错-试图加载格式不正确的程序

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#中如何调用???/

这个错误一般说明你的dll的架构和主程序不同,比如说x64下调用了32bit的dll,或者反之。