473,498 Members | 98 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to recover an IRQ from a VC application ?

Hi,
I have a PC104 Input/Output card that support IRQ (IRQ2 to 7) that is
connected to a PC (x86).

I am writing a win32 application with VisualC that must be able to
recover and redirect this IRQ to another routine that reads the I/O
card's input states.

What can I do to make Windows recognizing and managing my I/O card's
IRQ ?
What kind of messages should I retrieve from Windows Messages ?

Thank you for your help.

Matthieu.

Dec 16 '05 #1
7 1134
Hi matthieu!
What can I do to make Windows recognizing and managing my I/O card's
IRQ ?


You need to write a device-driver (if the hardware-vendore does not
supply any).

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
Dec 16 '05 #2
hi !

the device-driver is supplied.

The problem is how to make windows launching my reading routine.

My routine is, for the moment, just a simple "main" function structured
like that :

void main(void)
{
initialisation code
reading function
}

What should I do to make windows launching my reading routine?

Thanks

Dec 16 '05 #3
Hi matthieu!
the device-driver is supplied.
Great!
Then please read the docu!
The problem is how to make windows launching my reading routine.

My routine is, for the moment, just a simple "main" function structured
like that :

void main(void)
{
initialisation code
reading function
}

What should I do to make windows launching my reading routine?


int main()
{
// Open handle to driver
// read data from driver
// close handle to driver
return 0;
}

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
Dec 16 '05 #4
Thanks for your answers Jochen

But I haven't any problems with openning a handle to the driver,
reading the datas etc...

what you give to me :
int main()
{
// Open handle to driver
// read data from driver
// close handle to driver
return 0;
}
is nearly exactly the same as my reading Function.

What I want now, is to transform the readed datas to windows messages
that I can recover with my VC program like this :
switch(message){
case WM_input_1 : .....break;
case WM_input_2 : .....break;
....etc
}
(input_1, input_2... are my readed inputs)

How can I do?
Should it be noticed somewhere in the docs (I haven't found the answer
in the docs) or in the header files (haven't found it neither :-\ )

Thanks

Dec 16 '05 #5
Hi matthieu!
What I want now, is to transform the readed datas to windows messages
that I can recover with my VC program like this :
switch(message){
case WM_input_1 : .....break;
case WM_input_2 : .....break;
...etc
}
(input_1, input_2... are my readed inputs)

How can I do?
Should it be noticed somewhere in the docs (I haven't found the answer
in the docs) or in the header files (haven't found it neither :-\ )


You can define your own Windows-Messages.
Just use WM_APP as base-index:

#define WM_input_1 WM_APP + 1
#define WM_input_2 WM_APP + 2

And then you can send these messages via "SendMessage" or "PostMessage"
to your window.

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
Dec 16 '05 #6
Thank you Jochen,

I'm going to try this, and I'll tell you if it works ;)

Greetings
Matthieu

Dec 16 '05 #7
Hello,

That's ok, I just use message and not the IRQ.

Thank you for your help :)

Matthieu Bocktaels

Dec 20 '05 #8

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

Similar topics

4
2681
by: chuy | last post by:
Is there a way to recover a lost password in Mysql 4.1. I have seen many articles and howto's on how to kill the Mysql process and then restart using skip grant tables option. I am not trying to...
5
3805
by: Prem K Mehrotra | last post by:
I come from Oracle background. In Oracle, when one wants to do a point in time recovery, one can specify recover database until timestmap. Oracle's database maps to a db2 subsystem, i.e., in...
3
3125
by: apple | last post by:
UDB v8 fp 6a on AIX 5.1.0.0 Below is a manual incremental recover from compressed backup datasets. With external compress backup datasets, can it be coded to do an automatic incremental recover?...
3
3515
by: db2group88 | last post by:
we are using db2 udb v8.2 on windows. All our tables are created with "not logged initially" parameter. Our application with auto commit on. I would like to do an online backup and rolling forward...
2
2232
by: Maellic | last post by:
Hi, I'm currently updating a website written with ASP.NET. The original programmer is overseas, there is no documentation, and files are all over the place. Here is a code snippet from one of...
10
5786
by: James Radke | last post by:
Hello, I have an emergency question - it was just determined that our backups were incomplete, and we do not have the source code for an application we developed (due to some system delete, and...
0
992
by: Sol | last post by:
Hello, // Version française : Je travaille sur une appli en vb.net et mon but est de récupérer une sélection faites par un utilisateur sur un fichier excel. Donc en étape : 1 - Ouvrir le...
2
1149
by: Stefan Caracas | last post by:
Hi , i'm looking for code/method to get process list AND order of these processes in task manager. For instance , in task manager ( or on the windows task bar ) you have 5 applications , i...
0
1768
by: mike_dba | last post by:
I have been testing the db2 recover command on a DB2 V8.2 Linux database. The database contains a single partition. I am not archiving logs but retaining them on disk. the backup image is to...
0
7124
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
7163
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,...
1
6884
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
7375
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
3090
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...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1416
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 ...
1
651
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
287
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.