Среда разработки, в которой я работаю (не VB 6.0) не понимает dll, но понимает ocx.
Как превратить dll в ocx в VB 6.0?
Option Explicit
Private Const MAX_COMPUTERNAME_LENGTH As Long = 31
Private Declare Function apiGetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Public Function GetComputerName() As String
Dim buff As String, L As Long
L = MAX_COMPUTERNAME_LENGTH + 1
buff = String$(L, 0)
Call apiGetComputerName(buff, L)
buff = Left$(buff, L)
GetComputerName = buff
End Function
Option Explicit
Private Declare Function AddDevice Lib "d:\temp\terminals.dll" Alias "AddDeviceA" () As Integer
Public Function MyAddDevice() As Integer
Dim ReturnVal As Integer
Call AddDevice
ReturnVal = ?
MyAddDevice = ReturnVal
End Function
Function MyAddDevice() As Integer
MyAddDevice = AddDevice()
End Function
Сейчас этот форум просматривают: Majestic-12 [Bot], Yandex-бот и гости: 20