Hi,
I am trying to get event handle from event object(pointer). Are there a way to do it ?
- Create event :
KeInitializeEvent( pExt->pKEvent, SynchronizationEvent, FALSE ); - Some APIs to change the pKEvent to HANDLE ?
???
Thanks
Hi,
I am trying to get event handle from event object(pointer). Are there a way to do it ?
Thanks
ObOpenObjectByPointer
But why do you need this?
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
wrote in message news:xxxxx@ntdev…
> Hi,
>
> I am trying to get event handle from event object(pointer). Are there a way to do it ?
>
> 1. Create event :
> KeInitializeEvent( pExt->pKEvent, SynchronizationEvent, FALSE );
> 2. Some APIs to change the pKEvent to HANDLE ?
> ???
>
> Thanks
>
That only works if the PKEVENT was allocated as an object (and not by ExAllocatePoolWithTAg by the driver or stack based). As max asked, why do you need to create an event handle? That is typically not done once you have a PKEVENT.
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Monday, February 21, 2011 11:30 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] how to get event handle ?
ObOpenObjectByPointer
But why do you need this?
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
wrote in message news:xxxxx@ntdev…
> Hi,
>
> I am trying to get event handle from event object(pointer). Are there a way to do it ?
>
> 1. Create event :
> KeInitializeEvent( pExt->pKEvent, SynchronizationEvent, FALSE );
> 2. Some APIs to change the pKEvent to HANDLE ?
> ???
>
> Thanks
>
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
Thanks Maxim/Doron,
Yeah. I have a commond library that covers cross the platforms and this should work in Windows Mobile and other targets too.
"I have a commond library that covers cross the platforms "
Are you writing kernel mode or user mode code?
More importantly, you have not indicated why you need an event handle.
While the question of how you get one has been answered, if we don’t know
why you want one, you may be making a design error that someone can save you
from.
joe
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@hotmail.com
Sent: Tuesday, February 22, 2011 2:30 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] how to get event handle ?
Hi,
I am trying to get event handle from event object(pointer). Are there a way
to do it ?
Thanks
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
–
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
I am writing a kernel mode driver which was a user mode dll. The reason that I want to change the KEVENT to Handle is that other drivers checks the valid handle. ( I guess KEVENT would do the same ) I want to make it compatible and expose same interface to others.
Thanks.