Parallel port windows 7

Thread Starter

Johng

Joined May 24, 2011
2
Hello,

I need to interface with 2 parallel ports ideally with windows7, 32 bit system. Not a modern approach I know. The PC I have has a parallel port using LPT1 set at address &H0378. I have installed a PCI expansion card (rosewell RC-304). Windows 7 has automatically assigned resources from &HDCC8 to this card, calling it LPT2.

I can use libraries such as inpout32.dll from logix4u to control the first parallel card as needed. However, such libraries cannot control the second card because the functions in them use a short integer address; &HDCC8 is out of range for short. I am not well versed in memory address spaces.

Has anyone figured out how to get around this problem?
Is it possible to force windows 7 to allocate a specific memory range to the device?
Is it possible to convert the address for the second card back to a short integer, and still have it in the same location or is memory truly continuous and thus this memory space is not accessible to the typical port control dlls?
Is there another way to address the memory space directly without having to figure out my own driver?

for reference I am using VB.net 2010 for my programming

thank you in advance
 

ashokcp

Joined Mar 8, 2007
50
LPT base address is IO address, and, not memory address.
Try -9016 as the address (yes, minus 9016), as this will be stored as &HDCC8 in 16bits.
Try printing it in hex to see if it is the same as &HDCC8 for confirmation.
 

debjit625

Joined Apr 17, 2010
790
That is not an I/O address I think thats device ID,you can get the I/O address from "Device Manager" .

Open Control Panel,click System and Security their click Device manager,then from the Tree View(List) select or expand Ports(COM & LPT) from their right click on Printer port i.e any of the LPT port(normally "LPT1") and select Properties from their select Resource tab.Their you will find the I/O address.

Good Luck
 

Thread Starter

Johng

Joined May 24, 2011
2
Ashokcp,
Thank you so much; that worked perfectly! Time for me to learn more about bits and IO addresses.
JohnG
 
Top