【发布时间】:2012-12-08 11:44:19
【问题描述】:
我一直在尝试在我的 VBA 项目中调用 DLL 函数,但我不断收到以下错误消息:
Run-time error '453': Can't find DLL entry point "CheckStatus" in "Power.dll"
这是 C++ 文件中 DLL 的定义:
#define CLASS_DECLSPEC extern "C" __declspec(dllexport)
CLASS_DECLSPEC int __stdcall CheckStatus();
这就是我试图声明它并在 VBA 中调用它的方式:
Public Declare Function CheckStatus Lib "Power.DLL" () As Long
Dim test As Long
test = CheckStatus
然后当我运行它时收到上述错误消息。
有谁知道如何解决这个问题?谢谢。
【问题讨论】:
标签: c++ vba dll entry-point