DllImport 方法调用dll文件返回-4

大侠们,我想问下我用下面方法调用dll文件,用方法openFile_DLL取值时返回值总是-4,请问是何原因?谢谢。
[DllImport("GFileAnalysis.dll", EntryPoint = "openFile", CallingConvention = CallingConvention.Cdecl)]
private static extern int openFile_DLL(string filename);

追问:
在dll文件中openFile方法的返回值为1或0的嘛。为啥子调用的时候返回-4.想不明白,请哪位大侠帮帮忙哇,在线等待。(我的操作系统是WIN 7 64位)

CallingConvention.Cdecl
你确认么?大部分dll是StdCall

@caozhy,当然确认了,程序就是这样的。

你代码中要看一下你的函数导出预编译宏怎么设置的。如果在代码层,直接Dllimport就可以导入了