回复 3楼 debroa723
mmsystem.h的内容如下,红色的是指向的错误行。
====================================================================
/*==========================================================================
*
* mmsystem.h -- Include file for Multimedia API's
*
* Version 4.00
*
* Copyright 1992 - 1998 Microsoft Corporation. All Rights Reserved.
*
*--------------------------------------------------------------------------
*
* Define: Prevent inclusion of:
* -------------- --------------------------------------------------------
* MMNODRV Installable driver support
* MMNOSOUND Sound support
* MMNOWAVE Waveform support
* MMNOMIDI MIDI support
* MMNOAUX Auxiliary audio support
* MMNOMIXER Mixer support
* MMNOTIMER Timer support
* MMNOJOY Joystick support
* MMNOMCI MCI support
* MMNOMMIO Multimedia file I/O support
* MMNOMMSYSTEM General MMSYSTEM functions
*
*==========================================================================
*/
#ifndef _INC_MMSYSTEM
#define _INC_MMSYSTEM /* #defined if mmsystem.h has been included */
#ifdef _WIN32
#include <pshpack1.h>
#else
#ifndef RC_INVOKED
#pragma pack(1)
#endif
#endif
#ifdef __cplusplus
extern "C" { /* Assume C declarations for C++ */
#endif /* __cplusplus */
#ifdef _WIN32
#ifndef _WINMM_
#define WINMMAPI DECLSPEC_IMPORT
#else
#define WINMMAPI
#endif
#define _loadds
#define _huge
#else
#define WINMMAPI
#endif
#ifdef _WIN32_VXD
#define NEAR
#define FAR
#define DECLARE_HANDLE(x) typedef WORD x
#define WINAPI
typedef DWORD LPSTR;
typedef DWORD LPVOID;
typedef DWORD LPCSTR;
typedef DWORD LPCWSTR;
typedef DWORD LRESULT;
typedef DWORD LPARAM;
typedef DWORD WPARAM;
typedef short WCHAR;
#endif
/****************************************************************************
General constants and data types
****************************************************************************/
/* general constants */
#define MAXPNAMELEN 32 /* max product name length (including NULL) */
#define MAXERRORLENGTH 256 /* max error text length (including NULL) */
#define MAX_JOYSTICKOEMVXDNAME 260 /* max oem vxd name length (including NULL) */
/*
* Microsoft Manufacturer and Product ID's (these have been moved to
* MMREG.H for Windows 4.00 and above).
*/
#if (WINVER <= 0x030A)
#ifndef MM_MICROSOFT
#define MM_MICROSOFT 1 /* Microsoft Corporation */
#endif
#ifndef MM_MIDI_MAPPER
#define MM_MIDI_MAPPER 1 /* MIDI Mapper */
#define MM_WAVE_MAPPER 2 /* Wave Mapper */
#define MM_SNDBLST_MIDIOUT 3 /* Sound Blaster MIDI output port */
#define MM_SNDBLST_MIDIIN 4 /* Sound Blaster MIDI input port */
#define MM_SNDBLST_SYNTH 5 /* Sound Blaster internal synthesizer */
#define MM_SNDBLST_WAVEOUT 6 /* Sound Blaster waveform output */
#define MM_SNDBLST_WAVEIN 7 /* Sound Blaster waveform input */
#define MM_ADLIB 9 /* Ad Lib-compatible synthesizer */
#define MM_MPU401_MIDIOUT 10 /* MPU401-compatible MIDI output port */
#define MM_MPU401_MIDIIN 11 /* MPU401-compatible MIDI input port */
#define MM_PC_JOYSTICK 12 /* Joystick adapter */
#endif
#endif
/* general data types */
#ifdef _WIN32
typedef UINT MMVERSION; /* major (high byte), minor (low byte) */
#else
typedef UINT VERSION; /* major (high byte), minor (low byte) */
#endif
typedef UINT MMRESULT; /* error return code, 0 means no error */
/* call as if(err=xxxx(...)) Error(err); else */
#define _MMRESULT_
typedef UINT FAR *LPUINT;
/* MMTIME data structure */
typedef struct mmtime_tag
{
UINT wType; /* indicates the contents of the union */
union
{
DWORD ms; /* milliseconds */
DWORD sample; /* samples */
DWORD cb; /* byte count */
DWORD ticks; /* ticks in MIDI stream */
/* SMPTE */
struct
{
BYTE hour; /* hours */
BYTE min; /* minutes */
BYTE sec; /* seconds */
BYTE frame; /* frames */
BYTE fps; /* frames per second */
BYTE dummy; /* pad */
#ifdef _WIN32
BYTE pad[2];
#endif
} smpte;
/* MIDI */
struct
{
DWORD songptrpos; /* song pointer position */
} midi;
} u;
} MMTIME, *PMMTIME, NEAR *NPMMTIME, FAR *LPMMTIME;
/* types for wType field in MMTIME struct */
#define TIME_MS 0x0001 /* time in milliseconds */
#define TIME_SAMPLES 0x0002 /* number of wave samples */
#define TIME_BYTES 0x0004 /* current byte offset */
#define TIME_SMPTE 0x0008 /* SMPTE time */
#define TIME_MIDI 0x0010 /* MIDI time */
#define TIME_TICKS 0x0020 /* Ticks within MIDI stream */
/*
*
*
*/
#define MAKEFOURCC(ch0, ch1, ch2, ch3) \
((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))