Re: How to get the FILE_OBJECT given a SECTION_OBJECT ?

In my work i ended up with a situation where i wanted the
Filename/FileObject but what i had was only Section handle. I can solve my
problem in different approach without using SectionObjects or FileObjects.

I felt this was intresting, and i wanted to know if there was some API
which i overlooked.

Thank you for your response.
-Srin.

-----Original Message-----
From: Dan Partelly [mailto:xxxxx@rdsor.ro]
Sent: Monday, September 23, 2002 3:06 PM
To: NT Developers Interest List
Subject: [ntdev] Re: How to get the FILE_OBJECT given a SECTION_OBJECT?

No API for that, afaik. Those structures are extremly dependant by OS
version, they changed in every major build of NT kernel. What is what you
want to accomplish ?

Dan

wrote in message news:xxxxx@ntdev…
>
> I have a handle to SECTION_OBJECT. i would like to get the FILE_OBJECT
> backed by SECTION_OBJECT.
>
> After query on the section attributes i found the section is backed by a
> file and the section is mapped as an image. How do i find the file
> object/file name it is backed by?
>
> In debugger i found the following information.
>
> In SECTION_OBJECT at Offset 0x14 i have a pointer to SEGMENT
> In SEGMENT at Offset 0x00 i have a pointer to CONTROL_AREA
> In CONTROL_AREA at Offset 0x24 i have pointer to the FILE_OBJECT.
>
> The Big Question, how do i get this information using microsoft approved
> API?
> Is this possible? Can i get pointer to the FILE_OBJECT given a pointer to
> SECTION_OBJECT? Offcourse if and only if the SECTION_OBJECT is backed by a
> file.
>
> Any help is appreciated.
> Thanks,
> -Srin.
>
>
>


You are currently subscribed to ntdev as: xxxxx@nai.com
To unsubscribe send a blank email to %%email.unsub%%