hi all,
I am very novice for driver writing. I wanted to write a routine which will
callback to DLL when my card generates a interrupt. (ISR Routine)
pl guide some links or codes which will help to resolve this problem.
Thanks in advance,
Tushar
hi all,
I am very novice for driver writing. I wanted to write a routine which will
callback to DLL when my card generates a interrupt. (ISR Routine)
pl guide some links or codes which will help to resolve this problem.
Thanks in advance,
Tushar
Hi,
Inside a function in dll, create an user mode event object and send it to your driver via DeviceIoControl, after that wait for a the object to get signalled from the kernel mode and followed by ,u call a another function which service the required stuffs in user mode as isr.
In kernel mode driver, use ObReferenceObjectByHandle to get a kernel mode event and set the event in the Dpc for ISr routine.
once interrupt occurs, your driver isr-dpc sets the event, and the user mode waiting event would get signalled and the following function would get executed…
hope this idea helps…
shiv
----- Original Message -----
From: Tushar Samnerkar
To: NT Developers Interest List
Sent: Tuesday, December 17, 2002 10:45 AM
Subject: [ntdev] Callbacks from driver
hi all,
I am very novice for driver writing. I wanted to write a routine which will
callback to DLL when my card generates a interrupt. (ISR Routine)
pl guide some links or codes which will help to resolve this problem.
You are currently subscribed to ntdev as: xxxxx@rassit.com
To unsubscribe send a blank email to %%email.unsub%%
Hi Shiva,
Thanks for the quick response.
What I understood from the reply:
Is there any similar kind of code available somewhere on net ?
Thanks once again,
Tushar
----- Original Message -----
From: Shiva Prasad T.S.
To: NT Developers Interest List
Sent: Tuesday, December 17, 2002 11:02 AM
Subject: [ntdev] Re: Callbacks from driver
Hi,
Inside a function in dll, create an user mode event object and send it to your driver via DeviceIoControl, after that wait for a the object to get signalled from the kernel mode and followed by ,u call a another function which service the required stuffs in user mode as isr.
In kernel mode driver, use ObReferenceObjectByHandle to get a kernel mode event and set the event in the Dpc for ISr routine.
once interrupt occurs, your driver isr-dpc sets the event, and the user mode waiting event would get signalled and the following function would get executed…
hope this idea helps…
shiv
----- Original Message -----
From: Tushar Samnerkar
To: NT Developers Interest List
Sent: Tuesday, December 17, 2002 10:45 AM
Subject: [ntdev] Callbacks from driver
hi all,
I am very novice for driver writing. I wanted to write a routine which will
callback to DLL when my card generates a interrupt. (ISR Routine)
pl guide some links or codes which will help to resolve this problem.
You are currently subscribed to ntdev as: xxxxx@nital.stpp.soft.net
To unsubscribe send a blank email to %%email.unsub%%
You don’t have to poll on that object, you can use WaitForxxxObject API,
the call will return after object is signalled or a timeout, if
specified.
Rajiv.
-----Original Message-----
From: Tushar Samnerkar [mailto:xxxxx@nital.stpp.soft.net]
Sent: Tuesday, December 17, 2002 2:20 PM
To: NT Developers Interest List
Subject: [ntdev] Re: Callbacks from driver
Hi Shiva,
Thanks for the quick response.
What I understood from the reply:
Is there any similar kind of code available somewhere on net ?
Thanks once again,
Tushar
----- Original Message -----
From: Shiva Prasad T.S.
To: NT Developers Interest List
Sent: Tuesday, December 17, 2002 11:02 AM
Subject: [ntdev] Re: Callbacks from driver
Hi,
Inside a function in dll, create an user mode event object and send it
to your driver via DeviceIoControl, after that wait for a the object to
get signalled from the kernel mode and followed by ,u call a another
function which service the required stuffs in user mode as isr.
In kernel mode driver, use ObReferenceObjectByHandle to get a kernel
mode event and set the event in the Dpc for ISr routine.
once interrupt occurs, your driver isr-dpc sets the event, and the user
mode waiting event would get signalled and the following function would
get executed…
hope this idea helps…
shiv
----- Original Message -----
From: Tushar Samnerkar
To: NT Developers Interest List
Sent: Tuesday, December 17, 2002 10:45 AM
Subject: [ntdev] Callbacks from driver
hi all,
I am very novice for driver writing. I wanted to write a routine which
will
callback to DLL when my card generates a interrupt. (ISR Routine)
pl guide some links or codes which will help to resolve this problem.
You are currently subscribed to ntdev as: xxxxx@wipro.com
To unsubscribe send a blank email to %%email.unsub%%
Hi,
Absolutely, it’s not on polling…
it’s based on user mode event notification
http://support.microsoft.com/default.aspx?scid=kb;EN-US;262947
Event.exe: Event Sample Driver for Windows 2000
check out this link for a sample in which KeSetEvent() function is used inside the DPC function to set the user mode event in the application from the driver
i had done it on win2k…not sure about other win OS…
the flow is like this…
user appln:-
void MyProxyUserModeIsr()
{
// make read/write to service the device interrupt
}
In driver,
that’s it…go thru the sample, u will get better idea…
regards,
shiv
----- Original Message -----
From: Tushar Samnerkar
To: NT Developers Interest List
Sent: Tuesday, December 17, 2002 2:19 PM
Subject: [ntdev] Re: Callbacks from driver
Hi Shiva,
Thanks for the quick response.
What I understood from the reply:
Is there any similar kind of code available somewhere on net ?
Thanks once again,
Tushar
----- Original Message -----
From: Shiva Prasad T.S.
To: NT Developers Interest List
Sent: Tuesday, December 17, 2002 11:02 AM
Subject: [ntdev] Re: Callbacks from driver
Hi,
Inside a function in dll, create an user mode event object and send it to your driver via DeviceIoControl, after that wait for a the object to get signalled from the kernel mode and followed by ,u call a another function which service the required stuffs in user mode as isr.
In kernel mode driver, use ObReferenceObjectByHandle to get a kernel mode event and set the event in the Dpc for ISr routine.
once interrupt occurs, your driver isr-dpc sets the event, and the user mode waiting event would get signalled and the following function would get executed…
hope this idea helps…
shiv
----- Original Message -----
From: Tushar Samnerkar
To: NT Developers Interest List
Sent: Tuesday, December 17, 2002 10:45 AM
Subject: [ntdev] Callbacks from driver
hi all,
I am very novice for driver writing. I wanted to write a routine which will
callback to DLL when my card generates a interrupt. (ISR Routine)
pl guide some links or codes which will help to resolve this problem.
You are currently subscribed to ntdev as: xxxxx@rassit.com
To unsubscribe send a blank email to %%email.unsub%%