Detecting parallel port base address
Detecting parallel port base address
Detecting parallel port base address
Detecting parallel port base address
Detecting parallel port base address
Detecting parallel port base address Detecting parallel port base address Detecting parallel port base address Detecting parallel port base address Detecting parallel port base address Detecting parallel port base address Detecting parallel port base address Detecting parallel port base address
Detecting parallel port base address Detecting parallel port base address
Detecting parallel port base address
Go Back  Xtreme Visual Basic Talk > > > Detecting parallel port base address


Reply
 
Thread Tools Display Modes
  #1  
Old 06-18-2003, 10:36 AM
mjohnm mjohnm is offline
Newcomer
 
Join Date: Jun 2003
Location: NJ, USA
Posts: 15
Question Detecting parallel port base address


I need to detect programmatically the base address of parallel ports. It is not neat to have my users go to the hardware setup to determine such addresses. My software in VB6 should be able to run on any Windows varant since W95.

I have found some libraries that claim to do this, but they do not detect non-standard base addresses (e.g. >&h8000 for PCI cards) and appear to read the old DOS BIOS equipment information (which still exists under XP!!!) The BIOS information (1) does not support non-contiguous LPT assignments (on one of my machines Windows had assigned the two parallel ports to LPT1 and LPT3 with no LPT2) and (2) might disagree with Windows (one of my machines had a CMOS setting that was different from the setting Windows had assigned - the DOS equipment area had the CMOS base address)

I can detect which ports are known to Windows using the CreateFile API call, but do not know how to get the base address for each port found.

Thanks for any help,

John
Reply With Quote
  #2  
Old 06-18-2003, 02:53 PM
BillSoo's Avatar
BillSooDetecting parallel port base address BillSoo is offline
Code Meister

Retired Moderator
* Guru *
 
Join Date: Aug 2000
Location: Vancouver, BC, Canada
Posts: 10,441
Default

Hmm..... that's a tough one.....

The methods I'm familiar with involve reading the DOS area, but it seems that this will not work for you. Since it's a setting in *Windows* you need, maybe there is some kind of Registry value that you can read. Or possibly there is something in one of the INI files (win.ini or system.ini).
__________________
"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
Reply With Quote
  #3  
Old 05-25-2005, 04:27 PM
mjohnm mjohnm is offline
Newcomer
 
Join Date: Jun 2003
Location: NJ, USA
Posts: 15
Thumbs up Solved my own problem

Thank you for the suggestion. I did indeed look through the registry but the information is stored in different places in different versions of Windows (eg XP vs 98). Seems messy to have to worry about what version of Windows I am using.

Anyway, I solved my problem using third party software. Check out TVicLPT or TVicHW32 which has additional functionality. The software is very reasonably priced, has worked well for me and does everything I need and then some! In particular it detects all LPT ports and their base addresses. ALso, it can direct IO port read and write. I recommend this software. (I have no relationship with the author other than being a customer.) There are other freeware software packages that can do what I need but I have not tried them.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get parallel port address? gpraceman Communications 1 03-26-2004 01:45 AM
inpout32.dll parallel port address petorca Communications 0 11-06-2002 01:10 PM
capturing and redirecting information to the parallel port saryon Communications 1 08-07-2002 02:09 PM
parallel port maldini3 Communications 1 03-03-2002 09:44 AM
Listen to a open port, found a vb Ip port blocker visualbasic700e General 3 12-04-2000 08:45 AM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Detecting parallel port base address
Detecting parallel port base address
Detecting parallel port base address Detecting parallel port base address
Detecting parallel port base address
Detecting parallel port base address
Detecting parallel port base address Detecting parallel port base address Detecting parallel port base address Detecting parallel port base address Detecting parallel port base address Detecting parallel port base address Detecting parallel port base address
Detecting parallel port base address
Detecting parallel port base address
 
Detecting parallel port base address
Detecting parallel port base address
 
-->