2024-03-09 15:07:52 -05:00
|
|
|
#ifndef MXIO_H
|
|
|
|
#define MXIO_H
|
2023-06-11 21:03:54 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
#include "mxtypes.h"
|
|
|
|
|
|
|
|
// mmsystem.h requires inclusion of windows.h before
|
|
|
|
// clang-format off
|
2023-06-27 22:04:07 -04:00
|
|
|
#include <windows.h>
|
2023-07-02 04:05:49 -04:00
|
|
|
#include <mmsystem.h>
|
2023-10-24 19:38:27 -04:00
|
|
|
// clang-format on
|
2023-06-27 22:04:07 -04:00
|
|
|
|
2024-06-25 11:56:30 -04:00
|
|
|
#if defined(_M_IX86) || defined(__i386__)
|
|
|
|
#define MXIO_MINFO_MFILE
|
|
|
|
#endif
|
|
|
|
|
2024-02-03 11:33:22 -05:00
|
|
|
// SIZE 0x48
|
2023-10-24 19:38:27 -04:00
|
|
|
class MXIOINFO {
|
2023-06-11 21:03:54 -04:00
|
|
|
public:
|
2023-10-24 19:38:27 -04:00
|
|
|
MXIOINFO();
|
2024-01-24 21:16:29 -05:00
|
|
|
~MXIOINFO();
|
2023-06-27 14:44:02 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
MxU16 Open(const char*, MxULong);
|
|
|
|
MxU16 Close(MxLong);
|
|
|
|
MxLong Read(void*, MxLong);
|
2024-04-26 04:57:10 -04:00
|
|
|
MxLong Write(void*, MxLong);
|
2023-11-22 02:54:08 -05:00
|
|
|
MxLong Seek(MxLong, MxLong);
|
2023-10-24 19:38:27 -04:00
|
|
|
MxU16 SetBuffer(char*, MxLong, MxLong);
|
|
|
|
MxU16 Flush(MxU16);
|
|
|
|
MxU16 Advance(MxU16);
|
|
|
|
MxU16 Descend(MMCKINFO*, const MMCKINFO*, MxU16);
|
2024-04-26 04:57:10 -04:00
|
|
|
MxU16 Ascend(MMCKINFO*, MxU16);
|
2023-06-27 14:44:02 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
// NOTE: In MXIOINFO, the `hmmio` member of MMIOINFO is used like
|
|
|
|
// an HFILE (int) instead of an HMMIO (WORD).
|
|
|
|
MMIOINFO m_info;
|
2024-06-25 11:56:30 -04:00
|
|
|
#ifndef MXIO_MINFO_MFILE
|
|
|
|
HFILE m_file;
|
|
|
|
#endif
|
2023-06-11 21:03:54 -04:00
|
|
|
};
|
|
|
|
|
2024-03-09 15:07:52 -05:00
|
|
|
#endif // MXIO_H
|