I used Portin and PortOut in my program so i had to put these two lines , but there are more functions that are useful
Private Declare Sub PortOut Lib "IO.dll" (ByVal Port As Integer, ByVal Data As Integer)
Private Declare Function PortIn Lib "IO.dll" (ByVal Port As Integer) As Byte
The address is H378
Example to output 00001111:
Call PortOut(&H378&, &HF&)
but there are H379 and H37A which are registers that can be useful .. I had a course project last semester and it was pc based spectrum analyzer, Parallel Port complete was a great refference , I think you can download it from here :
In visual basic we can't access the hardware directly.All hardware requests must go through windows.To control the port directly we have to use(.DLL) files.You can get these as a free download by going to the following page **broken link removed**
u can directly check ur PC configuration while booting ur system...
it may be 0x37(8,9,a) or ox27(8,9,a) or .....
but as far as i know VB cant communicate with parallel ports..
u can directly check ur PC configuration while booting ur system...
it may be 0x37(8,9,a) or ox27(8,9,a) or .....
but as far as i know VB cant communicate with parallel ports..
I think you want to get the address of parallel port while programming?
If so, you get this by VB via using API function that Window provide. If you want to know more how to use API function in VB, you can find books about Advanced VB programming
For win98 you can write a DLL in C and call it from VB use the functions _inp and _outp (conio.h)
Write 0 to all possible LPT port nos, then Read the values in a loop from all possible LPT port numbers the one returning anything but 255 is the right one.
Now for anything but win98 /95 you will need a separate DLL that works at the kernel level either write it or download it inpout32.dll is fine..
Follow the above procedure thats all