动态调用dll,出现0xc0000374错误
namespace CJ.Views.SHGL
{
public partial class ReportUI : Form
{
public ReportUI()
{
InitializeComponent();
}
[DllImport(@"E:\项目\测井\HW_CJ\CJ\DLL\XTF.dll")]
public static extern void ICloseFile();
[DllImport(@"E:\项目\测井\HW_CJ\CJ\DLL\XTF.dll")]
public static extern void ISetFilePath(string path);
[DllImport(@"E:\项目\测井\HW_CJ\CJ\DLL\XTF.dll")]
public static extern string GetWellName();
[DllImport(@"E:\项目\测井\HW_CJ\CJ\DLL\XTF.dll")]
public static extern int GetLineNums();
[DllImport(@"E:\项目\测井\HW_CJ\CJ\DLL\XTF.dll")]
public static extern string GetLineName(int index);
private void ReportUI_Shown(object sender, EventArgs e)
{
ISetFilePath(@"E:\测井\李成虎发送文件\腰平3.xtf");
//string str = GetWellName();
int aaa;
aaa = GetLineNums();
string name = string.Empty;
for (int i = 0; i < aaa; i++)
{
name = GetLineName(6);//这执行这句话时就会自动跳出程序,也不报错。
}
}
}
}
错误(CJ.exe”(托管): 已加载“E:\项目\测井\HW_CJ\CJ\bin\Debug\Interop.ReportCanvasLib.dll”
“CJ.exe”(托管): 已加载“C:\Windows\assembly\GAC_MSIL\Accessibility\2.0.0.0__b03f5f7f11d50a3a\Accessibility.dll”,已跳过符号加载。已对模块进行了优化并启用了调试器选项“仅我的代码”。
程序“[12124] CJ.exe: 托管”已退出,返回值为 -1073740940 (0xc0000374)。)
麻烦各位帮帮忙!