Solved

Getting LPT Address

Posted on 1998-05-15
4
458 Views
Last Modified: 2008-02-26
Using msvc5++: how can i find the LPT address,
i know it is mostly should be 378h buti want to
make a code that find that address for sure
10x.
0
Comment
Question by:talsp
  • 2
4 Comments
 
LVL 11

Expert Comment

by:mikeblas
ID: 1177948
If you're using VC++ 5.0, you're writing a 32-bit app. If you're writing a 32-bit app, why do you care about the I/O port used by the printer? You can't access it anyway.

Or are you writing a device driver?

.B ekiM

0
 

Author Comment

by:talsp
ID: 1177949
I write a 32bit app but in win95, so we can access the I/O port.
0
 
LVL 32

Accepted Solution

by:
jhance earned 30 total points
ID: 1177950
>I write a 32bit app but in win95, so we can access the I/O port.

No, you can't.  If it's a 32-bit app you will not be able to access the IO port even under Win95.  To do it from a Win32 program, you have to write (or use) a VxD.

Under Win95 you can, however, run a 16-bit program that can have direct access to the IO ports.

0
 

Author Comment

by:talsp
ID: 1177951
so how do i write this VxD stuff? or use one?
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question