CreateFile returns error code 1

I have a vanilla filter driver. It does not even attach to a volume. I made
the following sequence of calls to load the driver.

CreateService(…);
StartService(…);

CreateFile(…);

When I call create file to get handle to device driver, it return invalid
handle value and GetLastError returns 1. This damn thing was working couple
of hiurs ago. I rolled back very change I made to the driver.

Any ideas?

It’s not a filter if not attached to something. However, I assume not the
driver but the loader fails. E.g. a create_always flag might be an illegal
function respective your drivers device object.

----- Original Message -----
From: “Kohli, Naveen”
To: “File Systems Developers”
Sent: Tuesday, July 22, 2003 10:38 PM
Subject: [ntfsd] CreateFile returns error code 1

> I have a vanilla filter driver. It does not even attach to a volume. I
made
> the following sequence of calls to load the driver.
>
> CreateService(…);
> StartService(…);
>
> CreateFile(…);
>
> When I call create file to get handle to device driver, it return invalid
> handle value and GetLastError returns 1. This damn thing was working
couple
> of hiurs ago. I rolled back very change I made to the driver.
>
> Any ideas?
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@linkwave.org
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

This is going to be a filter eventually. But it won’t work in the current
mode. Once I can get past this point, only then I can send the IoCtl message
to attach to a volume. Here is what I have found…
I changed the DeviceType code that was being used in IoCreateDevice to a
different value. And now it seems to work. I don’t understand why the change
in value will make it to work. I asked this question couple of days ago
about this code and I got the reply this code does not matter. But now I am
begining to wonder, may be it does matter.
Any idea?

-----Original Message-----
From: Tobias [mailto:xxxxx@linkwave.org]
Sent: Tuesday, July 22, 2003 5:41 PM
To: File Systems Developers
Subject: [ntfsd] Re: CreateFile returns error code 1

It’s not a filter if not attached to something. However, I assume not the
driver but the loader fails. E.g. a create_always flag might be an illegal
function respective your drivers device object.

----- Original Message -----
From: “Kohli, Naveen”
To: “File Systems Developers”
Sent: Tuesday, July 22, 2003 10:38 PM
Subject: [ntfsd] CreateFile returns error code 1

> I have a vanilla filter driver. It does not even attach to a volume. I
made
> the following sequence of calls to load the driver.
>
> CreateService(…);
> StartService(…);
>
> CreateFile(…);
>
> When I call create file to get handle to device driver, it return invalid
> handle value and GetLastError returns 1. This damn thing was working
couple
> of hiurs ago. I rolled back very change I made to the driver.
>
> Any ideas?
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@linkwave.org
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>


You are currently subscribed to ntfsd as: xxxxx@criticalsites.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

If you’re trying to write a filesystem filter and you’re not beginning
with the filespy sample in the IFSKIT as an example, you’ve got years of
work ahead of you.

Kohli, Naveen wrote:

This is going to be a filter eventually. But it won’t work in the
current mode. Once I can get past this point, only then I can send the
IoCtl message to attach to a volume. Here is what I have found…

I changed the DeviceType code that was being used in IoCreateDevice to a
different value. And now it seems to work. I don’t understand why the
change in value will make it to work. I asked this question couple of
days ago about this code and I got the reply this code does not matter.
But now I am begining to wonder, may be it does matter.

Any idea?

-----Original Message-----
From: Tobias [mailto:xxxxx@linkwave.org]
Sent: Tuesday, July 22, 2003 5:41 PM
To: File Systems Developers
Subject: [ntfsd] Re: CreateFile returns error code 1

It’s not a filter if not attached to something. However, I assume not the
driver but the loader fails. E.g. a create_always flag might be an illegal
function respective your drivers device object.

----- Original Message -----
From: “Kohli, Naveen”
> To: “File Systems Developers”
> Sent: Tuesday, July 22, 2003 10:38 PM
> Subject: [ntfsd] CreateFile returns error code 1
>
>
> > I have a vanilla filter driver. It does not even attach to a volume. I
> made
> > the following sequence of calls to load the driver.
> >
> > CreateService(…);
> > StartService(…);
> >
> > CreateFile(…);
> >
> > When I call create file to get handle to device driver, it return
> invalid
> > handle value and GetLastError returns 1. This damn thing was working
> couple
> > of hiurs ago. I rolled back very change I made to the driver.
> >
> > Any ideas?
> >
> >
> > —
> > You are currently subscribed to ntfsd as: xxxxx@linkwave.org
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@criticalsites.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> You are currently subscribed to ntfsd as: xxxxx@nryan.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com


- Nick Ryan (MVP for DDK)

Nick,
I already have a working filter. I was trying to rip out some code that was
not needed in there. And then I got stomped with this issue. I really don’t
mind years of work :slight_smile:
Can you think of a reason why will I get error code 1. Infact now I am
getting this error quite frequently. And then i change the device type code
to some thing else then everything works ok till I delete the driver.

Any idea will be highly appreciated.

Thanks,
Naveen

-----Original Message-----
From: Nick Ryan [mailto:xxxxx@nryan.com]
Sent: Tuesday, July 22, 2003 6:02 PM
To: File Systems Developers
Subject: [ntfsd] Re: CreateFile returns error code 1

If you’re trying to write a filesystem filter and you’re not beginning
with the filespy sample in the IFSKIT as an example, you’ve got years of
work ahead of you.

Kohli, Naveen wrote:

This is going to be a filter eventually. But it won’t work in the
current mode. Once I can get past this point, only then I can send the
IoCtl message to attach to a volume. Here is what I have found…

I changed the DeviceType code that was being used in IoCreateDevice to a
different value. And now it seems to work. I don’t understand why the
change in value will make it to work. I asked this question couple of
days ago about this code and I got the reply this code does not matter.
But now I am begining to wonder, may be it does matter.

Any idea?

-----Original Message-----
From: Tobias [mailto:xxxxx@linkwave.org]
Sent: Tuesday, July 22, 2003 5:41 PM
To: File Systems Developers
Subject: [ntfsd] Re: CreateFile returns error code 1

It’s not a filter if not attached to something. However, I assume not the
driver but the loader fails. E.g. a create_always flag might be an illegal
function respective your drivers device object.

----- Original Message -----
From: “Kohli, Naveen”
> To: “File Systems Developers”
> Sent: Tuesday, July 22, 2003 10:38 PM
> Subject: [ntfsd] CreateFile returns error code 1
>
>
> > I have a vanilla filter driver. It does not even attach to a volume. I
> made
> > the following sequence of calls to load the driver.
> >
> > CreateService(…);
> > StartService(…);
> >
> > CreateFile(…);
> >
> > When I call create file to get handle to device driver, it return
> invalid
> > handle value and GetLastError returns 1. This damn thing was working
> couple
> > of hiurs ago. I rolled back very change I made to the driver.
> >
> > Any ideas?
> >
> >
> > —
> > You are currently subscribed to ntfsd as: xxxxx@linkwave.org
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@criticalsites.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> You are currently subscribed to ntfsd as: xxxxx@nryan.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com


- Nick Ryan (MVP for DDK)


You are currently subscribed to ntfsd as: xxxxx@criticalsites.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

My point was that filespy works and your filter currently doesn’t. Why
not compare the two?

Kohli, Naveen wrote:

Nick,
I already have a working filter. I was trying to rip out some code that
was not needed in there. And then I got stomped with this issue. I
really don’t mind years of work :slight_smile:

Can you think of a reason why will I get error code 1. Infact now I am
getting this error quite frequently. And then i change the device type
code to some thing else then everything works ok till I delete the driver.

Any idea will be highly appreciated.

Thanks,
Naveen

-----Original Message-----
From: Nick Ryan [mailto:xxxxx@nryan.com]
Sent: Tuesday, July 22, 2003 6:02 PM
To: File Systems Developers
Subject: [ntfsd] Re: CreateFile returns error code 1

If you’re trying to write a filesystem filter and you’re not beginning
with the filespy sample in the IFSKIT as an example, you’ve got years of
work ahead of you.

Kohli, Naveen wrote:

> This is going to be a filter eventually. But it won’t work in the
> current mode. Once I can get past this point, only then I can send the
> IoCtl message to attach to a volume. Here is what I have found…
>
> I changed the DeviceType code that was being used in IoCreateDevice to a
> different value. And now it seems to work. I don’t understand why the
> change in value will make it to work. I asked this question couple of
> days ago about this code and I got the reply this code does not matter.
> But now I am begining to wonder, may be it does matter.
>
> Any idea?
>
> -----Original Message-----
> From: Tobias [mailto:xxxxx@linkwave.org]
> Sent: Tuesday, July 22, 2003 5:41 PM
> To: File Systems Developers
> Subject: [ntfsd] Re: CreateFile returns error code 1
>
>
> It’s not a filter if not attached to something. However, I assume not
the
> driver but the loader fails. E.g. a create_always flag might be an
illegal
> function respective your drivers device object.
>
> ----- Original Message -----
> From: “Kohli, Naveen”
> > To: “File Systems Developers”
> > Sent: Tuesday, July 22, 2003 10:38 PM
> > Subject: [ntfsd] CreateFile returns error code 1
> >
> >
> > > I have a vanilla filter driver. It does not even attach to a
> volume. I
> > made
> > > the following sequence of calls to load the driver.
> > >
> > > CreateService(…);
> > > StartService(…);
> > >
> > > CreateFile(…);
> > >
> > > When I call create file to get handle to device driver, it return
> > invalid
> > > handle value and GetLastError returns 1. This damn thing was working
> > couple
> > > of hiurs ago. I rolled back very change I made to the driver.
> > >
> > > Any ideas?
> > >
> > >
> > > —
> > > You are currently subscribed to ntfsd as: xxxxx@linkwave.org
> > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> >
> >
> >
> > —
> > You are currently subscribed to ntfsd as: xxxxx@criticalsites.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> > —
> > You are currently subscribed to ntfsd as: xxxxx@nryan.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> –
> - Nick Ryan (MVP for DDK)
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@criticalsites.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> You are currently subscribed to ntfsd as: xxxxx@nryan.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com


- Nick Ryan (MVP for DDK)

At this point, the new filter (hardly any filter) has no IRP functions
implemented. Plain DriverEntry routine and a pass through routine. I just
can’t get past CreateFile routine from user mode. I will spend some time
researching this issue. I want to see why changing the drive type code makes
it to work for some time and then stops.

-----Original Message-----
From: Nick Ryan [mailto:xxxxx@nryan.com]
Sent: Tuesday, July 22, 2003 6:22 PM
To: File Systems Developers

My point was that filespy works and your filter currently doesn’t. Why
not compare the two?

Kohli, Naveen wrote:

Nick,
I already have a working filter. I was trying to rip out some code that
was not needed in there. And then I got stomped with this issue. I
really don’t mind years of work :slight_smile:

Can you think of a reason why will I get error code 1. Infact now I am
getting this error quite frequently. And then i change the device type
code to some thing else then everything works ok till I delete the driver.

Any idea will be highly appreciated.

Thanks,
Naveen

-----Original Message-----
From: Nick Ryan [mailto:xxxxx@nryan.com]
Sent: Tuesday, July 22, 2003 6:02 PM
To: File Systems Developers
Subject: [ntfsd] Re: CreateFile returns error code 1

If you’re trying to write a filesystem filter and you’re not beginning
with the filespy sample in the IFSKIT as an example, you’ve got years of
work ahead of you.

Kohli, Naveen wrote:

> This is going to be a filter eventually. But it won’t work in the
> current mode. Once I can get past this point, only then I can send the
> IoCtl message to attach to a volume. Here is what I have found…
>
> I changed the DeviceType code that was being used in IoCreateDevice to
a
> different value. And now it seems to work. I don’t understand why the
> change in value will make it to work. I asked this question couple of
> days ago about this code and I got the reply this code does not matter.
> But now I am begining to wonder, may be it does matter.
>
> Any idea?
>
> -----Original Message-----
> From: Tobias [mailto:xxxxx@linkwave.org]
> Sent: Tuesday, July 22, 2003 5:41 PM
> To: File Systems Developers
> Subject: [ntfsd] Re: CreateFile returns error code 1
>
>
> It’s not a filter if not attached to something. However, I assume not
the
> driver but the loader fails. E.g. a create_always flag might be an
illegal
> function respective your drivers device object.
>
> ----- Original Message -----
> From: “Kohli, Naveen”
> > To: “File Systems Developers”
> > Sent: Tuesday, July 22, 2003 10:38 PM
> > Subject: [ntfsd] CreateFile returns error code 1
> >
> >
> > > I have a vanilla filter driver. It does not even attach to a
> volume. I
> > made
> > > the following sequence of calls to load the driver.
> > >
> > > CreateService(…);
> > > StartService(…);
> > >
> > > CreateFile(…);
> > >
> > > When I call create file to get handle to device driver, it return
> > invalid
> > > handle value and GetLastError returns 1. This damn thing was working
> > couple
> > > of hiurs ago. I rolled back very change I made to the driver.
> > >
> > > Any ideas?
> > >
> > >
> > > —
> > > You are currently subscribed to ntfsd as: xxxxx@linkwave.org
> > > To unsubscribe send a blank email to
xxxxx@lists.osr.com
> > >
> >
> >
> >
> > —
> > You are currently subscribed to ntfsd as: xxxxx@criticalsites.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> > —
> > You are currently subscribed to ntfsd as: xxxxx@nryan.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> –
> - Nick Ryan (MVP for DDK)
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@criticalsites.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> You are currently subscribed to ntfsd as: xxxxx@nryan.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com


- Nick Ryan (MVP for DDK)


You are currently subscribed to ntfsd as: xxxxx@criticalsites.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

RE: [ntfsd] Re: CreateFile returns error code 1Make sure you IRP_MJ_CREATE dispatch routine completes IRP with STATUS_SUCCESS. Status code 1 means ‘Incorrect function’ which means that you complete IRP_MJ_CREATE IRP with STATUS_INVALID_DEVICE_REQUEST or don’t have IRP_MJ_CREATE dispatch routine at all.

-htfv

----- Original Message -----
From: Kohli, Naveen
To: File Systems Developers
Sent: Wednesday, July 23, 2003 1:27 AM
Subject: [ntfsd] Re: CreateFile returns error code 1

At this point, the new filter (hardly any filter) has no IRP functions implemented. Plain DriverEntry routine and a pass through routine. I just can’t get past CreateFile routine from user mode. I will spend some time researching this issue. I want to see why changing the drive type code makes it to work for some time and then stops.

-----Original Message-----
From: Nick Ryan [mailto:xxxxx@nryan.com]
Sent: Tuesday, July 22, 2003 6:22 PM
To: File Systems Developers

My point was that filespy works and your filter currently doesn’t. Why
not compare the two?

Kohli, Naveen wrote:

Nick,
> I already have a working filter. I was trying to rip out some code that
> was not needed in there. And then I got stomped with this issue. I
> really don’t mind years of work :slight_smile:
>
> Can you think of a reason why will I get error code 1. Infact now I am
> getting this error quite frequently. And then i change the device type
> code to some thing else then everything works ok till I delete the driver.
>
> Any idea will be highly appreciated.
>
> Thanks,
> Naveen
>
> -----Original Message-----
> From: Nick Ryan [mailto:xxxxx@nryan.com]
> Sent: Tuesday, July 22, 2003 6:02 PM
> To: File Systems Developers
> Subject: [ntfsd] Re: CreateFile returns error code 1
>
>
> If you’re trying to write a filesystem filter and you’re not beginning
> with the filespy sample in the IFSKIT as an example, you’ve got years of
> work ahead of you.
>
> Kohli, Naveen wrote:
>
> > This is going to be a filter eventually. But it won’t work in the
> > current mode. Once I can get past this point, only then I can send the
> > IoCtl message to attach to a volume. Here is what I have found…
> >
> > I changed the DeviceType code that was being used in IoCreateDevice to a
> > different value. And now it seems to work. I don’t understand why the
> > change in value will make it to work. I asked this question couple of
> > days ago about this code and I got the reply this code does not matter.
> > But now I am begining to wonder, may be it does matter.
> >
> > Any idea?
> >
> > -----Original Message-----
> > From: Tobias [mailto:xxxxx@linkwave.org]
> > Sent: Tuesday, July 22, 2003 5:41 PM
> > To: File Systems Developers
> > Subject: [ntfsd] Re: CreateFile returns error code 1
> >
> >
> > It’s not a filter if not attached to something. However, I assume not
> the
> > driver but the loader fails. E.g. a create_always flag might be an
> illegal
> > function respective your drivers device object.
> >
> > ----- Original Message -----
> > From: “Kohli, Naveen”
> > To: “File Systems Developers”
> > Sent: Tuesday, July 22, 2003 10:38 PM
> > Subject: [ntfsd] CreateFile returns error code 1
> >
> >
> > > I have a vanilla filter driver. It does not even attach to a
> volume. I
> > made
> > > the following sequence of calls to load the driver.
> > >
> > > CreateService(…);
> > > StartService(…);
> > >
> > > CreateFile(…);
> > >
> > > When I call create file to get handle to device driver, it return
> > invalid
> > > handle value and GetLastError returns 1. This damn thing was working
> > couple
> > > of hiurs ago. I rolled back very change I made to the driver.
> > >
> > > Any ideas?
> > >
> > >
> > > —
> > > You are currently subscribed to ntfsd as: xxxxx@linkwave.org
> > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> >
> >
> >
> > —
> > You are currently subscribed to ntfsd as: xxxxx@criticalsites.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> > —
> > You are currently subscribed to ntfsd as: xxxxx@nryan.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> –
> - Nick Ryan (MVP for DDK)
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@criticalsites.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> You are currently subscribed to ntfsd as: xxxxx@nryan.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com


- Nick Ryan (MVP for DDK)


You are currently subscribed to ntfsd as: xxxxx@criticalsites.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@vba.com.by
To unsubscribe send a blank email to xxxxx@lists.osr.com