?? mmsystem.h
字號:
#define DRV_CLOSE 0x0004
#define DRV_DISABLE 0x0005
#define DRV_FREE 0x0006
#define DRV_CONFIGURE 0x0007
#define DRV_QUERYCONFIGURE 0x0008
#define DRV_INSTALL 0x0009
#define DRV_REMOVE 0x000A
#define DRV_EXITSESSION 0x000B
#define DRV_POWER 0x000F
#define DRV_RESERVED 0x0800
#define DRV_USER 0x4000
/* LPARAM of DRV_CONFIGURE message */
#ifdef _WIN32
typedef struct tagDRVCONFIGINFO {
DWORD dwDCISize;
LPCWSTR lpszDCISectionName;
LPCWSTR lpszDCIAliasName;
} DRVCONFIGINFO, *PDRVCONFIGINFO, NEAR *NPDRVCONFIGINFO, FAR *LPDRVCONFIGINFO;
#else
typedef struct tagDRVCONFIGINFO {
DWORD dwDCISize;
LPCSTR lpszDCISectionName;
LPCSTR lpszDCIAliasName;
} DRVCONFIGINFO, *PDRVCONFIGINFO, NEAR *NPDRVCONFIGINFO, FAR *LPDRVCONFIGINFO;
#endif
/* Supported return values for DRV_CONFIGURE message */
#define DRVCNF_CANCEL 0x0000
#define DRVCNF_OK 0x0001
#define DRVCNF_RESTART 0x0002
/* installable driver function prototypes */
#ifdef _WIN32
#ifndef _WIN32_VXD
typedef LRESULT (CALLBACK* DRIVERPROC)(DWORD, HDRVR, UINT, LPARAM, LPARAM);
WINMMAPI LRESULT WINAPI CloseDriver(HDRVR hDriver, LONG lParam1, LONG lParam2);
WINMMAPI HDRVR WINAPI OpenDriver(LPCWSTR szDriverName, LPCWSTR szSectionName, LONG lParam2);
WINMMAPI LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT message, LONG lParam1, LONG lParam2);
WINMMAPI HMODULE WINAPI DrvGetModuleHandle(HDRVR hDriver);
WINMMAPI HMODULE WINAPI GetDriverModuleHandle(HDRVR hDriver);
WINMMAPI LRESULT WINAPI DefDriverProc(DWORD dwDriverIdentifier, HDRVR hdrvr, UINT uMsg, LPARAM lParam1, LPARAM lParam2);
#endif /* ifndef _WIN32_VXD */
#else
LRESULT WINAPI DrvClose(HDRVR hdrvr, LPARAM lParam1, LPARAM lParam2);
HDRVR WINAPI DrvOpen(LPCSTR szDriverName, LPCSTR szSectionName, LPARAM lParam2);
LRESULT WINAPI DrvSendMessage(HDRVR hdrvr, UINT uMsg, LPARAM lParam1, LPARAM lParam2);
HINSTANCE WINAPI DrvGetModuleHandle(HDRVR hdrvr);
LRESULT WINAPI DrvDefDriverProc(DWORD dwDriverIdentifier, HDRVR hdrvr, UINT uMsg, LPARAM lParam1, LPARAM lParam2);
#define DefDriverProc DrvDefDriverProc
#endif /* ifdef _WIN32 */
#endif /* DRV_LOAD */
#endif /* ifdef (WINVER < 0x030a) || defined(_WIN32) */
#if (WINVER >= 0x030a)
/* return values from DriverProc() function */
#define DRV_CANCEL DRVCNF_CANCEL
#define DRV_OK DRVCNF_OK
#define DRV_RESTART DRVCNF_RESTART
#endif /* ifdef WINVER >= 0x030a */
#define DRV_MCI_FIRST DRV_RESERVED
#define DRV_MCI_LAST (DRV_RESERVED + 0xFFF)
#endif /* ifndef MMNODRV */
/****************************************************************************
Driver callback support
****************************************************************************/
/* flags used with waveOutOpen(), waveInOpen(), midiInOpen(), and */
/* midiOutOpen() to specify the type of the dwCallback parameter. */
#define CALLBACK_TYPEMASK 0x00070000l /* callback type mask */
#define CALLBACK_NULL 0x00000000l /* no callback */
#define CALLBACK_WINDOW 0x00010000l /* dwCallback is a HWND */
#define CALLBACK_TASK 0x00020000l /* dwCallback is a HTASK */
#define CALLBACK_FUNCTION 0x00030000l /* dwCallback is a FARPROC */
#ifdef _WIN32
#define CALLBACK_THREAD (CALLBACK_TASK)/* thread ID replaces 16 bit task */
#define CALLBACK_EVENT 0x00050000l /* dwCallback is an EVENT Handle */
#endif
#ifndef _WIN32_VXD
typedef void (CALLBACK DRVCALLBACK)(HDRVR hdrvr, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2);
typedef DRVCALLBACK FAR *LPDRVCALLBACK;
#ifdef _WIN32
typedef DRVCALLBACK *PDRVCALLBACK;
#endif
#endif /* ifndef _WIN32_VXD */
#ifndef MMNOMMSYSTEM
#ifndef _WIN32_VXD
/****************************************************************************
General MMSYSTEM support
****************************************************************************/
#if (WINVER <= 0x030A)
WINMMAPI UINT WINAPI mmsystemGetVersion(void);
#endif
#ifdef _WIN32
#define OutputDebugStr OutputDebugString
#else
void WINAPI OutputDebugStr(LPCSTR);
#endif
#endif /* ifndef _WIN32_VXD */
#endif /* ifndef MMNOMMSYSTEM */
#ifndef MMNOSOUND
#ifndef _WIN32_VXD
/****************************************************************************
Sound support
****************************************************************************/
#ifdef _WIN32
WINMMAPI BOOL WINAPI sndPlaySoundA(LPCSTR pszSound, UINT fuSound);
WINMMAPI BOOL WINAPI sndPlaySoundW(LPCWSTR pszSound, UINT fuSound);
#ifdef UNICODE
#define sndPlaySound sndPlaySoundW
#else
#define sndPlaySound sndPlaySoundA
#endif // !UNICODE
#else
BOOL WINAPI sndPlaySound(LPCSTR pszSound, UINT fuSound);
#endif
/*
* flag values for fuSound and fdwSound arguments on [snd]PlaySound
*/
#define SND_SYNC 0x0000 /* play synchronously (default) */
#define SND_ASYNC 0x0001 /* play asynchronously */
#define SND_NODEFAULT 0x0002 /* silence (!default) if sound not found */
#define SND_MEMORY 0x0004 /* pszSound points to a memory file */
#define SND_LOOP 0x0008 /* loop the sound until next sndPlaySound */
#define SND_NOSTOP 0x0010 /* don't stop any currently playing sound */
#define SND_NOWAIT 0x00002000L /* don't wait if the driver is busy */
#define SND_ALIAS 0x00010000L /* name is a registry alias */
#define SND_ALIAS_ID 0x00110000L /* alias is a predefined ID */
#define SND_FILENAME 0x00020000L /* name is file name */
#define SND_RESOURCE 0x00040004L /* name is resource name or atom */
#if(WINVER >= 0x0400)
#define SND_PURGE 0x0040 /* purge non-static events for task */
#define SND_APPLICATION 0x0080 /* look for application specific association */
#endif /* WINVER >= 0x0400 */
#define SND_ALIAS_START 0 /* alias base */
#ifdef _WIN32
#define sndAlias(ch0, ch1) (SND_ALIAS_START + (DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8))
#define SND_ALIAS_SYSTEMASTERISK sndAlias('S', '*')
#define SND_ALIAS_SYSTEMQUESTION sndAlias('S', '?')
#define SND_ALIAS_SYSTEMHAND sndAlias('S', 'H')
#define SND_ALIAS_SYSTEMEXIT sndAlias('S', 'E')
#define SND_ALIAS_SYSTEMSTART sndAlias('S', 'S')
#define SND_ALIAS_SYSTEMWELCOME sndAlias('S', 'W')
#define SND_ALIAS_SYSTEMEXCLAMATION sndAlias('S', '!')
#define SND_ALIAS_SYSTEMDEFAULT sndAlias('S', 'D')
WINMMAPI BOOL WINAPI PlaySoundA(LPCSTR pszSound, HMODULE hmod, DWORD fdwSound);
WINMMAPI BOOL WINAPI PlaySoundW(LPCWSTR pszSound, HMODULE hmod, DWORD fdwSound);
#ifdef UNICODE
#define PlaySound PlaySoundW
#else
#define PlaySound PlaySoundA
#endif // !UNICODE
#else
BOOL WINAPI PlaySound(LPCSTR pszSound, HMODULE hmod, DWORD fdwSound);
#endif
#endif /* ifndef _WIN32_VXD */
#endif /* ifndef MMNOSOUND */
#ifndef MMNOWAVE
/****************************************************************************
Waveform audio support
****************************************************************************/
/* waveform audio error return values */
#define WAVERR_BADFORMAT (WAVERR_BASE + 0) /* unsupported wave format */
#define WAVERR_STILLPLAYING (WAVERR_BASE + 1) /* still something playing */
#define WAVERR_UNPREPARED (WAVERR_BASE + 2) /* header not prepared */
#define WAVERR_SYNC (WAVERR_BASE + 3) /* device is synchronous */
#define WAVERR_LASTERROR (WAVERR_BASE + 3) /* last error in range */
/* waveform audio data types */
DECLARE_HANDLE(HWAVE);
DECLARE_HANDLE(HWAVEIN);
DECLARE_HANDLE(HWAVEOUT);
#ifndef _WIN32_VXD
typedef HWAVEIN FAR *LPHWAVEIN;
typedef HWAVEOUT FAR *LPHWAVEOUT;
typedef DRVCALLBACK WAVECALLBACK;
typedef WAVECALLBACK FAR *LPWAVECALLBACK;
#endif
/* wave callback messages */
#define WOM_OPEN MM_WOM_OPEN
#define WOM_CLOSE MM_WOM_CLOSE
#define WOM_DONE MM_WOM_DONE
#define WIM_OPEN MM_WIM_OPEN
#define WIM_CLOSE MM_WIM_CLOSE
#define WIM_DATA MM_WIM_DATA
/* device ID for wave device mapper */
#define WAVE_MAPPER ((UINT)-1)
/* flags for dwFlags parameter in waveOutOpen() and waveInOpen() */
#define WAVE_FORMAT_QUERY 0x0001
#define WAVE_ALLOWSYNC 0x0002
#if(WINVER >= 0x0400)
#define WAVE_MAPPED 0x0004
#define WAVE_FORMAT_DIRECT 0x0008
#define WAVE_FORMAT_DIRECT_QUERY (WAVE_FORMAT_QUERY | WAVE_FORMAT_DIRECT)
#endif /* WINVER >= 0x0400 */
/* wave data block header */
typedef struct wavehdr_tag {
LPSTR lpData; /* pointer to locked data buffer */
DWORD dwBufferLength; /* length of data buffer */
DWORD dwBytesRecorded; /* used for input only */
DWORD dwUser; /* for client's use */
DWORD dwFlags; /* assorted flags (see defines) */
DWORD dwLoops; /* loop control counter */
struct wavehdr_tag FAR *lpNext; /* reserved for driver */
DWORD reserved; /* reserved for driver */
} WAVEHDR, *PWAVEHDR, NEAR *NPWAVEHDR, FAR *LPWAVEHDR;
/* flags for dwFlags field of WAVEHDR */
#define WHDR_DONE 0x00000001 /* done bit */
#define WHDR_PREPARED 0x00000002 /* set if this header has been prepared */
#define WHDR_BEGINLOOP 0x00000004 /* loop start block */
#define WHDR_ENDLOOP 0x00000008 /* loop end block */
#define WHDR_INQUEUE 0x00000010 /* reserved for driver */
/* waveform output device capabilities structure */
#ifdef _WIN32
typedef struct tagWAVEOUTCAPSA {
WORD wMid; /* manufacturer ID */
WORD wPid; /* product ID */
MMVERSION vDriverVersion; /* version of the driver */
CHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
DWORD dwFormats; /* formats supported */
WORD wChannels; /* number of sources supported */
WORD wReserved1; /* packing */
DWORD dwSupport; /* functionality supported by driver */
} WAVEOUTCAPSA, *PWAVEOUTCAPSA, *NPWAVEOUTCAPSA, *LPWAVEOUTCAPSA;
typedef struct tagWAVEOUTCAPSW {
WORD wMid; /* manufacturer ID */
WORD wPid; /* product ID */
MMVERSION vDriverVersion; /* version of the driver */
WCHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
DWORD dwFormats; /* formats supported */
WORD wChannels; /* number of sources supported */
WORD wReserved1; /* packing */
DWORD dwSupport; /* functionality supported by driver */
} WAVEOUTCAPSW, *PWAVEOUTCAPSW, *NPWAVEOUTCAPSW, *LPWAVEOUTCAPSW;
#ifdef UNICODE
typedef WAVEOUTCAPSW WAVEOUTCAPS;
typedef PWAVEOUTCAPSW PWAVEOUTCAPS;
typedef NPWAVEOUTCAPSW NPWAVEOUTCAPS;
typedef LPWAVEOUTCAPSW LPWAVEOUTCAPS;
#else
typedef WAVEOUTCAPSA WAVEOUTCAPS;
typedef PWAVEOUTCAPSA PWAVEOUTCAPS;
typedef NPWAVEOUTCAPSA NPWAVEOUTCAPS;
typedef LPWAVEOUTCAPSA LPWAVEOUTCAPS;
#endif // UNICODE
#else
typedef struct waveoutcaps_tag {
WORD wMid; /* manufacturer ID */
WORD wPid; /* product ID */
VERSION vDriverVersion; /* version of the driver */
char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
DWORD dwFormats; /* formats supported */
WORD wChannels; /* number of sources supported */
DWORD dwSupport; /* functionality supported by driver */
} WAVEOUTCAPS, *PWAVEOUTCAPS, NEAR *NPWAVEOUTCAPS, FAR *LPWAVEOUTCAPS;
#endif
/* flags for dwSupport field of WAVEOUTCAPS */
#define WAVECAPS_PITCH 0x0001 /* supports pitch control */
#define WAVECAPS_PLAYBACKRATE 0x0002 /* supports playback rate control */
#define WAVECAPS_VOLUME 0x0004 /* supports volume control */
#define WAVECAPS_LRVOLUME 0x0008 /* separate left-right volume control */
#define WAVECAPS_SYNC 0x0010
#define WAVECAPS_SAMPLEACCURATE 0x0020
#define WAVECAPS_DIRECTSOUND 0x0040
/* waveform input device capabilities structure */
#ifdef _WIN32
typedef struct tagWAVEINCAPSA {
WORD wMid; /* manufacturer ID */
WORD wPid; /* product ID */
MMVERSION vDriverVersion; /* version of the driver */
CHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
DWORD dwFormats; /* formats supported */
WORD wChannels; /* number of channels supported */
WORD wReserved1; /* structure packing */
} WAVEINCAPSA, *PWAVEINCAPSA, *NPWAVEINCAPSA, *LPWAVEINCAPSA;
typedef struct tagWAVEINCAPSW {
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -