The information in this article applies to:
SYMPTOMSIn the following code, assuming that drive E corresponds to a CD-ROM drive, SetCurrentDirectory() always fails to set the current directory to the root directory on the CD-ROM drive. Instead the current directory remains unchanged:
CAUSESetCurrentDirectory() calls the MS-DOS Interrupt 21h, function 0x4300 to get the file attributes of the specified drive to check whether the specified parameter is a directory. This MS-DOS call always fails if you try to get the attributes of the root directory on a CD-ROM drive, and therefore SetCurrentDirectory() also fails on the root directory of a CD- ROM drive. STATUSMicrosoft is aware of this problem with SetCurrentDirectory() in Win32s. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. RESOLUTIONAs a workaround for the problem with SetCurrentDirectory(), thunk to the 16- bit environment and utilize MS-DOS functions from a 16-bit DLL. For example, you can use Interrupt 21h, function 0x0E (Set Default Drive) followed by Interrupt 21h, function 0x3Bh (Change Current Directory). MORE INFORMATION
Note that SetCurrentDirectory() fails only on the root directory of a CD-
ROM drive. If you pass any directory path other than the root directory to
SetCurrentDirectory(), it will work properly.
Additional query words: 1.00 1.10 1.20 win32s
Keywords : |
Last Reviewed: January 18, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |