是否可以从Progress ABL中执行C ++代码?
具体来说,我正在寻找使用功能SHGetKnownFolderPath (documentation here)来确定Windows 7计算机上“ Documents”文件夹的位置,该Windows 7计算机已将documents文件夹重定向到另一个位置。
或者,是否有另一种方法可以确定此信息而无需检查注册表项?
最佳答案
您可以调用外部共享库和DLL。
http://documentation.progress.com/output/OpenEdge113/pdfs/dvpin/dvpin.pdf
您正在寻找第3节“外部接口”。
此http://dbappraise.com/ppt/shlib.pptx可能也有帮助。
由于C ++命名方式的原因,经常会出现问题。使用普通的旧C在OpenEdge和C ++之间架设一个“垫片”可能会更好
不过,调用Windows系统功能通常很容易。就像是:
procedure SHGetKnownFolderPath external "pathToLibrary":
define parameter a as someType.
define parameter b as someType.
define return parameter x as someType.
end.