473,409 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,409 software developers and data experts.

Interrupt call in Win32 Application

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 | \ `
| .' | |.' |. \ \
________/ .'____|________________________||__`. `__________
( \ ) / )
'-. '-. ( .-` .-`
'-. .-'--.__. .-.__.--`-. .-`
'-..' \--' : ~`:=,`- `..-`
\ .. \\ |`-'|`-, /
\\\\\\\) | |`-'/.'/
\)\)\\ `-' `-'
`
Nov 6 '08 #1
15 3231
kid joe wrote:
Hi,
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
Joe
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
Nov 6 '08 #2
kid joe wrote:
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
Nov 6 '08 #3
Hi Jacob,

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

Joe
On Thu, 06 Nov 2008 21:50:17 +0100, jacob navia wrote:
kid joe wrote:
>Hi,

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
>Joe

--
.--------------------.
| |
| Good Evening.... | .--.--.
| | .; .;|;. ;.
`-------------. ,---' .;_;' `;_;.
\| ; ;' `; ;
\ ;;'.--.___.--.`;;
;-( o )=( o )-;
( `--' | `--' )
\| . . |/
........... . .:::::. . .______
/ . '---` . '\
.' `. .' \
| ____,.- . | `.....' | _______ |
| ,-' \ /|\'' \.-- |
| / \.'\ /,'. \. - |
| /| ` `\ / \ |
| ,/ _ '/ '\ |
,-' ,-. |o '
/ '| | | | \
/ ,/| |o | \ `
| .' | |.' |. \ \
________/ .'____|________________________||__`. `__________
( \ ) / )
'-. '-. ( .-` .-`
'-. .-'--.__. .-.__.--`-. .-`
'-..' \--' : ~`:=,`- `..-`
\ .. \\ |`-'|`-, /
\\\\\\\) | |`-'/.'/
\)\)\\ `-' `-'
`
Nov 6 '08 #4
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 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/
Nov 7 '08 #5
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 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.
--
Flash Gordon
If spamming me sent it to sm**@spam.causeway.com
If emailing me use my reply-to address
See the comp.lang.c Wiki hosted by me at http://clc-wiki.net/
Nov 7 '08 #6
kid joe <sp******@spamtrap.invalidwrites:
[...]
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.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Nov 7 '08 #7
kid joe wrote:
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
--
E-Mail address works, Jabber: he******@jabber.org, ICQ: 134682867

Nov 7 '08 #8
In article <ln************@nuthaus.mib.org>,
Keith Thompson <ks***@mib.orgattempted to emotionally blackmail kid
joe thusly:
>kid joe <sp******@spamtrap.invalidwrites:
[...]
>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.
What a sad, unhappy man you must be.
>I actually have useful information in response to your question.
More emotional blackmail.

Nov 7 '08 #9
On 7 Nov 2008 at 15:27, Kenny McCormack wrote:
Keith Thompson <ks***@mib.orgattempted to emotionally blackmail kid
joe thusly:
>>I actually have useful information in response to your question.

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".

Nov 7 '08 #10
In article <sl*******************@nospam.invalid>,
Antoninus Twink <no****@nospam.invalidwrote:
>On 7 Nov 2008 at 15:27, Kenny McCormack wrote:
>Keith Thompson <ks***@mib.orgattempted to emotionally blackmail kid
joe thusly:
>>>I actually have useful information in response to your question.

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".
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.

Nov 7 '08 #11
On Fri, 07 Nov 2008 11:21:18 +0100, Wolfgang Draxinger wrote:
kid joe wrote:
>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
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/
Nov 7 '08 #12
Wolfgang Draxinger wrote:
kid joe wrote:
>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...
What took you so long? :-) He will be soon reduced to conversing
with the trolls, such as McCormack and Twink.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
Nov 7 '08 #13
On Fri, 07 Nov 2008 22:21:51 +0000, Flash Gordon wrote:
>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.
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/
Nov 8 '08 #14
George said:
On Fri, 07 Nov 2008 22:21:51 +0000, Flash Gordon wrote:
>>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.

ng's such as?
comp.os.ms-windows.programmer.win32 (standard Usenet group) - and a whole
bunch of groups on the Microsoft server.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Nov 8 '08 #15
On Sat, 08 Nov 2008 16:05:00 +0000, Richard Heathfield wrote:
George said:
>On Fri, 07 Nov 2008 22:21:51 +0000, Flash Gordon wrote:
>>>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.

ng's such as?

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/
Nov 8 '08 #16

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Jane Austine | last post by:
As far as I know python's threading module models after Java's. However, I can't find something equivalent to Java's interrupt and isInterrupted methods, along with InterruptedException....
0
by: ahk | last post by:
I would like to emulate the keyboard interrupt through other means other than the actual hitting on the keyboard such that a call to scaninput() (a C function call?) will be able to pick up the...
26
by: djw | last post by:
Hi, Folks- I have a question regarding the "proper" use of try: finally:... Consider some code like this: d = Device.open() try: d.someMethodThatCanRaiseError(...) if SomeCondition: raise...
7
by: Tamir Khason | last post by:
I need the way to interrupt (freeze) ANY program currenlty running at the computer, then to activate the application and return the previous applications state after my application execution. Is...
10
by: Clint | last post by:
Hey all - I'm having a really confusing problem concerning a web service. Right now, I have an application that needs to call a web service that does nothing but return "true" (this will...
0
by: LordHog | last post by:
Hello all, I have a little application that will be used for test environment that utilizes the CAN Messaging. The application will capture and then decode the CAN message that are received. In...
2
by: bvermeersch | last post by:
Hi, Here I am again, just learning C# and always wanting to learn the hard things first. As you might already know from other posts I'm trying to convert c++ code to C#. The problem I'm...
2
by: Hartmut | last post by:
Hi guys out there..., I am not shure if this is the right forum for my Question. Have a problem using my own Keyboard interrupt handler. The handler works fine as long as i do not press keys...
7
by: Anil | last post by:
I have a Javascript program which runs in the browser and has functions work(), and stop(). It listens to commands from the server to work() and can be interrupted by the server to stop(). I am...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.