Message box with message "there is no disk in the drive. Please insert a disk into drive A:"

Hi All,

I am developing a file system filter driver on windows 2000, and am tryin to
open A: device as below

ntStatus = ZwCreateFile( &Handle, SYNCHRONIZE|FILE_ANY_ACCESS,
&objectAttributes, &ioStatus, NULL, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE,
FILE_OPEN,
FILE_SYNCHRONOUS_IO_NONALERT|FILE_DIRECTORY_FILE,
NULL, 0 );

When I use this code I get message box with message “There is no disk in the
drive.Please insert a disk into drive A:”. Why is this message coming?
How to stop this message box from being displayed?

Any information is helpful.

Thanks,
Kedar.

You don’t show us the object attributes structure you are using - are
you trying to open the root directory? If so, that is going to trigger
the hard error popup. If you want to see if there is media in the
drive, you need to open the volume, not the root directory.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Kedar
Sent: Thursday, May 20, 2004 3:21 AM
To: ntfsd redirect
Subject: [ntfsd] Message box with message “there is no disk in the
drive. Please insert a disk into drive A:”

Hi All,

I am developing a file system filter driver on windows 2000, and am
tryin to open A: device as below

ntStatus = ZwCreateFile( &Handle, SYNCHRONIZE|FILE_ANY_ACCESS,
&objectAttributes, &ioStatus, NULL, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE,
FILE_OPEN,
FILE_SYNCHRONOUS_IO_NONALERT|FILE_DIRECTORY_FILE,
NULL, 0 );

When I use this code I get message box with message “There is no disk in
the drive.Please insert a disk into drive A:”. Why is this message
coming?
How to stop this message box from being displayed?

Any information is helpful.

Thanks,
Kedar.


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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

Hi Tony Manson,

Here is the object attributes structure I am using.

WCHAR name = L"\DosDevices\A:\";

RtlInitUnicodeString( &fileNameUnicodeString, name );

InitializeObjectAttributes( &objectAttributes, &NameUnicodeString,

OBJ_CASE_INSENSITIVE, NULL, NULL );

ntStatus = ZwCreateFile( &Handle, SYNCHRONIZE|FILE_ANY_ACCESS,

&objectAttributes, &ioStatus, NULL, 0,

FILE_SHARE_READ|FILE_SHARE_WRITE,

FILE_OPEN,

FILE_SYNCHRONOUS_IO_NONALERT|FILE_DIRECTORY_FILE,

NULL, 0 );

Thanks,

Kedar.

“Tony Mason” wrote in message news:xxxxx@ntfsd…
You don’t show us the object attributes structure you are using - are
you trying to open the root directory? If so, that is going to trigger
the hard error popup. If you want to see if there is media in the
drive, you need to open the volume, not the root directory.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Kedar
Sent: Thursday, May 20, 2004 3:21 AM
To: ntfsd redirect
Subject: [ntfsd] Message box with message “there is no disk in the
drive. Please insert a disk into drive A:”

Hi All,

I am developing a file system filter driver on windows 2000, and am
tryin to open A: device as below

ntStatus = ZwCreateFile( &Handle, SYNCHRONIZE|FILE_ANY_ACCESS,
&objectAttributes, &ioStatus, NULL, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE,
FILE_OPEN,
FILE_SYNCHRONOUS_IO_NONALERT|FILE_DIRECTORY_FILE,
NULL, 0 );

When I use this code I get message box with message “There is no disk in
the drive.Please insert a disk into drive A:”. Why is this message
coming?
How to stop this message box from being displayed?

Any information is helpful.

Thanks,
Kedar.


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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

Hi Tony Manson,

If I want to filter the file system that mounted for the floppy then I
should open the root directory of the disk.
Am I right? how to avoid that pop up from being displayed?

Thanks,
Kedar.

“Tony Mason” wrote in message news:xxxxx@ntfsd…
You don’t show us the object attributes structure you are using - are
you trying to open the root directory? If so, that is going to trigger
the hard error popup. If you want to see if there is media in the
drive, you need to open the volume, not the root directory.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Kedar
Sent: Thursday, May 20, 2004 3:21 AM
To: ntfsd redirect
Subject: [ntfsd] Message box with message “there is no disk in the
drive. Please insert a disk into drive A:”

Hi All,

I am developing a file system filter driver on windows 2000, and am
tryin to open A: device as below

ntStatus = ZwCreateFile( &Handle, SYNCHRONIZE|FILE_ANY_ACCESS,
&objectAttributes, &ioStatus, NULL, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE,
FILE_OPEN,
FILE_SYNCHRONOUS_IO_NONALERT|FILE_DIRECTORY_FILE,
NULL, 0 );

When I use this code I get message box with message “There is no disk in
the drive.Please insert a disk into drive A:”. Why is this message
coming?
How to stop this message box from being displayed?

Any information is helpful.

Thanks,
Kedar.


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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

No, open the volume. That way you can avoid the hard error popup.

Try removing the trailing slash in the name you are using; that should
get rid of the hard error popup that you are seeing.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Kedar
Sent: Friday, May 21, 2004 3:07 AM
To: ntfsd redirect
Subject: Re:[ntfsd] Message box with message “there is no disk in the
drive. Please insert a disk into drive A:”

Hi Tony Manson,

If I want to filter the file system that mounted for the floppy then I
should open the root directory of the disk.
Am I right? how to avoid that pop up from being displayed?

Thanks,
Kedar.

“Tony Mason” wrote in message news:xxxxx@ntfsd…
You don’t show us the object attributes structure you are using - are
you trying to open the root directory? If so, that is going to trigger
the hard error popup. If you want to see if there is media in the
drive, you need to open the volume, not the root directory.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Kedar
Sent: Thursday, May 20, 2004 3:21 AM
To: ntfsd redirect
Subject: [ntfsd] Message box with message “there is no disk in the
drive. Please insert a disk into drive A:”

Hi All,

I am developing a file system filter driver on windows 2000, and am
tryin to open A: device as below

ntStatus = ZwCreateFile( &Handle, SYNCHRONIZE|FILE_ANY_ACCESS,
&objectAttributes, &ioStatus, NULL, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE,
FILE_OPEN,
FILE_SYNCHRONOUS_IO_NONALERT|FILE_DIRECTORY_FILE,
NULL, 0 );

When I use this code I get message box with message “There is no disk in
the drive.Please insert a disk into drive A:”. Why is this message
coming?
How to stop this message box from being displayed?

Any information is helpful.

Thanks,
Kedar.


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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