我有一个VBA项目,它可以对第3方dll进行3次调用,如下所示:
Private Declare Function cm_checkprotection Lib "ACPPYRAMID.DLL" Alias "CM_CheckProtection" (ByVal options As Long) As Long
Private Declare Function cm_getextendederror Lib "ACPPYRAMID.DLL" Alias "CM_GetExtendedError" (ByVal ExtErr As Any) As Long
Private Declare Function cm_getproductkeya Lib "ACPPYRAMID.DLL" Alias "CM_GetProductKeyA" (ByVal ProductKey As Any) As Long
我正在尝试将该项目移植到64位Excel中,但是当我在声明中添加“ PtrSafe”时,Excel栏出现“ Expected:Expression”错误,如下图所示。
有什么办法解决这个问题吗?
TIA,
坦率
答案 0 :(得分:2)
将位置移至
Private Declare PtrSafe Function