Win32应用程序中的中断调用 [英] Interrupt call in Win32 Application

查看:94
本文介绍了Win32应用程序中的中断调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




是否可以使用内联asm在Win32 appl中进行中断调用。 for

读取一些硬件信息,如读取端口的状态寄存器,

等?任何限制或不可能?


我需要直接在Win98 / SE中与LPT端口通信,或者至少需要获得

端口的当前状态(打印机)。 - 纸张,电源关闭等。


任何信息都将不胜感激。


Joe


PS。眼镜中的3D已经修复。感谢您的建议。


PPS。如果您仍然不喜欢这个信号,请忽略它,然后让它活下去。

谢谢。

-

.- -------------------。

| |

|下午好... | .-- .--。

| | 。 ; | ;. ;。

` -------------。 ,---''。; _;''`; _;。

\ | ; ;''`; ;

\ ;;''。 - .___.--。`;;

;-(o)=(o) - ;

(` - ''|` - '')

\ | 。 。 | /

............ 。:::::。 。 .______

/。 ''---。 ''\

。''` 。''\

| ____,.-。 | `.....''| _______ |

| , - ''\ / | \''''\ .-- |

| / \。''\ /,''。 \。 - |

| / | ``\ / \ |

| ,/ _''/''\ |

, - '', - 。 | o''

/''| | | | \

/,/ | | o | \`

| 。''| |。''|。 \ \

________ / .''____ | ________________________ || __`。 `__________

(\)/)

'' - 。 - 。 (.-`。 - `

'' - 。 - '' - .__。 - .__ .--` - 。 - `

' ' - ..''\ - '':~`:=,` - `..-`

\ .. \\ |` - ''|` - , /

\\\\\\\)| |` - ''/。''/

\)\)\\` - ''` - ''

`

解决方案

kid joe写道:





您好Joe


>

是否可以使用内联asm在Win32 appl中进行中断调用。 for

读取一些硬件信息,如读取端口的状态寄存器,

等?





有任何限制或不可能?



不可能


这是坏消息。


好​​消息是你可以使用windows api使用打印机端口

。请查看

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


这是一本关于打印机端口的非常全面的百科全书。


>

我需要直接在Win98 / SE中与LPT端口通信,或者至少需要获取

端口(打印机)的当前状态。 - 纸张输出,电源关闭等。


任何信息都将受到赞赏。



Windows 98在系统中运行没有任何保护可以直接与硬件对话。

programsz在任何其他

版本的Windows(2000以上)无法正常工作


Joe



-

jacob navia

jacob at jacob point remcomp point fr

logiciels / informatique
http://www.cs.virginia.edu/~lcc-win32


kid joe写道:


是否可以使用内联asm在Win32 appl中进行中断调用。 for

读取一些硬件信息,如读取端口的状态寄存器,

等?任何限制或不可能?


我需要直接在Win98 / SE中与LPT端口通信,或者至少需要获得

端口的当前状态(打印机)。 - 纸张输出,电源关闭等。



除非您是现有的,否则不允许在现代的

操作系统中直接与硬件交互编写设备驱动程序。如果你想在Windows下找出打印机状态,我肯定Windows API有一套适合你应用程序调用的适当功能 - 那个'这是API的目的




如果你实际上没有将打印机连接到LPT端口(谁是
$ b $那不是吗?你不用USB吗?),那么你应该更具体地说明你的请求 - 并将它们引导到特定于操作系统的新闻组。

S


您好Jacob,


非常感谢您的建议,这看起来像一个充足的网站

信息。


Joe

On Thu,2008年11月6日21:50:17 +0100,jacob navia写道:


kid joe写道:


>



你好乔


>>
是否可以使用内联asm来制作在Win32 appl中中断调用。用于读取一些硬件信息,如读取端口的状态寄存器,
等?





>任何限制或不可能?



不可能


这是坏消息。


好​​消息是你可以使用windows api使用打印机端口

。请查看

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


这是一本关于打印机端口的非常全面的百科全书。


>>
我需要直接在Win98 / SE中与LPT端口对话,或者至少需要获得
当前状态端口(打印机)。 - 纸张输出,电源关闭等。

任何信息都将受到赞赏。



Windows 98在没有保护的系统中运行反对

programsz直接与硬件交谈。在任何其他

版本的Windows(2000以上)中无法使用


> Joe



-

.--------------------。

| |

|晚安.... | .-- .--。

| | 。 ; | ;. ;。

` -------------。 ,---''。; _;''`; _;。

\ | ; ;''`; ;

\ ;;''。 - .___.--。`;;

;-(o)=(o) - ;

(` - ''|` - '')

\ | 。 。 | /

............ 。:::::。 。 .______

/。 ''---。 ''\

。''` 。''\

| ____,.-。 | `.....''| _______ |

| , - ''\ / | \''''\ .-- |

| / \。''\ /,''。 \。 - |

| / | ``\ / \ |

| ,/ _''/''\ |

, - '', - 。 | o''

/''| | | | \

/,/ | | o | \`

| 。''| |。''|。 \ \

________ / .''____ | ________________________ || __`。 `__________

(\)/)

'' - 。 - 。 (.-`。 - `

'' - 。 - '' - .__。 - .__ .--` - 。 - `

' ' - ..''\ - '':~`:=,` - `..-`

\ .. \\ |` - ''|` - , /

\\\\\\\)| |` - ''/。''/

\)\)\\` - ''` - ''

`


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 | \ `
| .'' | |.'' |. \ \
________/ .''____|________________________||__`. `__________
( \ ) / )
''-. ''-. ( .-` .-`
''-. .-''--.__. .-.__.--`-. .-`
''-..'' \--'' : ~`:=,`- `..-`
\ .. \\ |`-''|`-, /
\\\\\\\) | |`-''/.''/
\)\)\\ `-'' `-''
`

解决方案

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


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


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 | \ `
| .'' | |.'' |. \ \
________/ .''____|________________________||__`. `__________
( \ ) / )
''-. ''-. ( .-` .-`
''-. .-''--.__. .-.__.--`-. .-`
''-..'' \--'' : ~`:=,`- `..-`
\ .. \\ |`-''|`-, /
\\\\\\\) | |`-''/.''/
\)\)\\ `-'' `-''
`


这篇关于Win32应用程序中的中断调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆