Question

As we know VC's WriteFile() writes data to the specified I/O device in OS(see WriteFile)

I want to know if there is such an api in pure dos for this purpose ? (Using Watcom C...)

Then I found _dos_write() in watcom c library reference page 197(see _dos_write()) and it uses system call 0x40 to write count bytes of data from the buffer pointed to by buffer to the file specified by handle

The count is unsigned type and this means the max file count will be 65535.

My question is: is there any other api which can transfer more than 65536 bytes "once" (like WriteFile() does) in pure DOS ?

P.s. It is NOT about the command prompt in Windows!

Était-ce utile?

La solution

65535 bytes is only the limit of how many bytes we can write/read in one time with one call. If the file is not closed, then simple call the write/read again with an other location in the ram, then the filecounter will be move to the next 65535 bytes of the file. Like Jerry Coffin said, we just have to use mutiple calls before we close the file with filehandle.

Dirk

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top