mmioRead function (mmiscapi.h)

The mmioRead function reads a specified number of bytes from a file opened by using the mmioOpen function.


LONG mmioRead(
  HMMIO hmmio,
  HPSTR pch,
  LONG  cch



File handle of the file to be read.


Pointer to a buffer to contain the data read from the file.


Number of bytes to read from the file.

Return value

Returns the number of bytes actually read. If the end of the file has been reached and no more bytes can be read, the return value is 0. If there is an error reading from the file, the return value is –1.


Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header mmiscapi.h (include Mmiscapi.h, Windows.h)
Library Winmm.lib
DLL Winmm.dll