Interrupt call in Win32 Application

K

kid joe

Hi,

Is it possible to use inline asm to make intrrupt calls in Win32 appl. for
reading some hardware information such as reading port's status register,
etc? Any restrictions or Impossible?

I need to talk to the LPT port directly in Win98/SE, or at least need to get
current status of the port(printer). - Paper out, power off, etc.

Any information will be appreciated.

Joe

PS. 3D in the glasses has been fixed. Thanks for the suggestion.

PPS. If you still don't like the sig, just ignore it, live and let live.
Thanks.


--
.--------------------.
| |
| Good Afternoon... | .--.--.
| | .; .;|;. ;.
`-------------. ,---' .;_;' `;_;.
\| ; ;' `; ;
\ ;;'.--.___.--.`;;
;-( o )=( o )-;
( `--' | `--' )
\| . . |/
........... . .:::::. . .______
/ . '---` . '\
.' `. .' \
| ____,.- . | `.....' | _______ |
| ,-' \ /|\'' \.-- |
| / \.'\ /,'. \. - |
| /| ` `\ / \ |
| ,/ _ '/ '\ |
,-' ,-. |o '
/ '| | | | \
/ ,/| |o | \ `
| .' | |.' |. \ \
________/ .'____|________________________||__`. `__________
( \ ) / )
'-. '-. ( .-` .-`
'-. .-'--.__. .-.__.--`-. .-`
'-..' \--' : ~`:=,`- `..-`
\ .. \\ |`-'|`-, /
\\\\\\\) | |`-'/.'/
\)\)\\ `-' `-'
`
 
S

Stephen Sprunk

kid said:
Is it possible to use inline asm to make intrrupt calls in Win32 appl. for
reading some hardware information such as reading port's status register,
etc? Any restrictions or Impossible?

I need to talk to the LPT port directly in Win98/SE, or at least need to get
current status of the port(printer). - Paper out, power off, etc.

You are not allowed directly interact with the hardware in a modern
operating system unless you are writing a device driver. If you want to
figure out printer status under Windows, I'm sure the Windows API has an
appropriate set of function for your application to call -- that's the
purpose of an API.

If you are not actually connecting a printer to the LPT port (who does
that anymore? Don't you use USB?), then you should be more specific in
your request -- and direct them to an OS-specific newsgroup.

S
 
J

jacob navia

kid said:

Hi Joe
Is it possible to use inline asm to make intrrupt calls in Win32 appl. for
reading some hardware information such as reading port's status register,
etc?
No

Any restrictions or Impossible?

Impossible

That was the bad news.

The good news is that you can use the printer port
using the windows api. Look in

http://www.lvr.com/parport.htm

for a very comprehensive encyclopedia about the printer port.
I need to talk to the LPT port directly in Win98/SE, or at least need to get
current status of the port(printer). - Paper out, power off, etc.

Any information will be appreciated.

Windows 98 runs in a system where there is no protection against
programsz talking directly to the hardware. In any other
versions of windows (2000 upwards) that will not work
 
K

Keith Thompson

kid joe said:
PPS. If you still don't like the sig, just ignore it, live and let live.
Thanks.

No, I will ignore *you*, and I suspect most other people here will do
the same, though I'm sure the resident trolls will be glad to
*pretend* to help you. If you want your questions answered, use a
shorter sig.

I actually have useful information in response to your question.
 
K

kid joe

Hi Jacob,

Thanks a lot for the advice, that looks like a website with plenty of
information.

Joe


Hi Joe


Impossible

That was the bad news.

The good news is that you can use the printer port
using the windows api. Look in

http://www.lvr.com/parport.htm

for a very comprehensive encyclopedia about the printer port.

Windows 98 runs in a system where there is no protection against
programsz talking directly to the hardware. In any other
versions of windows (2000 upwards) that will not work


--
.--------------------.
| |
| Good Evening.... | .--.--.
| | .; .;|;. ;.
`-------------. ,---' .;_;' `;_;.
\| ; ;' `; ;
\ ;;'.--.___.--.`;;
;-( o )=( o )-;
( `--' | `--' )
\| . . |/
........... . .:::::. . .______
/ . '---` . '\
.' `. .' \
| ____,.- . | `.....' | _______ |
| ,-' \ /|\'' \.-- |
| / \.'\ /,'. \. - |
| /| ` `\ / \ |
| ,/ _ '/ '\ |
,-' ,-. |o '
/ '| | | | \
/ ,/| |o | \ `
| .' | |.' |. \ \
________/ .'____|________________________||__`. `__________
( \ ) / )
'-. '-. ( .-` .-`
'-. .-'--.__. .-.__.--`-. .-`
'-..' \--' : ~`:=,`- `..-`
\ .. \\ |`-'|`-, /
\\\\\\\) | |`-'/.'/
\)\)\\ `-' `-'
`
 
G

George

The good news is that you can use the printer port
using the windows api. Look in

http://www.lvr.com/parport.htm

for a very comprehensive encyclopedia about the printer port.

By printer port to you mean lpt1?

Now that printers run off a usb usually, how do we update our bag of tricks
accordingly?

--
George

The United States of America will never be intimidated by thugs and
assassins. The killers will fail, and the Iraqi people will live in
freedom.
George W. Bush

Picture of the Day http://apod.nasa.gov/apod/
 
F

Flash Gordon

George wrote, On 07/11/08 01:58:
By printer port to you mean lpt1?

Now that printers run off a usb usually, how do we update our bag of tricks
accordingly?

By asking in a Windows group where they know about Windows. Or reading
the MSDN documentation.
 
W

Wolfgang Draxinger

kid said:
PPS. If you still don't like the sig,

It's not a sig. It's ASCII art, for which there's a own newsgroup
dedicated to it: rec.arts.ascii
Post it there one time, if you like.
just ignore it, live and let live. Thanks.

You know what: I might be going to ignore you at all. It's not
just because of the sig...

Wolfgang Draxinger
 
K

Kenny McCormack

Keith Thompson said:
No, I will ignore *you*, and I suspect most other people here will do
the same, though I'm sure the resident trolls will be glad to
*pretend* to help you. If you want your questions answered, use a
shorter sig.

What a sad, unhappy man you must be.
I actually have useful information in response to your question.

More emotional blackmail.
 
A

Antoninus Twink

More emotional blackmail.

Especially when we all know that the "useful information" KT is so
cruelly witholding is "get lost and ask the question on a Windows
group".
 
K

Kenny McCormack

Especially when we all know that the "useful information" KT is so
cruelly witholding is "get lost and ask the question on a Windows
group".

Exactly. Remember, they all consider that advice (phrased just a little
bit more politically correct, but we all know exactly what they are
saying; we can picture them foaming at the mouth as they type it) to be
useful, helpful information. They say exactly this (*) every day.

(*) Assert the truth of the (ridicuous) notion that "Get lost, sucker"
is useful. See other thread for further evidence of this silliness.
 
G

George

George wrote, On 07/11/08 01:58:
The good news is that you can use the printer port
using the windows api. Look in

http://www.lvr.com/parport.htm

for a very comprehensive encyclopedia about the printer port.

By printer port [do] you mean lpt1?

Now that printers run off a usb usually, how do we update our bag of tricks
accordingly?

By asking in a Windows group where they know about Windows. Or reading
the MSDN documentation.

I actually have the MSDN documentation and think that this was sufficiently
bad advice that I would rather you had just been terser and said "**** off,
infidel."

I'm unaware of an ng where this question finds an answerer except clc,
where a vocal and snippy cadre of True Believers makes sure that nothing
practical obtains.

Nobody forces anti-windows zealots to read a thread with "Win32" in the
title.
--
George

Some folks look at me and see a certain swagger, which in Texas is called
"walking."
George W. Bush

Picture of the Day http://apod.nasa.gov/apod/
 
G

George

It's not a sig. It's ASCII art, for which there's a own newsgroup
dedicated to it: rec.arts.ascii
Post it there one time, if you like.


You know what: I might be going to ignore you at all. It's not
just because of the sig...

Wolfgang Draxinger

Being ignored by Wolfgang. Now there's a threat. To see you imitate the
zealots with your halting english is pathetic.
--
George

The resolve of our great nation is being tested. But make no mistake, we
will show the world that we will pass the test.
George W. Bush

Picture of the Day http://apod.nasa.gov/apod/
 
F

Flash Gordon

George wrote, On 07/11/08 20:47:
George wrote, On 07/11/08 01:58:
On Thu, 06 Nov 2008 21:50:17 +0100, jacob navia wrote:

The good news is that you can use the printer port
using the windows api. Look in

http://www.lvr.com/parport.htm

for a very comprehensive encyclopedia about the printer port.
By printer port [do] you mean lpt1?

Now that printers run off a usb usually, how do we update our bag of tricks
accordingly?
By asking in a Windows group where they know about Windows. Or reading
the MSDN documentation.

I actually have the MSDN documentation and think that this was sufficiently
bad advice that I would rather you had just been terser and said "**** off,
infidel."

I have it as well, in fact anyone with access to the Web has access to
it unless someone is explicitly blocking them. I also have Windows SW
that interfaces to printers. Oh, and the answers to your question are
not hard to find in MSDN, I just checked.
I'm unaware of an ng where this question finds an answerer except clc,

I also know that there *are* groups specifically for talking about
programming in Windows where you will find people with various
qualifications from Microsoft. Of course, if you want to avoid getting
answers from real experts in Windows programming that is your prerogative.
where a vocal and snippy cadre of True Believers makes sure that nothing
practical obtains.

There is practical stuff here, just not the answer to your specific
question.
Nobody forces anti-windows zealots to read a thread with "Win32" in the
title.

I'm not anti-windows, I use it a fair bit and one of my own computers
(as opposed to the company ones) is Windows.
 
C

CBFalconer

Wolfgang said:
It's not a sig. It's ASCII art, for which there's a own newsgroup
dedicated to it: rec.arts.ascii
Post it there one time, if you like.


You know what: I might be going to ignore you at all. It's not
just because of the sig...

What took you so long? :) He will be soon reduced to conversing
with the trolls, such as McCormack and Twink.
 
G

George

I also know that there *are* groups specifically for talking about
programming in Windows where you will find people with various
qualifications from Microsoft. Of course, if you want to avoid getting
answers from real experts in Windows programming that is your prerogative.

ng's such as?
--
George

When I take action, I'm not going to fire a $2 million missile at a $10
empty tent and hit a camel in the butt. It's going to be decisive.
George W. Bush

Picture of the Day http://apod.nasa.gov/apod/
 
G

George

George said:


comp.os.ms-windows.programmer.win32 (standard Usenet group) - and a whole
bunch of groups on the Microsoft server.

Thanks, Richard. That's a hard one to remember* if only because it's kind
of a weird way to put all the words together. Where they have ms-windows,
where I would want to put ms-dos.

Good newsgroups are needles in haystacks, including the ms ones, of which
there must be hundreds if not thousands. You don't know whether it is a
good one until you've figured out that it's basically just some guy named
Sanjay who has a one Sanjay fit all attitude. (or not, if you're lucky)

While the printer port is obviously something that doesn't deal directly
with the C programming language, it's at the tail end of a little project
that does: imitating faxes like Jack Klein does in chp 18. The black code
words and white code words seem clever and straightforward.

I wanted to have some extra hobby tasks lying around in case I needed
distraction from an extended attempt to steal the election. The election
was over before I had begun to fight.

Instead, I got ran over by a car yesterday, so I'll be happy to argue with
a compiler for a while.
--
George

There's no bigger task than protecting the homeland of our country.
George W. Bush

*the concussion doesn't help

Picture of the Day http://apod.nasa.gov/apod/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,001
Messages
2,570,254
Members
46,851
Latest member
CliftonCor

Latest Threads

Top