How share PKEVENT to user - mode

Hello,
I use event in my driver,
I initialized a event with KeInitializeEvent and
how obtain a user HANDLE for using event since user mode processus ?

Thank.

From MSDN:

Sharing event objects between user mode and kernel mode requires care.
There are two main methods for sharing event objects:

The user-mode application creates the event object and passes a handle to
the object to the driver by sending an IOCTL to the driver. The driver must
handle the IOCTL in the context of the process that created the event
object and must validate the handle by calling ObReferenceObjectByHandle.
This method is the recommended method for sharing event objects between
user and kernel modes.

The driver creates a named event object in the \BaseNamedObjects object
directory. You can open a kernel-mode event named \BaseNamedObjects_Xxx
in user mode under the name Xxx. Note that security settings can prevent an
application from opening the event. For more information, see the OpenEvent
Fails in a Non-Administrator Account KB article. The \BaseNamedObjects
object directory is not created until the Microsoft Win32 subsystem
initializes, so drivers that are loaded at boot time cannot create event
objects in the \BaseNamedObjects directory in their DriverEntry routines.

On Sat, Jul 7, 2018 at 12:53 PM xxxxx@sivaller.no-ip.org <
xxxxx@lists.osr.com> wrote:

Hello,
I use event in my driver,
I initialized a event with KeInitializeEvent and
how obtain a user HANDLE for using event since user mode processus ?

Thank.


NTDEV is sponsored by OSR

Visit the list online at: <
http://www.osronline.com/showlists.cfm?list=ntdev\>

MONTHLY seminars on crash dump analysis, WDF, Windows internals and
software drivers!
Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
>


Jamey Kirby
Disrupting the establishment since 1964

This is a personal email account and as such, emails are not subject to
archiving. Nothing else really matters.
</http:>_