The information in this article applies to:
SYMPTOMSOpen a floppy drive with CreateFile():
Use SetFilePointer() to advance the file pointer associated with the file
handle returned from CreateFile():
If the offset is not a multiple of the sector size of the floppy drive, the
function will return success; however, the pointer will not be exactly
where requested. The pointer value is rounded down to the beginning of the
sector that the pointer value is in.
CAUSE
The behavior of this application programming interface (API) is by design
for the following reasons:
RESOLUTIONWhen using SetFilePointer() with a handle that represents a floppy drive, the offset must be a multiple of the sector size for the floppy drive in order for the function to perform as expected. MORE INFORMATION
Think of a file pointer as merely a stored value, which is where the next
read or write will take place. In fact, it is possible to override this
value on either the read or write itself, using certain APIs, by supplying
a different location. The new pointer location is remembered after the
operation. Therefore, the operation of "setting a file pointer" merely
means to go store a large integer in a cell in the system's data
structures, for possible use in the next file operation. In the case of a
handle to a device, the file pointer must be on a sector boundary.
Additional query words: 3.10 ntddkstorage
Keywords : kbAPI kbFileIO kbKernBase kbDSupport kbGrpKernBase |
Last Reviewed: December 29, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |