devxlogo

Differentiate Between Kernal and Non-Kernal Objects

Differentiate Between Kernal and Non-Kernal Objects

In Win32 we create many objects – Windows, File, Threads, process,Semaphore, Event, Pen, Brush, etc. Some of the above are kernal objects while others are not. This tip is an intuitive way to tell whether an object is a kernal object or not.

Look at the arguments of the function that creates that object. If the function takes SECURITY_ATTRIBUTES as an argument, then that object is a kernal object.

For example, following are kernal objects:

 HANDLE CreateThread( LPSECURITY_ATTRIBUTES lpThreadAttributes,  ...)HANDLE CreateSemaphore(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, ..)


The following are not kernal objects:

 HWND CreateWindow(LPCTSTR lpClassName, ..)HPEN CreatePen(int fnPenStyle, ...)

See also  How to Block Websites During Certain Hours on a Mac Computer
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist