looking for information to use inpout32.dll in VB6

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gobblegob
    New Member
    • Dec 2007
    • 133

    looking for information to use inpout32.dll in VB6

    Hi guys,

    Iam after some information/code examples on how to access parallel port from VB6 after a lot of digging i found i need to use inpout32.dll but no luck
    on anything written in vb6, If anyone has any links or samples it would be
    much appreciated.

    Gobble.
  • VBWheaties
    New Member
    • Feb 2008
    • 145

    #2
    Originally posted by gobblegob
    Hi guys,

    Iam after some information/code examples on how to access parallel port from VB6 after a lot of digging i found i need to use inpout32.dll but no luck
    on anything written in vb6, If anyone has any links or samples it would be
    much appreciated.

    Gobble.
    Found this link doing what you need:

    Comment

    • gobblegob
      New Member
      • Dec 2007
      • 133

      #3
      Thanks VBWheaties , sorry but i forgot to mention that i want to access it under xp

      Comment

      • MarkTingson
        New Member
        • Nov 2007
        • 40

        #4
        Originally posted by gobblegob
        Thanks VBWheaties , sorry but i forgot to mention that i want to access it under xp
        Try to study this...

        Public Declare Function Inp Lib "inpout32.d ll" _
        Alias "Inp32" (ByVal PortAddress As Integer) As Integer

        Public Declare Sub Out Lib "inpout32.d ll" _
        Alias "Out32" (ByVal PortAddress As Integer, ByVal Value As Integer)

        Public Declare Function Inp32 Lib "DllPort.dl l" (ByVal PortAddress As Integer) As Integer

        then,

        Dim D as integer

        'Send the integer to the parallel port using inpout.dll (The "&H378" tells it that it is a data port and the integer tell it wich pins to turn on)

        Out Val("&H378"), Val(D)

        I hope this give you a little idea...

        Comment

        • ALSD
          New Member
          • Apr 2021
          • 1

          #5
          Take note that PCI- or USB-printerport adapters do not use the same register sets as "proper" LPT ports. INPOUTnn.DLL will not give results because the hardware between CPU and port is totally different.

          ALSD,

          Comment

          Working...