Microsoft KB Archive/60083

Find_Next Call Doesn’t Work Correctly with CD-ROM PSS ID Number: Q60083 Article last modified on 07-14-1993 PSS database name: O_MSDOS

4.01

MS-DOS

Summary:

The MS-DOS Find_First/Find_Next system calls behave differently when used with a hard disk as opposed to a CD-ROM. The following table summarizes the differences:

Attributes Searched For ---

Label & Direc- Label | Label &  Direc-  Label Direc-  tory   only  | Direc-   tory    only tory    only         | tory     only --- -- - | ---  --  - Finds all directories yes yes no | yes yes no Finds all files yes yes yes* | yes yes no Finds the volume label no* no yes | yes no yes |   /   / ——- ——– ——– ——– / / CD-ROM VOLUME DISK VOLUME

The items marked with an asterisk (*) are incorrect.

This means that without careful inspection of all of your code, you have no assurance that code written for disk operations will work with a CD-ROM when using MSCDEX Version 2.10.

Microsoft has confirmed this to be a problem in MS-DOS Version 4.01. We are researching this problem and will post new information here as it becomes available.

More Information:

The MS-DOS Find_First function finds the volume label for a CD-ROM or DISK volume when ONLY a search attribute of a volume label is specified. There can be only one volume label per volume; therefore, the Find_Next function for this case should be undefined.

Please note that in this case the Find_First function always finds the volume label first, whether a CD-ROM or DISK volume is being used. Your application needs to validate found attributes by looking at the returned attribute, @DTA+OFFSET_FILE_ATTRIBUTE, to make sure the found attributes match the specified attributes. Also, you cannot rely on the combined volume and directory attributes to give the same results on a CD-ROM versus a DISK volume.

Additional reference words: dos 4.0 4.1 cdrom cd rom winmm

Copyright Microsoft Corporation 1993.