473,569 Members | 2,789 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3255
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.cause way.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******@spamt rap.invalidwrit es:
[...]
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_Keit h) 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.or g>,
Keith Thompson <ks***@mib.orga ttempted to emotionally blackmail kid
joe thusly:
>kid joe <sp******@spamt rap.invalidwrit es:
[...]
>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.orga ttempted 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

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

Similar topics

19
6449
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. "somethread.interrupt()" will wake somethread up when it's in sleeping/waiting state. Is there any way of doing this with python's thread? I suppose thread...
0
1286
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 interrupt. How is it possible to do that in python/pyGTK? TIA.
26
2492
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 Error # Error is subclass of Exception
7
1552
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 any way to do it managed? TNX -- Tamir Khason You want dot.NET? Just ask:
10
8186
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 obviously change once the program's fully built to actually do something, but for testing, it works). The only code I added to the service is below:
0
1749
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 the API reference material the device will generate an interrupt which the user much provide an interrupt service routine with the entry pointed at...
2
7058
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 running into now is the creation and handling of an interrupt. In c++ it is done this way:
2
4068
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 like pause, arrow keys etc. My system returns with a stack overflow. Is there something i have overseen in my keyboard Interrupt Service
7
4682
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 using XmlHttpRequest to talk to the server. So I use http GET to send a command "ready" to the server, which replies at some point in time by sending...
0
7612
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8120
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7672
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7968
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6283
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.