Windows NT File System Driver - Creation date problems

Hi All,

Currently I am involved in writing some device driver code for windows NT
file systems. Driver provides additional network drive to the winnt user.
Problem is - while creating a file on the new network drive, driver routine
is not populating different date fields (creation date, change date, last
access date, last write date). I tried setting these fields while creating
FCB block and populating FCB.MetaData.Created, FCB.MetaData.Change,
FCB.MetaData.LastAccess, and FCB.MetaData.LastWrite fields - but it does not
seem to work - i am unable to figure out in which format does winnt want
date fields to be populated and whether populating values while creating FCB
block is a good idea or not… was wondering if anyone has dealt with this
problem before and could provide some insight.

Thanks!
Devang

Well could’nt understand the problem thoroghly.
But you can do the following checklist.

  1. Use KeQuerySystemTime( PLARGE_INTEGER time)
    function to get the current time.
  2. Are you getting a call to IRP_MJ_QUERY_INFORMATION
    while accesing network drive.
    If yes then check out the Minor Function
    FileNetworkOpenInformation. Fill out the fields of
    this structure.
    Hope it helps.
    Gurpreet

— Devang Shah wrote:
> Hi All,
>
> Currently I am involved in writing some device
> driver code for windows NT
> file systems. Driver provides additional network
> drive to the winnt user.
> Problem is - while creating a file on the new
> network drive, driver routine
> is not populating different date fields (creation
> date, change date, last
> access date, last write date). I tried setting these
> fields while creating
> FCB block and populating FCB.MetaData.Created,
> FCB.MetaData.Change,
> FCB.MetaData.LastAccess, and FCB.MetaData.LastWrite
> fields - but it does not
> seem to work - i am unable to figure out in which
> format does winnt want
> date fields to be populated and whether populating
> values while creating FCB
> block is a good idea or not… was wondering if
> anyone has dealt with this
> problem before and could provide some insight.
>
> Thanks!
> Devang
>
>
>
>
> —
> You are currently subscribed to ntfsd as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
> $subst(‘Email.Unsub’)
>
>
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

Hey Guys,

Thanks for the reply - I did try to implement you guys suggestions but no
luck. To restate the problem - currently we are implementing the device
driver for the winnt file system. User can create the file on new drive - it
also shows correct file size but not date field values (creation date,
change date, last access date…) and also attributes. In the current
implementation, device driver code is divided into two parts - one runs in
kernel mode and second one in user mode - they communicate with each other
using IOCTL - most of the functionality is in user mode driver which is
written using C++. In the user mode driver part, while handling
‘IRP_MJ_SET_INFORMATION’ and informationclass - FileBAsicInformation, code
is getting data from the kernel mode driver and accordingly populates file
date and attribute fields. I am assuming that data available from the
IRP…->AssociatedIRP.SystemBuffer would have values in these fields for me -
I suspect that this part of the code is not working correctly.

Also I tried setting those fields in IRP_MJ_QUERY_INFORMATION
(informationclass - FileNetworkOpenInformation) routine, but problem is i am
unable to build the program with a call to KeQuerySystemTime() function -
its giving me link error. I wonder which library will have this function and
also whether i can call this function from the user mode driver or not.

Thanks!
Devang.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Gurpreet Anand
Sent: Monday, March 06, 2000 4:50 PM
To: File Systems Developers Interest List
Subject: [ntfsd] Re: Windows NT File System Driver - Creation date
problems

Well could’nt understand the problem thoroghly.
But you can do the following checklist.

  1. Use KeQuerySystemTime( PLARGE_INTEGER time)
    function to get the current time.
  2. Are you getting a call to IRP_MJ_QUERY_INFORMATION
    while accesing network drive.
    If yes then check out the Minor Function
    FileNetworkOpenInformation. Fill out the fields of
    this structure.
    Hope it helps.
    Gurpreet

— Devang Shah wrote:
> Hi All,
>
> Currently I am involved in writing some device
> driver code for windows NT
> file systems. Driver provides additional network
> drive to the winnt user.
> Problem is - while creating a file on the new
> network drive, driver routine
> is not populating different date fields (creation
> date, change date, last
> access date, last write date). I tried setting these
> fields while creating
> FCB block and populating FCB.MetaData.Created,
> FCB.MetaData.Change,
> FCB.MetaData.LastAccess, and FCB.MetaData.LastWrite
> fields - but it does not
> seem to work - i am unable to figure out in which
> format does winnt want
> date fields to be populated and whether populating
> values while creating FCB
> block is a good idea or not… was wondering if
> anyone has dealt with this
> problem before and could provide some insight.
>
> Thanks!
> Devang
>
>
>
>
> —
> You are currently subscribed to ntfsd as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
> $subst(‘Email.Unsub’)
>
>
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com


You are currently subscribed to ntfsd as: dsshah@cs.cmu.edu
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

One can call KeQuerySystemTime() in the Kernel mode.
How exactly are you filling the time attributes.
U said that u copy the fields in the FCB with the
time.
Like FCB.Metadata.CreationTime = ???.
??? - Here how are u filling the Structure.
And what about the datatype of the CreationTime.
It would be better if u can send the code where this
operation is being done with the structure of the FCB.
Gurpreet

— Devang Shah wrote:
> Hey Guys,
>
> Thanks for the reply - I did try to implement you
> guys suggestions but no
> luck. To restate the problem - currently we are
> implementing the device
> driver for the winnt file system. User can create
> the file on new drive - it
> also shows correct file size but not date field
> values (creation date,
> change date, last access date…) and also
> attributes. In the current
> implementation, device driver code is divided into
> two parts - one runs in
> kernel mode and second one in user mode - they
> communicate with each other
> using IOCTL - most of the functionality is in user
> mode driver which is
> written using C++. In the user mode driver part,
> while handling
> ‘IRP_MJ_SET_INFORMATION’ and informationclass -
> FileBAsicInformation, code
> is getting data from the kernel mode driver and
> accordingly populates file
> date and attribute fields. I am assuming that data
> available from the
> IRP…->AssociatedIRP.SystemBuffer would have values
> in these fields for me -
> I suspect that this part of the code is not working
> correctly.
>
> Also I tried setting those fields in
> IRP_MJ_QUERY_INFORMATION
> (informationclass - FileNetworkOpenInformation)
> routine, but problem is i am
> unable to build the program with a call to
> KeQuerySystemTime() function -
> its giving me link error. I wonder which library
> will have this function and
> also whether i can call this function from the user
> mode driver or not.
>
> Thanks!
> Devang.
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com]On Behalf Of
> Gurpreet Anand
> Sent: Monday, March 06, 2000 4:50 PM
> To: File Systems Developers Interest List
> Subject: [ntfsd] Re: Windows NT File System Driver -
> Creation date
> problems
>
>
> Well could’nt understand the problem thoroghly.
> But you can do the following checklist.
> 1. Use KeQuerySystemTime( PLARGE_INTEGER time)
> function to get the current time.
> 2. Are you getting a call to
> IRP_MJ_QUERY_INFORMATION
> while accesing network drive.
> If yes then check out the Minor Function
> FileNetworkOpenInformation. Fill out the fields of
> this structure.
> Hope it helps.
> Gurpreet
>
> — Devang Shah wrote:
> > Hi All,
> >
> > Currently I am involved in writing some device
> > driver code for windows NT
> > file systems. Driver provides additional network
> > drive to the winnt user.
> > Problem is - while creating a file on the new
> > network drive, driver routine
> > is not populating different date fields (creation
> > date, change date, last
> > access date, last write date). I tried setting
> these
> > fields while creating
> > FCB block and populating FCB.MetaData.Created,
> > FCB.MetaData.Change,
> > FCB.MetaData.LastAccess, and
> FCB.MetaData.LastWrite
> > fields - but it does not
> > seem to work - i am unable to figure out in which
> > format does winnt want
> > date fields to be populated and whether populating
> > values while creating FCB
> > block is a good idea or not… was wondering if
> > anyone has dealt with this
> > problem before and could provide some insight.
> >
> > Thanks!
> > Devang
> >
> >
> >
> >
> > —
> > You are currently subscribed to ntfsd as:
> > xxxxx@yahoo.com
> > To unsubscribe send a blank email to
> > $subst(‘Email.Unsub’)
> >
> >
>
> Do You Yahoo!?
> Talk to your friends online with Yahoo! Messenger.
> http://im.yahoo.com
>
> —
> You are currently subscribed to ntfsd as:
> dsshah@cs.cmu.edu
> To unsubscribe send a blank email to
> $subst(‘Email.Unsub’)
>
>
> —
> You are currently subscribed to ntfsd as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
> $subst(‘Email.Unsub’)
>
>

Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com