468,294 Members | 1,947 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,294 developers. It's quick & easy.

looking for information to use inpout32.dll in VB6

133 100+
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.
Feb 26 '08 #1
4 11110
VBWheaties
145 100+
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:
http://www.aaroncake.net/electronics/vblpt.htm
Feb 26 '08 #2
gobblegob
133 100+
Thanks VBWheaties , sorry but i forgot to mention that i want to access it under xp
Feb 26 '08 #3
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.dll" _
Alias "Inp32" (ByVal PortAddress As Integer) As Integer

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

Public Declare Function Inp32 Lib "DllPort.dll" (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...
Feb 27 '08 #4
ALSD
1 Bit
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,
3 Weeks Ago #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

14 posts views Thread by Jason Daly | last post: by
1 post views Thread by vertigo | last post: by
2 posts views Thread by lxrocks | last post: by
1 post views Thread by Troels Arvin | last post: by
10 posts views Thread by =?Utf-8?B?SmFtZXMgV29uZw==?= | last post: by
6 posts views Thread by orked | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.