as defined in the current windows.inc file:
MMIOINFO STRUCT
dwFlags DWORD ?
fccIOProc DWORD ?
pIOProc DWORD ?
wErrorRet DWORD ?
htask DWORD ?
cchBuffer DWORD ?
pchBuffer DWORD ?
pchNext DWORD ?
pchEndRead DWORD ?
pchEndWrite DWORD ?
lBufOffset DWORD ?
lDiskOffset DWORD ?
adwInfo DWORD 3 dup(?)
dwReserved1 DWORD ?
dwReserved2 DWORD ?
hmmio DWORD ?
MMIOINFO ENDS
as defined on MSDN:
typedef struct {
DWORD dwFlags;
FOURCC fccIOProc;
LPMMIOPROC pIOProc;
UINT wErrorRet;
HTASK hTask;
LONG cchBuffer;
HPSTR pchBuffer;
HPSTR pchNext;
HPSTR pchEndRead;
HPSTR pchEndWrite;
LONG lBufOffset;
LONG lDiskOffset;
DWORD adwInfo[4];
DWORD dwReserved1;
DWORD dwReserved2;
HMMIO hmmio;
} MMIOINFO;
notice the difference in size of the adwInfo array member
mmSystem.h:
typedef struct _MMIOINFO
{
/* general fields */
DWORD dwFlags; /* general status flags */
FOURCC fccIOProc; /* pointer to I/O procedure */
LPMMIOPROC pIOProc; /* pointer to I/O procedure */
UINT wErrorRet; /* place for error to be returned */
HTASK htask; /* alternate local task */
/* fields maintained by MMIO functions during buffered I/O */
LONG cchBuffer; /* size of I/O buffer (or 0L) */
HPSTR pchBuffer; /* start of I/O buffer (or NULL) */
HPSTR pchNext; /* pointer to next byte to read/write */
HPSTR pchEndRead; /* pointer to last valid byte to read */
HPSTR pchEndWrite; /* pointer to last byte to write */
LONG lBufOffset; /* disk offset of start of buffer */
/* fields maintained by I/O procedure */
LONG lDiskOffset; /* disk offset of next read or write */
DWORD adwInfo[3]; /* data specific to type of MMIOPROC */
/* other fields maintained by MMIO */
DWORD dwReserved1; /* reserved for MMIO use */
DWORD dwReserved2; /* reserved for MMIO use */
HMMIO hmmio; /* handle to open file */
} MMIOINFO, *PMMIOINFO, NEAR *NPMMIOINFO, FAR *LPMMIOINFO;
typedef const MMIOINFO FAR *LPCMMIOINFO;
i see that
i find one other place where it is 4
http://winapi.freetechsecrets.com/mmedia/MMEDIAMMIOINFO.htm (http://winapi.freetechsecrets.com/mmedia/MMEDIAMMIOINFO.htm)
it should be easy enough to verify :P
this line is a little confusing, as well - lol
wErrorRet UINT ?
make up your mind - is it a word or a uint ? :P
the current windows.inc file seems to be correct
if mmioOpen had overwritten the last value, i would have crashed into Olly :P
however, i was expectiing to see the last member being set to the same value as the returned handle
that didn't happen - which is ok - it is used in some other way
This for the structure from the 2003 PSDK:
#include <windows.h>
int main(void)
{
MMIOINFO ioi;
printf("%d\n",sizeof(ioi));
printf("%d\n\n",sizeof(ioi.adwInfo));
getch();
return 0;
}
72
12
And for Win16 the wErrorRet member was an unsigned 16-bit integer.