inpout32 in VB6 on windows7

My x64 port of InpOut32
Post Reply
mtncbn
New User
Posts: 1
Joined: Fri May 09, 2014 7:19 pm

inpout32 in VB6 on windows7

Post by mtncbn »

First, thanks for the inpout32dll.
Second, I hope no one tells me I missed this solution with all my searches ;-)
Third, hope this helps someone.
adding the 'as integer' on the Out32 declaration solved days of headBanging/hairPulling/drinking
Inp worked all along. Drove myself crazier reasearching vb6 type lengths, etc.
--mtncbn

Code: Select all

Public Declare Function Inp Lib "C:\Telem2\lpt access\inpout32.dll" Alias "Inp32" _
(ByVal PortAddress As Integer) As Integer


Public Declare Function Out32 Lib "C:\Telem2\lpt access\inpout32.dll" _
(ByVal PortAddress As Integer, ByVal Data As Integer) As Integer

Private Sub txt1_Change()
Dim pLpt, vLpt As Integer
pLpt = 888
If Val(txt1.Text) >= 0 And Val(txt1.Text) < 256 Then
    vLpt = Val(txt1.Text)
    Call Out32(pLpt, vLpt)
End If
End Sub
Post Reply