📄 mmsystem.h
字号:
DWORD dwUser; /* for client's use */
DWORD dwFlags; /* assorted flags (see defines) */
struct midihdr_tag far *lpNext; /* reserved for driver */
DWORD reserved; /* reserved for driver */
} MIDIHDR;
typedef MIDIHDR *PMIDIHDR;
typedef MIDIHDR NEAR *NPMIDIHDR;
typedef MIDIHDR FAR *LPMIDIHDR;
/* flags for dwFlags field of MIDIHDR structure */
#define MHDR_DONE 0x00000001 /* done bit */
#define MHDR_PREPARED 0x00000002 /* set if header prepared */
#define MHDR_INQUEUE 0x00000004 /* reserved for driver */
/* MIDI function prototypes */
UINT WINAPI midiOutGetNumDevs(void);
UINT WINAPI midiOutGetDevCaps(UINT uDeviceID,
MIDIOUTCAPS FAR* lpCaps, UINT uSize);
UINT WINAPI midiOutGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume);
UINT WINAPI midiOutSetVolume(UINT uDeviceID, DWORD dwVolume);
UINT WINAPI midiOutGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
UINT WINAPI midiOutOpen(HMIDIOUT FAR* lphMidiOut, UINT uDeviceID,
DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
UINT WINAPI midiOutClose(HMIDIOUT hMidiOut);
UINT WINAPI midiOutPrepareHeader(HMIDIOUT hMidiOut,
MIDIHDR FAR* lpMidiOutHdr, UINT uSize);
UINT WINAPI midiOutUnprepareHeader(HMIDIOUT hMidiOut,
MIDIHDR FAR* lpMidiOutHdr, UINT uSize);
UINT WINAPI midiOutShortMsg(HMIDIOUT hMidiOut, DWORD dwMsg);
UINT WINAPI midiOutLongMsg(HMIDIOUT hMidiOut,
MIDIHDR FAR* lpMidiOutHdr, UINT uSize);
UINT WINAPI midiOutReset(HMIDIOUT hMidiOut);
UINT WINAPI midiOutCachePatches(HMIDIOUT hMidiOut,
UINT uBank, WORD FAR* lpwPatchArray, UINT uFlags);
UINT WINAPI midiOutCacheDrumPatches(HMIDIOUT hMidiOut,
UINT uPatch, WORD FAR* lpwKeyArray, UINT uFlags);
UINT WINAPI midiOutGetID(HMIDIOUT hMidiOut, UINT FAR* lpuDeviceID);
#if defined(WINVER) && (WINVER >= 0x030a)
DWORD WINAPI midiOutMessage(HMIDIOUT hMidiOut, UINT uMessage, DWORD dw1, DWORD dw2);
#endif /* WINVER >= 0x030a */
UINT WINAPI midiInGetNumDevs(void);
UINT WINAPI midiInGetDevCaps(UINT uDeviceID,
LPMIDIINCAPS lpCaps, UINT uSize);
UINT WINAPI midiInGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
UINT WINAPI midiInOpen(HMIDIIN FAR* lphMidiIn, UINT uDeviceID,
DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
UINT WINAPI midiInClose(HMIDIIN hMidiIn);
UINT WINAPI midiInPrepareHeader(HMIDIIN hMidiIn,
MIDIHDR FAR* lpMidiInHdr, UINT uSize);
UINT WINAPI midiInUnprepareHeader(HMIDIIN hMidiIn,
MIDIHDR FAR* lpMidiInHdr, UINT uSize);
UINT WINAPI midiInAddBuffer(HMIDIIN hMidiIn,
MIDIHDR FAR* lpMidiInHdr, UINT uSize);
UINT WINAPI midiInStart(HMIDIIN hMidiIn);
UINT WINAPI midiInStop(HMIDIIN hMidiIn);
UINT WINAPI midiInReset(HMIDIIN hMidiIn);
UINT WINAPI midiInGetID(HMIDIIN hMidiIn, UINT FAR* lpuDeviceID);
#if defined(WINVER) && (WINVER >= 0x030a)
DWORD WINAPI midiInMessage(HMIDIIN hMidiIn, UINT uMessage, DWORD dw1, DWORD dw2);
#endif /* WINVER >= 0x030a */
#endif /* ifndef MMNOMIDI */
#ifndef MMNOAUX
/****************************************************************************
Auxiliary audio support
****************************************************************************/
/* device ID for aux device mapper */
#define AUX_MAPPER (-1)
/* Auxiliary audio device capabilities structure */
typedef struct auxcaps_tag {
UINT wMid; /* manufacturer ID */
UINT wPid; /* product ID */
VERSION vDriverVersion; /* version of the driver */
char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
UINT wTechnology; /* type of device */
DWORD dwSupport; /* functionality supported by driver */
} AUXCAPS;
typedef AUXCAPS *PAUXCAPS;
typedef AUXCAPS NEAR *NPAUXCAPS;
typedef AUXCAPS FAR *LPAUXCAPS;
/* flags for wTechnology field in AUXCAPS structure */
#define AUXCAPS_CDAUDIO 1 /* audio from internal CD-ROM drive */
#define AUXCAPS_AUXIN 2 /* audio from auxiliary input jacks */
/* flags for dwSupport field in AUXCAPS structure */
#define AUXCAPS_VOLUME 0x0001 /* supports volume control */
#define AUXCAPS_LRVOLUME 0x0002 /* separate left-right volume control */
/* auxiliary audio function prototypes */
UINT WINAPI auxGetNumDevs(void);
UINT WINAPI auxGetDevCaps(UINT uDeviceID, AUXCAPS FAR* lpCaps, UINT uSize);
UINT WINAPI auxSetVolume(UINT uDeviceID, DWORD dwVolume);
UINT WINAPI auxGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume);
#if defined(WINVER) && (WINVER >= 0x030a)
DWORD WINAPI auxOutMessage(UINT uDeviceID, UINT uMessage, DWORD dw1, DWORD dw2);
#endif /* WINVER >= 0x030a */
#endif /* ifndef MMNOAUX */
#ifndef MMNOTIMER
/****************************************************************************
Timer support
****************************************************************************/
/* timer error return values */
#define TIMERR_NOERROR (0) /* no error */
#define TIMERR_NOCANDO (TIMERR_BASE+1) /* request not completed */
#define TIMERR_STRUCT (TIMERR_BASE+33) /* time struct size */
/* timer data types */
typedef void (CALLBACK TIMECALLBACK) (UINT uTimerID, UINT uMessage, DWORD dwUser, DWORD dw1, DWORD dw2);
typedef TIMECALLBACK FAR *LPTIMECALLBACK;
/* flags for wFlags parameter of timeSetEvent() function */
#define TIME_ONESHOT 0 /* program timer for single event */
#define TIME_PERIODIC 1 /* program for continuous periodic event */
/* timer device capabilities data structure */
typedef struct timecaps_tag {
UINT wPeriodMin; /* minimum period supported */
UINT wPeriodMax; /* maximum period supported */
} TIMECAPS;
typedef TIMECAPS *PTIMECAPS;
typedef TIMECAPS NEAR *NPTIMECAPS;
typedef TIMECAPS FAR *LPTIMECAPS;
/* timer function prototypes */
UINT WINAPI timeGetSystemTime(MMTIME FAR* lpTime, UINT uSize);
DWORD WINAPI timeGetTime(void);
UINT WINAPI timeSetEvent(UINT uDelay, UINT uResolution,
LPTIMECALLBACK lpFunction, DWORD dwUser, UINT uFlags);
UINT WINAPI timeKillEvent(UINT uTimerID);
UINT WINAPI timeGetDevCaps(TIMECAPS FAR* lpTimeCaps, UINT uSize);
UINT WINAPI timeBeginPeriod(UINT uPeriod);
UINT WINAPI timeEndPeriod(UINT uPeriod);
#endif /* ifndef MMNOTIMER */
#ifndef MMNOJOY
/****************************************************************************
Joystick support
****************************************************************************/
/* joystick error return values */
#define JOYERR_NOERROR (0) /* no error */
#define JOYERR_PARMS (JOYERR_BASE+5) /* bad parameters */
#define JOYERR_NOCANDO (JOYERR_BASE+6) /* request not completed */
#define JOYERR_UNPLUGGED (JOYERR_BASE+7) /* joystick is unplugged */
/* constants used with JOYINFO structure and MM_JOY* messages */
#define JOY_BUTTON1 0x0001
#define JOY_BUTTON2 0x0002
#define JOY_BUTTON3 0x0004
#define JOY_BUTTON4 0x0008
#define JOY_BUTTON1CHG 0x0100
#define JOY_BUTTON2CHG 0x0200
#define JOY_BUTTON3CHG 0x0400
#define JOY_BUTTON4CHG 0x0800
/* joystick ID constants */
#define JOYSTICKID1 0
#define JOYSTICKID2 1
/* joystick device capabilities data structure */
typedef struct joycaps_tag {
UINT wMid; /* manufacturer ID */
UINT wPid; /* product ID */
char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
UINT wXmin; /* minimum x position value */
UINT wXmax; /* maximum x position value */
UINT wYmin; /* minimum y position value */
UINT wYmax; /* maximum y position value */
UINT wZmin; /* minimum z position value */
UINT wZmax; /* maximum z position value */
UINT wNumButtons; /* number of buttons */
UINT wPeriodMin; /* minimum message period when captured */
UINT wPeriodMax; /* maximum message period when captured */
} JOYCAPS;
typedef JOYCAPS *PJOYCAPS;
typedef JOYCAPS NEAR *NPJOYCAPS;
typedef JOYCAPS FAR *LPJOYCAPS;
/* joystick information data structure */
typedef struct joyinfo_tag {
UINT wXpos; /* x position */
UINT wYpos; /* y position */
UINT wZpos; /* z position */
UINT wButtons; /* button states */
} JOYINFO;
typedef JOYINFO *PJOYINFO;
typedef JOYINFO NEAR *NPJOYINFO;
typedef JOYINFO FAR *LPJOYINFO;
/* joystick function prototypes */
UINT WINAPI joyGetDevCaps(UINT uJoyID, JOYCAPS FAR* lpCaps, UINT uSize);
UINT WINAPI joyGetNumDevs(void);
UINT WINAPI joyGetPos(UINT uJoyID, JOYINFO FAR* lpInfo);
UINT WINAPI joyGetThreshold(UINT uJoyID, UINT FAR* lpuThreshold);
UINT WINAPI joyReleaseCapture(UINT uJoyID);
UINT WINAPI joySetCapture(HWND hwnd, UINT uJoyID, UINT uPeriod,
BOOL bChanged);
UINT WINAPI joySetThreshold(UINT uJoyID, UINT uThreshold);
#endif /* ifndef MMNOJOY */
#ifndef MMNOMMIO
/****************************************************************************
Multimedia File I/O support
****************************************************************************/
/* MMIO error return values */
#define MMIOERR_BASE 256
#define MMIOERR_FILENOTFOUND (MMIOERR_BASE + 1) /* file not found */
#define MMIOERR_OUTOFMEMORY (MMIOERR_BASE + 2) /* out of memory */
#define MMIOERR_CANNOTOPEN (MMIOERR_BASE + 3) /* cannot open */
#define MMIOERR_CANNOTCLOSE (MMIOERR_BASE + 4) /* cannot close */
#define MMIOERR_CANNOTREAD (MMIOERR_BASE + 5) /* cannot read */
#define MMIOERR_CANNOTWRITE (MMIOERR_BASE + 6) /* cannot write */
#define MMIOERR_CANNOTSEEK (MMIOERR_BASE + 7) /* cannot seek */
#define MMIOERR_CANNOTEXPAND (MMIOERR_BASE + 8) /* cannot expand file */
#define MMIOERR_CHUNKNOTFOUND (MMIOERR_BASE + 9) /* chunk not found */
#define MMIOERR_UNBUFFERED (MMIOERR_BASE + 10) /* file is unbuffered */
/* MMIO constants */
#define CFSEPCHAR '+' /* compound file name separator char. */
/* MMIO data types */
typedef DWORD FOURCC; /* a four character code */
typedef char _huge * HPSTR; /* a huge version of LPSTR */
DECLARE_HANDLE(HMMIO); /* a handle to an open file */
typedef LRESULT (CALLBACK MMIOPROC)(LPSTR lpmmioinfo, UINT uMessage,
LPARAM lParam1, LPARAM lParam2);
typedef MMIOPROC FAR *LPMMIOPROC;
/* general MMIO information data structure */
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;
typedef MMIOINFO *PMMIOINFO;
typedef MMIOINFO NEAR *NPMMIOINFO;
typedef MMIOINFO FAR *LPMMIOINFO;
/* RIFF chunk information data structure */
typedef struct _MMCKINFO
{
FOURCC ckid; /* chunk ID */
DWORD cksize; /* chunk size */
FOURCC fccType; /* form type or list type */
DWORD dwDataOffset; /* offset of data portion of chunk */
DWORD dwFlags; /* flags used by MMIO functions */
} MMCKINFO;
typedef MMCKINFO *PMMCKINFO;
typedef MMCKINFO NEAR *NPMMCKINFO;
typedef MMCKINFO FAR *LPMMCKINFO;
/* bit field masks */
#define MMIO_RWMODE 0x00000003 /* open file for reading/writing/both */
#define MMIO_SHAREMODE 0x00000070 /* file sharing mode number */
/* constants for dwFlags field of MMIOINFO */
#define MMIO_CREATE 0x00001000 /* create new file (or truncate file) */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -