Tuesday, May 10, 2011

paralel port inpout32 visual basic 6.0 programming

if you want to program paralel port in visual basic 6.0 to windows xp. you must use inpout32.dll because windows xp block access paralel port with firewall if you use instruction port assembler in visual basic. so i will give u simple program to use file inpout32.dll in visual basic 6.0. before you are programming in vb, you must place inpout32.dll in folder where you save program or in c://windows/system32. then  you must initial inpout32.dll in your program
so
type in your program this instruction

Private Declare Function Inp Lib "inpout32.dll" _
Alias "Inp32" (ByVal PortAddress As Integer) As Integer

Private Declare Sub Out Lib "inpout32.dll" _
Alias "Out32" (ByVal PortAddress As Integer, ByVal Value As Integer)


'after initialisation out and inp we can use out and inp in visual basic 6.0 so we can use example:
Private Sub Command1_Click()
Out Val("&H378"), Val("&H" & Text1.Text)
End Sub

Private Sub Command2_Click()
Text2.Text = Inp(Val("&H378"))
End Sub

you can download example program in this link
and link

3 comments:

  1. Many many many thanks. This allowed me to use Inpout.dll to rotate an electric stepper motor.

    ReplyDelete
  2. Required to give back that not much remark merely to thank you all over again because of these spectacular techniques you could have provided in this post. It’s so particularly generous with individuals as if you to deliver unreservedly what most people can have marketed being an guide to earn some dough for their own reasons, primarily considering that you could have tried it should you wanted. The tactics also acted to get easy way understand that most of us have similar desire just like my very own to recognize significantly more concerning this condition. I’m there are many nicer opportunities at the start for individuals who read through your site post. IT Support Northampton

    ReplyDelete
  3. Thank You and that i have a swell offer you: Renovation House Company house remodel cost

    ReplyDelete