Windows中的内核对象和事件对象有什么区别?

时间:2022-08-05 20:11:13

As far as I know , both of them are pointed by a HANDLE which can be manipulated by user. What is the difference?

据我所知,它们都是由HANDLE指向的,可由用户操纵。有什么不同?

1 个解决方案

#1


Most of the APIs used to create, synchronize and monitor threads in a multi threaded application rely on kernel objects, which are also used to manage memory and files. KO are OS resources such as process, threads, events, mutex, semaphores, shared memory and files etc.

用于在多线程应用程序中创建,同步和监视线程的大多数API依赖于内核对象,这些对象也用于管理内存和文件。 KO是OS资源,例如进程,线程,事件,互斥,信号量,共享内存和文件等。

Except creating or opening a kernel object. you refer it by a HANDLE rather than name. A HANDLE is 32-bit value which uniquely identify the kernel object.

除了创建或打开内核对象。你用HANDLE而不是名字来引用它。 HANDLE是32位值,它唯一地标识内核对象。

Kernel object is in general and Event is one of the specific kernel object.

内核对象通常是,而Event是特定的内核对象之一。

Refer

Kernel Objects.

Events.

#1


Most of the APIs used to create, synchronize and monitor threads in a multi threaded application rely on kernel objects, which are also used to manage memory and files. KO are OS resources such as process, threads, events, mutex, semaphores, shared memory and files etc.

用于在多线程应用程序中创建,同步和监视线程的大多数API依赖于内核对象,这些对象也用于管理内存和文件。 KO是OS资源,例如进程,线程,事件,互斥,信号量,共享内存和文件等。

Except creating or opening a kernel object. you refer it by a HANDLE rather than name. A HANDLE is 32-bit value which uniquely identify the kernel object.

除了创建或打开内核对象。你用HANDLE而不是名字来引用它。 HANDLE是32位值,它唯一地标识内核对象。

Kernel object is in general and Event is one of the specific kernel object.

内核对象通常是,而Event是特定的内核对象之一。

Refer

Kernel Objects.

Events.