前端之家收集整理的这篇文章主要介绍了
VB6.0 调用第三方dll,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
Public Declare Function OpenCom Lib "PCBDll.dll" (ByVal bComId As Byte,ByVal bByteSize As Byte,ByVal bStopBits As Byte,ByVal bParity As Byte,ByVal dwBaudRate As Long) As Long
Public Declare Function CloseCom Lib "PCBDll.dll" (ByVal bComId As Byte) As Long
Public Declare Function ReSet Lib "PCBDll.dll" (ByRef Status As Long,ByVal WaitTime As Long) As Long
Public Declare Function SettingTrackBuf Lib "PCBDll.dll" (ByVal CodeNum As Byte,ByVal Data As String,ByVal DataLen As Long,ByRef Status As Long,ByVal WaitTime As Long) As Long
Public Declare Function WriteTrack Lib "PCBDll.dll" (ByVal CodeNum As Byte,ByVal TrackNum As Long,ByVal WaitTime As Long) As Long
Public Declare Function Read Lib "PCBDll.dll" (ByVal CodeNum As Byte,ByVal Res As String,ByVal WaitTime As Long) As Long
只要原Dll参数类型改成与VB里面类型兼容的类型即可。