The fields in the IRP and stack location map directly
to the parameters of ZwCreateFile or NtCreateFile. As
I understand it, the WIN32 API maps fopen (and other
create calls) to NtCreateFile.
Here is where you can look in the IRP and stack for
different flags and stuff:
DesiredAccess ->
currentIrpStack->Parameters.Create.SecurityContext->DesiredAccess
IoStatus -> Irp->IoStatus
FileAttributes ->
currentIrpStack->Parameters.Create.FileAttributes
ShareAccess ->
currentIrpStack->Parameters.Create.ShareAccess
CreateDisposition ->
currentIrpStack->Parameters.Create.Options >> 24
CreateOptions ->
currentIrpStack->Parameters.Create.Options
Look at the ddk doc and ntddk.h for values for these
params.
Randy Cook
FSLogic Inc.
— AGTU wrote:
> Hello All,
>
> I wrote filter driver. I need known how i get right
> file access ?
> Example, in User mode:
> FILE *fl;
> fl=fopen(“data.txt”,“rb”);
>
> How i get in Kernel mode right “rb” ?
> I get IRP_MJ_CREATE message. When saved right in it
> ?
>
>
> –
> Best regards,
> Yury
> mailto:xxxxx@agtu.secna.ru
>
>
>
> —
> You are currently subscribed to ntfsd as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
%%email.unsub%%
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com