How can I send windows messages (WM_ … ) from kernel mode to user mode?In
fact my question is :how can I run callback code (from a user process)at a
specific event in kernel mode?
It is impossable. select another way,
such as share named event object.
----- Original Message -----
From:
To: File Systems Developers
Sent: Monday, July 24, 2000 2:12 PM
Subject: [ntfsd] How to send windows messages from kernel mode to user mode?
> How can I send windows messages (WM_ … ) from kernel mode to user
mode?In
> fact my question is :how can I run callback code (from a user process)at a
> specific event in kernel mode?
>
> —
> You are currently subscribed to ntfsd as: xxxxx@ark-info-sys.co.jp
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
xxxxx@excite.com wrote:
How can I send windows messages (WM_ … ) from kernel mode to
user mode?In fact my question is :how can I run callback code
(from a user process)at a specific event in kernel mode?
The easiest way to get that functionality is to have user code call
DeviceIoControl(). The handler in your device driver shouldn’t complete
the IRP until the event occurs that you want to signal. Upon return from
DeviceIoControl your thread can do whatever it wants, including posting
a WM_ message.
If necessary create one user thread exclusively for issuing
DeviceIoControl() and ::PostMessage() in a loop. That way you can send
messages anytime by simply completing the IRP for the I/O Ctl.
Joe
Your user-mode app can send private IOCTL
to driver. When driver gets this IOCTL it starts
waiting on event. When wait is satisfied driver calls
user-mode routine, that you passed to driver as parameter
to IOCTL. Since you call driver directly from app, driver
code will be running in context of your user-mode app,
and can call succesfully code in your app. Note that
callback function will run in kernel mode, but at user addresses,
so it can call both user and kernel functions.
Hope this helps.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of xxxxx@excite.com
Sent: Monday, July 24, 2000 2:12 PM
To: File Systems Developers
Subject: [ntfsd] How to send windows messages from kernel mode to user
mode?How can I send windows messages (WM_ … ) from kernel mode to
user mode?In
fact my question is :how can I run callback code (from a user
process)at a
specific event in kernel mode?
You are currently subscribed to ntfsd as: xxxxx@yahoo.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com