PEB structure details?

Hi all,
I would like to get the handle to current directory of calling process
in my FSCTL handler. I believe curdir handle is stored in PEB. So how
do I get this curdir handle from PEB? Is PEB structure defined in any
header file.

Also I want to store a pointer to context information in a process.
This structure will remain till process terminates. What is the smart
way to do this? Currently I am thinking of setting process environment
variable that will have the pointer in string format. I am sure there
are better ways than this.

thanks
naja


Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

> Hi all,

I would like to get the handle to current directory of calling process
in my FSCTL handler. I believe curdir handle is stored in PEB. So how
do I get this curdir handle from PEB? Is PEB structure defined in any
header file.

I don’t think you’ll find it defined in any Microsoft header files. I found
an attempt at the struct definition a few days ago on dejanews. Do a search
there. FWIW, “Inside Windows 2000, 3rd ed.” states that the PEB is *always*
mapped at 0x7ffdf000.

good luck,
Marc