我是在 Metatrader 中使用 .dll 的新手。我正在尝试执行文件复制 .dll。在我的标题中,我有以下内容:
#import "Kernel32.dll"
bool CopyFileA (string source_file, string destination_file, bool if_exist);
在我的 init() 中,出于测试目的,我有以下内容:
bool check = true;
check = CopyFileA ("c:\test.txt", "c:\Temp\test.txt", true);
Alert(check);
我在选项/专家顾问中启用了“允许 DLL 导入”。所以我初始化为真(所以我知道它正在执行检查)但它总是返回为假。当然,我已经确保 test.txt 以及我 C 盘上的 Temp 文件夹存在。
我已经尝试过回测和在前向测试中放置图表,但它总是返回错误
关于为什么会发生这种情况的任何建议?我确信这是显而易见的,但就像我说的那样,它是 .dll 的新手。提前致谢。