Seeking past the end of the file does not result in an error; mmioSeek will return the offset of the new file position. Be careful when seeking past the end of the file. To determine where the end of a file is, call mmioSeek with the lOffset parameter equal to 0 and the lOrigin parameter equal to SEEK_END.
Note: It is invalid to seek backwards (negative) from the beginning of the file.
In the case of a user-supplied memory (MEM) file, a SEEK_END will seek from the end of the buffer, which might be different from the actual end of the data.