dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: What are the differences between kernel,user and gdi objects?and hadles?

  1. #1
    Join Date
    Sep 2005
    Posts
    336

    What are the differences between kernel,user and gdi objects?and hadles?

    Hi
    What are the differences between kernel,user and gdi objects?and hadles?
    I read that
    1-)kernel objects are created in system adress space but user are in program adress space but gdi?And also i read that kernel objects are can be shred accross processes but user and gid can not.Are these true?I am not sure.
    2-)kernel objects handles are for per-process but user and gdi are system-wide.If thhese are system wides why cant we share accross proccess.Bu also we can share kernel objects?

    I think i mixed everthing and confused a lot.
    CAn you please tell me concept of object and differences between object types(kernel,user,gdi)

    Thanks a lot.

  2. #2
    Join Date
    Jul 2005
    Posts
    767

    Re: What are the differences between kernel,user and gdi objects?and hadles?

    Ok you could probably visualize, Kernel, user and GDI Handles like this,
    Code:
    			Kernel Handle
    			   /    \
    			  /      \
    			User	GDI
    Kernel Handle for a process is process unique and each process has process table which maintains User handles and GDI handles. Both User Handle and GDI handle have a limit, guess 16000 odd as per MSDN, also Kernel handle too have a limit.

    Hope that helps.
    One's mistake cannot be your excuse!

  3. #3
    Join Date
    Jun 2003
    Location
    Armenia, Yerevan
    Posts
    720

    Re: What are the differences between kernel,user and gdi objects?and hadles?

    1. All kernel objects have security atributes, one should provide this info during creation of any kernel object, e.g.: file mapping, semaphore, mutex. If the function which creates some resource and returns the handle to it does not contain the security atribute it doesn't create a kernel object.
    2. As for user space or kernel space: I am not 100% sure, but gdi and user objects are allocated in their own process's memory while kernel objects - in system's memory, they all can be shareable, another question is why on earth and how one would ever need to get some user/gdi handle of another process and what can he do with it?
    Popular opinion is the greatest lie in the world.

  4. #4
    Join Date
    Sep 2005
    Posts
    336

    Re: What are the differences between kernel,user and gdi objects?and hadles?

    Thaks for answers.
    Mr Beans said that
    "each process has process table which maintains User handles and GDI handles"
    But i read that process handle table only store kernel objects handles.Am i wrong?
    ok.
    1-)When a process is cretaed ; windows create a process handle table (right?) and kernel objects store here.
    But where do windows store other objects handles.
    For example:
    I run a process and then win. cretae a process handle table then, program call these functions
    CreateThread() returns handleForKernel
    CreateBitmap() returns handleForGdi
    CeateWindow () returns handleForUser.
    Where are these handles?
    All of them in process handle table?If not which one process handle table which ones are not?
    İn system adress space or program adress space?
    Thansk again
    Last edited by sawer; December 14th, 2006 at 07:42 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)