How can i post WM_MOUSEMOVE to message pool??
How to implement “post message” under WDM Driver model.
_SHELL_PostMessage ?
How can i post WM_MOUSEMOVE to message pool??
How to implement “post message” under WDM Driver model.
_SHELL_PostMessage ?
Hi!
How can i post WM_MOUSEMOVE to message pool??
How to implement “post message” under WDM Driver model._SHELL_PostMessage ?
Well, you can’t from the Kernel. You need some sort of usermode-
buddy-application to do that for you. Notify that APP via
completing IRPs (or by other means - completing IRPs at least is
simple and bullet-proof).
APP: DeviceIoControl() - send “what to do?” block to driver
DRIVER: leave IRP pending until some usermode-action is needed
DRIVER: fill in “please do XYZ”, complete IRP
APP: do whatever driver asks you, in that case send message
APP: loop
Regards,
Paul Groke
> DRIVER: leave IRP pending until some usermode-action is needed
DRIVER: fill in “please do XYZ”, complete IRP
Does APP block in DeviceIoControl(…)??
poly~
Assuming that what you really want is to inject a mouse packet, you
*can* do this in kernel mode. You have to expose a device object as a
mouse so that MOUCLASS layers over you (there several ways to do this,
but the easiest is probably to be a HID minidriver… easiest only in
the sense that it’s documented with a sample in the DDK, that is). Once
you do that, you can send a mouse packet like any other mouse driver.
First, though, while I hate to sound like a broken record: make sure
that you really need to do this from kernel mode. It’s a lot easier from
a user-mode app, and there aren’t many cases where it seems desirable
for a non-pointing-device driver to be sending mouse packets. Why do you
feel like you need to send a mouse packet from kernel mode?
polybear wrote:
How can i post WM_MOUSEMOVE to message pool??
How to implement “post message” under WDM Driver model._SHELL_PostMessage ?
–
…/ray..
Please remove “.spamblock” from my email address if you need to contact
me outside the newsgroup.
If this is some kind of Record/Replaying mouse events, then big
problem is to identify the location of GUI Object on screen
dynamically.
Once you get location where to send mouse pointer to click on some GUI
Object you need to Move mouse 1st to specific location, then click on
it. ( since, sometimes application will process mouse message based on
the current mouse position ).
Sometimes, before you move mouse and click on some GUI Object, if
there is any popup sudden, then you have again problem.
As Ray suggest, better to do in UserMode, since even if you do
something in KernelMode by recreating it doesnt have any additional
advantage.
Regards,
Yash K.S
On Fri, 27 Aug 2004 14:09:54 -0700, Ray Trent
wrote:
> Assuming that what you really want is to inject a mouse packet, you
> can do this in kernel mode. You have to expose a device object as a
> mouse so that MOUCLASS layers over you (there several ways to do this,
> but the easiest is probably to be a HID minidriver… easiest only in
> the sense that it’s documented with a sample in the DDK, that is). Once
> you do that, you can send a mouse packet like any other mouse driver.
>
> First, though, while I hate to sound like a broken record: make sure
> that you really need to do this from kernel mode. It’s a lot easier from
> a user-mode app, and there aren’t many cases where it seems desirable
> for a non-pointing-device driver to be sending mouse packets. Why do you
> feel like you need to send a mouse packet from kernel mode?
>
> polybear wrote:
>
> > How can i post WM_MOUSEMOVE to message pool??
> > How to implement “post message” under WDM Driver model.
> >
> > _SHELL_PostMessage ?
> >
> >
> >
>
> –
> …/ray..
>
> Please remove “.spamblock” from my email address if you need to contact
> me outside the newsgroup.
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@gmail.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
if playback is desired, you should also look at a journal hook, it might
be appropriate.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Int3
Sent: Friday, August 27, 2004 2:31 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] POST WM_MOUSEMOVE to application message pool
If this is some kind of Record/Replaying mouse events, then big
problem is to identify the location of GUI Object on screen
dynamically.
Once you get location where to send mouse pointer to click on some GUI
Object you need to Move mouse 1st to specific location, then click on
it. ( since, sometimes application will process mouse message based on
the current mouse position ).
Sometimes, before you move mouse and click on some GUI Object, if
there is any popup sudden, then you have again problem.
As Ray suggest, better to do in UserMode, since even if you do
something in KernelMode by recreating it doesnt have any additional
advantage.
Regards,
Yash K.S
On Fri, 27 Aug 2004 14:09:54 -0700, Ray Trent
wrote:
> Assuming that what you really want is to inject a mouse packet, you
> can do this in kernel mode. You have to expose a device object as a
> mouse so that MOUCLASS layers over you (there several ways to do this,
> but the easiest is probably to be a HID minidriver… easiest only in
> the sense that it’s documented with a sample in the DDK, that is).
Once
> you do that, you can send a mouse packet like any other mouse driver.
>
> First, though, while I hate to sound like a broken record: make sure
> that you really need to do this from kernel mode. It’s a lot easier
from
> a user-mode app, and there aren’t many cases where it seems desirable
> for a non-pointing-device driver to be sending mouse packets. Why do
you
> feel like you need to send a mouse packet from kernel mode?
>
> polybear wrote:
>
> > How can i post WM_MOUSEMOVE to message pool??
> > How to implement “post message” under WDM Driver model.
> >
> > _SHELL_PostMessage ?
> >
> >
> >
>
> –
> …/ray..
>
> Please remove “.spamblock” from my email address if you need to
contact
> me outside the newsgroup.
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@gmail.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
No No to “journal hook”. It just record & plays blindly and its
location based. If you just move window and play it, then its gone.
Even popup problem remains same.
Regards,
Yash K.S
On Fri, 27 Aug 2004 15:03:26 -0700, Doron Holan
wrote:
> if playback is desired, you should also look at a journal hook, it might
> be appropriate.
>
> d
>
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Int3
> Sent: Friday, August 27, 2004 2:31 PM
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] POST WM_MOUSEMOVE to application message pool
>
> If this is some kind of Record/Replaying mouse events, then big
> problem is to identify the location of GUI Object on screen
> dynamically.
>
> Once you get location where to send mouse pointer to click on some GUI
> Object you need to Move mouse 1st to specific location, then click on
> it. ( since, sometimes application will process mouse message based on
> the current mouse position ).
>
> Sometimes, before you move mouse and click on some GUI Object, if
> there is any popup sudden, then you have again problem.
>
> As Ray suggest, better to do in UserMode, since even if you do
> something in KernelMode by recreating it doesnt have any additional
> advantage.
>
> Regards,
> Yash K.S
>
> On Fri, 27 Aug 2004 14:09:54 -0700, Ray Trent
> wrote:
> > Assuming that what you really want is to inject a mouse packet, you
> > can do this in kernel mode. You have to expose a device object as a
> > mouse so that MOUCLASS layers over you (there several ways to do this,
> > but the easiest is probably to be a HID minidriver… easiest only in
> > the sense that it’s documented with a sample in the DDK, that is).
> Once
> > you do that, you can send a mouse packet like any other mouse driver.
> >
> > First, though, while I hate to sound like a broken record: make sure
> > that you really need to do this from kernel mode. It’s a lot easier
> from
> > a user-mode app, and there aren’t many cases where it seems desirable
> > for a non-pointing-device driver to be sending mouse packets. Why do
> you
> > feel like you need to send a mouse packet from kernel mode?
> >
> > polybear wrote:
> >
> > > How can i post WM_MOUSEMOVE to message pool??
> > > How to implement “post message” under WDM Driver model.
> > >
> > > _SHELL_PostMessage ?
> > >
> > >
> > >
> >
> > –
> > …/ray..
> >
> > Please remove “.spamblock” from my email address if you need to
> contact
> > me outside the newsgroup.
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@gmail.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
>
>
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
what i want to do is…
I want to do a thing that “resume screen display in win 98”, since my device
isn’t a keyborad or mouse , it is just a simple USB device.
Thanks for Doron Holan teach me to use “PoSetSystemState”, it works on
2000 and XP , but 98,ME.
There is no other “resume screen display” function used in DDK"MOUCLASS" .
I think , if i can report the move-point data up to the windows system,
maybe it
will help me to resume screen .
“Int3” ¦b¶l¥ó news:xxxxx@ntdev ¤¤¼¶¼g…
> No No to “journal hook”. It just record & plays blindly and its
> location based. If you just move window and play it, then its gone.
> Even popup problem remains same.
>
> Regards,
> Yash K.S
>
>
> On Fri, 27 Aug 2004 15:03:26 -0700, Doron Holan
> wrote:
> > if playback is desired, you should also look at a journal hook, it might
> > be appropriate.
> >
> > d
> >
> >
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Int3
> > Sent: Friday, August 27, 2004 2:31 PM
> > To: Windows System Software Devs Interest List
> > Subject: Re: [ntdev] POST WM_MOUSEMOVE to application message pool
> >
> > If this is some kind of Record/Replaying mouse events, then big
> > problem is to identify the location of GUI Object on screen
> > dynamically.
> >
> > Once you get location where to send mouse pointer to click on some GUI
> > Object you need to Move mouse 1st to specific location, then click on
> > it. ( since, sometimes application will process mouse message based on
> > the current mouse position ).
> >
> > Sometimes, before you move mouse and click on some GUI Object, if
> > there is any popup sudden, then you have again problem.
> >
> > As Ray suggest, better to do in UserMode, since even if you do
> > something in KernelMode by recreating it doesnt have any additional
> > advantage.
> >
> > Regards,
> > Yash K.S
> >
> > On Fri, 27 Aug 2004 14:09:54 -0700, Ray Trent
> > wrote:
> > > Assuming that what you really want is to inject a mouse packet, you
> > > can do this in kernel mode. You have to expose a device object as a
> > > mouse so that MOUCLASS layers over you (there several ways to do this,
> > > but the easiest is probably to be a HID minidriver… easiest only in
> > > the sense that it’s documented with a sample in the DDK, that is).
> > Once
> > > you do that, you can send a mouse packet like any other mouse driver.
> > >
> > > First, though, while I hate to sound like a broken record: make sure
> > > that you really need to do this from kernel mode. It’s a lot easier
> > from
> > > a user-mode app, and there aren’t many cases where it seems desirable
> > > for a non-pointing-device driver to be sending mouse packets. Why do
> > you
> > > feel like you need to send a mouse packet from kernel mode?
> > >
> > > polybear wrote:
> > >
> > > > How can i post WM_MOUSEMOVE to message pool??
> > > > How to implement “post message” under WDM Driver model.
> > > >
> > > > _SHELL_PostMessage ?
> > > >
> > > >
> > > >
> > >
> > > –
> > > …/ray..
> > >
> > > Please remove “.spamblock” from my email address if you need to
> > contact
> > > me outside the newsgroup.
> > >
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: xxxxx@gmail.com
> > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
> >
> >
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
Well, ok, but that’s done entirely differently in 9x than in the NT
family of OS’s (probably some kind of VMM_xxx call, but I don’t usually
deal with 9x these days so I’d check the Me DDK0.
On the other hand, I suspect there are probably other ways to wake up
the display on 9x. I don’t happen to know what they are, but I would
suggest searching for those first. Sending mouse packets is slightly
unfriendly (apps might be hooking those and expecting that it meant a
real mouse moved… though that would be a stupid assumption
and
should be avoided unless there isn’t any other way.
polybear wrote:
what i want to do is…
I want to do a thing that “resume screen display in win 98”, since my device
isn’t a keyborad or mouse , it is just a simple USB device.Thanks for Doron Holan teach me to use “PoSetSystemState”, it works on
2000 and XP , but 98,ME.There is no other “resume screen display” function used in DDK"MOUCLASS" .
I think , if i can report the move-point data up to the windows system,
maybe it
will help me to resume screen .“Int3” ¦b¶l¥ó news:xxxxx@ntdev ¤¤¼¶¼g…
>
>>No No to “journal hook”. It just record & plays blindly and its
>>location based. If you just move window and play it, then its gone.
>>Even popup problem remains same.
>>
>>Regards,
>>Yash K.S
>>
>>
>>On Fri, 27 Aug 2004 15:03:26 -0700, Doron Holan
>> wrote:
>>
>>>if playback is desired, you should also look at a journal hook, it might
>>>be appropriate.
>>>
>>>d
>>>
>>>
>>>
>>>-----Original Message-----
>>>From: xxxxx@lists.osr.com
>>>[mailto:xxxxx@lists.osr.com] On Behalf Of Int3
>>>Sent: Friday, August 27, 2004 2:31 PM
>>>To: Windows System Software Devs Interest List
>>>Subject: Re: [ntdev] POST WM_MOUSEMOVE to application message pool
>>>
>>>If this is some kind of Record/Replaying mouse events, then big
>>>problem is to identify the location of GUI Object on screen
>>>dynamically.
>>>
>>>Once you get location where to send mouse pointer to click on some GUI
>>>Object you need to Move mouse 1st to specific location, then click on
>>>it. ( since, sometimes application will process mouse message based on
>>>the current mouse position ).
>>>
>>>Sometimes, before you move mouse and click on some GUI Object, if
>>>there is any popup sudden, then you have again problem.
>>>
>>>As Ray suggest, better to do in UserMode, since even if you do
>>>something in KernelMode by recreating it doesnt have any additional
>>>advantage.
>>>
>>>Regards,
>>>Yash K.S
>>>
>>>On Fri, 27 Aug 2004 14:09:54 -0700, Ray Trent
>>> wrote:
>>>
>>>>Assuming that what you really want is to inject a mouse packet, you
>>>>can do this in kernel mode. You have to expose a device object as a
>>>>mouse so that MOUCLASS layers over you (there several ways to do this,
>>>>but the easiest is probably to be a HID minidriver… easiest only in
>>>>the sense that it’s documented with a sample in the DDK, that is).
>>>
>>>Once
>>>
>>>>you do that, you can send a mouse packet like any other mouse driver.
>>>>
>>>>First, though, while I hate to sound like a broken record: make sure
>>>>that you really need to do this from kernel mode. It’s a lot easier
>>>
>>>from
>>>
>>>>a user-mode app, and there aren’t many cases where it seems desirable
>>>>for a non-pointing-device driver to be sending mouse packets. Why do
>>>
>>>you
>>>
>>>>feel like you need to send a mouse packet from kernel mode?
>>>>
>>>>polybear wrote:
>>>>
>>>>
>>>>>How can i post WM_MOUSEMOVE to message pool??
>>>>>How to implement “post message” under WDM Driver model.
>>>>>
>>>>>_SHELL_PostMessage ?
>>>>>
>>>>>
>>>>>
>>>>
>>>>–
>>>>…/ray..
>>>>
>>>>Please remove “.spamblock” from my email address if you need to
>>>
>>>contact
>>>
>>>>me outside the newsgroup.
>>>>
>>>>
>>>>
>>>>—
>>>>Questions? First check the Kernel Driver FAQ at
>>>
>>>http://www.osronline.com/article.cfm?id=256
>>>
>>>>You are currently subscribed to ntdev as: xxxxx@gmail.com
>>>>To unsubscribe send a blank email to xxxxx@lists.osr.com
>>>>
>>>
>>>—
>>>Questions? First check the Kernel Driver FAQ at
>>>http://www.osronline.com/article.cfm?id=256
>>>
>>>You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
>>>To unsubscribe send a blank email to xxxxx@lists.osr.com
>>>
>>>—
>>>Questions? First check the Kernel Driver FAQ at
>
> http://www.osronline.com/article.cfm?id=256
>
>>>You are currently subscribed to ntdev as: unknown lmsubst tag argument:
>
> ‘’
>
>>>
>>>To unsubscribe send a blank email to xxxxx@lists.osr.com
>>>
>>
>
>
>
–
…/ray..
Please remove “.spamblock” from my email address if you need to contact
me outside the newsgroup.