用Declare调用DLL的枚举变量值,求助
用VB6生成的zbs112.dll,类名称:clsSet
Option Explicit
'对齐方式
Public Enum Align
alignLeft = 1
aligncenter = 2
alignright = 3
End Enum
在VB6里动态调用此zbs112.dll时,能用API取得上述枚举变量aligncenter,下述如何修改?
Private Declare Function SetAlign Lib "%systemroot%\SysWoW64\zbs112.dll" (ByRef xxx As Align) As Long
Private Sub Form_Load()
'复制zbs112.dll到系统SysWoW64的文件下,同时注册该控件
Shell "cmd /c Copy .\zbs112.dll %systemroot%\SysWoW64\", vbHide
Shell "cmd /c RegSvr32 /s %systemroot%\SysWoW64\zbs112.dll", vbHide
MsgBox SetAlign(aligncenter) '显示出此枚举值(值为2)
End Sub
Private Sub Form_Unload(Cancel As Integer)
End
End Sub