|
|
|
1 |
|
|
2 |
|
/*========================================================================== |
3 |
|
* |
4 |
|
* mmsystem.h -- Include file for Multimedia API's |
5 |
|
* |
6 |
|
* Version 4.00 |
7 |
|
* |
8 |
|
* Copyright (C) 1992-1998 Microsoft Corporation. All Rights Reserved. |
9 |
|
* |
10 |
|
*-------------------------------------------------------------------------- |
11 |
|
* |
12 |
|
* Define: Prevent inclusion of: |
13 |
|
* -------------- -------------------------------------------------------- |
14 |
|
* MMNODRV Installable driver support |
15 |
|
* MMNOSOUND Sound support |
16 |
|
* MMNOWAVE Waveform support |
17 |
|
* MMNOMIDI MIDI support |
18 |
|
* MMNOAUX Auxiliary audio support |
19 |
|
* MMNOMIXER Mixer support |
20 |
|
* MMNOTIMER Timer support |
21 |
|
* MMNOJOY Joystick support |
22 |
|
* MMNOMCI MCI support |
23 |
|
* MMNOMMIO Multimedia file I/O support |
24 |
|
* MMNOMMSYSTEM General MMSYSTEM functions |
25 |
|
* |
26 |
|
*========================================================================== |
27 |
|
*/ |
28 |
|
|
29 |
|
#ifndef _INC_MMSYSTEM |
30 |
|
#define _INC_MMSYSTEM /* #defined if mmsystem.h has been included */ |
31 |
|
|
32 |
|
|
33 |
|
#ifdef _WIN32 |
34 |
|
#include <pshpack1.h> |
35 |
|
#else |
36 |
|
#ifndef RC_INVOKED |
37 |
|
#pragma pack(1) |
38 |
|
#endif |
39 |
|
#endif |
40 |
|
|
41 |
|
#ifdef __cplusplus |
42 |
|
extern "C" { /* Assume C declarations for C++ */ |
43 |
|
#endif /* __cplusplus */ |
44 |
|
|
45 |
|
#ifdef _WIN32 |
46 |
|
#ifndef _WINMM_ |
47 |
|
#define WINMMAPI DECLSPEC_IMPORT |
48 |
|
#else |
49 |
|
#define WINMMAPI |
50 |
|
#endif |
2656 |
|
#define MMIO_READWRITE 0x00000002 /* open file for reading and writing */ |
2657 |
|
|
2658 |
|
/* share mode numbers (bit field MMIO_SHAREMODE) */ |
2659 |
|
#define MMIO_COMPAT 0x00000000 /* compatibility mode */ |
2660 |
|
#define MMIO_EXCLUSIVE 0x00000010 /* exclusive-access mode */ |
2661 |
|
#define MMIO_DENYWRITE 0x00000020 /* deny writing to other processes */ |
2662 |
|
#define MMIO_DENYREAD 0x00000030 /* deny reading to other processes */ |
2663 |
|
#define MMIO_DENYNONE 0x00000040 /* deny nothing to other processes */ |
2664 |
|
|
2665 |
|
/* various MMIO flags */ |
2666 |
|
#define MMIO_FHOPEN 0x0010 /* mmioClose: keep file handle open */ |
2667 |
|
#define MMIO_EMPTYBUF 0x0010 /* mmioFlush: empty the I/O buffer */ |
2668 |
|
#define MMIO_TOUPPER 0x0010 /* mmioStringToFOURCC: to u-case */ |
2669 |
|
#define MMIO_INSTALLPROC 0x00010000 /* mmioInstallIOProc: install MMIOProc */ |
2670 |
|
#define MMIO_GLOBALPROC 0x10000000 /* mmioInstallIOProc: install globally */ |
2671 |
|
#define MMIO_REMOVEPROC 0x00020000 /* mmioInstallIOProc: remove MMIOProc */ |
2672 |
|
#define MMIO_UNICODEPROC 0x01000000 /* mmioInstallIOProc: Unicode MMIOProc */ |
2673 |
|
#define MMIO_FINDPROC 0x00040000 /* mmioInstallIOProc: find an MMIOProc */ |
2674 |
|
#define MMIO_FINDCHUNK 0x0010 /* mmioDescend: find a chunk by ID */ |
2675 |
|
#define MMIO_FINDRIFF 0x0020 /* mmioDescend: find a LIST chunk */ |
2676 |
|
#define MMIO_FINDLIST 0x0040 /* mmioDescend: find a RIFF chunk */ |
2677 |
|
#define MMIO_CREATERIFF 0x0020 /* mmioCreateChunk: make a LIST chunk */ |
2678 |
|
#define MMIO_CREATELIST 0x0040 /* mmioCreateChunk: make a RIFF chunk */ |
2679 |
|
|
2680 |
|
|
2681 |
|
/* message numbers for MMIOPROC I/O procedure functions */ |
2682 |
|
#define MMIOM_READ MMIO_READ /* read */ |
2683 |
|
#define MMIOM_WRITE MMIO_WRITE /* write */ |
2684 |
|
#define MMIOM_SEEK 2 /* seek to a new position in file */ |
2685 |
|
#define MMIOM_OPEN 3 /* open file */ |
2686 |
|
#define MMIOM_CLOSE 4 /* close file */ |
2687 |
|
#define MMIOM_WRITEFLUSH 5 /* write and flush */ |
2688 |
|
|
2689 |
|
#if (WINVER >= 0x030a) |
2690 |
|
#define MMIOM_RENAME 6 /* rename specified file */ |
2691 |
|
#endif /* ifdef WINVER >= 0x030a */ |
2692 |
|
|
2693 |
|
#define MMIOM_USER 0x8000 /* beginning of user-defined messages */ |
2694 |
|
|
2695 |
|
/* standard four character codes */ |
2696 |
|
#define FOURCC_RIFF mmioFOURCC('R', 'I', 'F', 'F') |
2697 |
|
#define FOURCC_LIST mmioFOURCC('L', 'I', 'S', 'T') |
2698 |
|
|
2699 |
|
/* four character codes used to identify standard built-in I/O procedures */ |
2700 |
|
#define FOURCC_DOS mmioFOURCC('D', 'O', 'S', ' ') |
2701 |
|
#define FOURCC_MEM mmioFOURCC('M', 'E', 'M', ' ') |
2702 |
|
|
2703 |
|
/* flags for mmioSeek() */ |
2704 |
|
#ifndef SEEK_SET |
2705 |
|
#define SEEK_SET 0 /* seek to an absolute position */ |
2706 |
|
#define SEEK_CUR 1 /* seek relative to current position */ |
2707 |
|
#define SEEK_END 2 /* seek relative to end of file */ |
2708 |
|
#endif /* ifndef SEEK_SET */ |
2709 |
|
|
2710 |
|
/* other constants */ |
2711 |
|
#define MMIO_DEFAULTBUFFER 8192 /* default buffer size */ |
2712 |
|
|
2713 |
|
/* MMIO macros */ |
2714 |
|
#define mmioFOURCC(ch0, ch1, ch2, ch3) MAKEFOURCC(ch0, ch1, ch2, ch3) |
2715 |
|
|
2716 |
|
/* MMIO function prototypes */ |
2717 |
|
#ifdef _WIN32 |
2718 |
|
|
2719 |
|
WINMMAPI FOURCC WINAPI mmioStringToFOURCCA( LPCSTR sz, __in UINT uFlags); |
2720 |
|
WINMMAPI FOURCC WINAPI mmioStringToFOURCCW( LPCWSTR sz, __in UINT uFlags); |
2721 |
|
#ifdef UNICODE |
2722 |
|
#define mmioStringToFOURCC mmioStringToFOURCCW |
2723 |
|
#else |
2724 |
|
#define mmioStringToFOURCC mmioStringToFOURCCA |
2725 |
|
#endif // !UNICODE |
2726 |
|
WINMMAPI LPMMIOPROC WINAPI mmioInstallIOProcA( __in FOURCC fccIOProc, __in_opt LPMMIOPROC pIOProc, __in DWORD dwFlags); |
2727 |
|
WINMMAPI LPMMIOPROC WINAPI mmioInstallIOProcW( __in FOURCC fccIOProc, __in_opt LPMMIOPROC pIOProc, __in DWORD dwFlags); |
2728 |
|
#ifdef UNICODE |
2729 |
|
#define mmioInstallIOProc mmioInstallIOProcW |
2730 |
|
#else |
2731 |
|
#define mmioInstallIOProc mmioInstallIOProcA |
2732 |
|
#endif // !UNICODE |
2733 |
|
WINMMAPI HMMIO WINAPI mmioOpenA( __inout_bcount_opt(128) LPSTR pszFileName, __inout_opt LPMMIOINFO pmmioinfo, __in DWORD fdwOpen); |
2734 |
|
WINMMAPI HMMIO WINAPI mmioOpenW( __inout_bcount_opt(128) LPWSTR pszFileName, __inout_opt LPMMIOINFO pmmioinfo, __in DWORD fdwOpen); |
2735 |
|
#ifdef UNICODE |
2736 |
|
#define mmioOpen mmioOpenW |
2737 |
|
#else |
2738 |
|
#define mmioOpen mmioOpenA |
2739 |
|
#endif // !UNICODE |
2740 |
|
WINMMAPI MMRESULT WINAPI mmioRenameA( __in LPCSTR pszFileName, __in LPCSTR pszNewFileName, __in_opt LPCMMIOINFO pmmioinfo, __in DWORD fdwRename); |
2741 |
|
WINMMAPI MMRESULT WINAPI mmioRenameW( __in LPCWSTR pszFileName, __in LPCWSTR pszNewFileName, __in_opt LPCMMIOINFO pmmioinfo, __in DWORD fdwRename); |
2742 |
|
#ifdef UNICODE |
2743 |
|
#define mmioRename mmioRenameW |
2744 |
|
#else |
2745 |
|
#define mmioRename mmioRenameA |
2746 |
|
#endif // !UNICODE |
2747 |
|
#else |
2748 |
|
FOURCC WINAPI mmioStringToFOURCC( LPCSTR sz, UINT uFlags); |
2749 |
|
LPMMIOPROC WINAPI mmioInstallIOProc( FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags); |
2750 |
|
HMMIO WINAPI mmioOpen(__inout_opt LPSTR pszFileName, LPMMIOINFO pmmioinfo, DWORD fdwOpen); |
2751 |
|
#if (WINVER >= 0x030a) |
2752 |
|
MMRESULT WINAPI mmioRename( __in LPCSTR pszFileName, __in LPCSTR pszNewFileName, __in_opt const MMIOINFO FAR* pmmioinfo, __in DWORD fdwRename); |
2753 |
|
#endif /* ifdef WINVER >= 0x030a */ |
2754 |
|
#endif |
2755 |
|
|
2756 |
|
WINMMAPI MMRESULT WINAPI mmioClose( __in HMMIO hmmio, __in UINT fuClose); |
2757 |
|
WINMMAPI LONG WINAPI mmioRead( __in HMMIO hmmio, __out_bcount(cch) HPSTR pch, __in LONG cch); |