1 /***********************************************************************\ 2 * msacm.d * 3 * * 4 * Windows API header module * 5 * * 6 * Translated from MinGW Windows headers * 7 * by Stewart Gordon * 8 * * 9 * Placed into public domain * 10 \***********************************************************************/ 11 module win32.msacm; 12 version(Windows): 13 14 private import win32.basetsd, win32.mmsystem, win32.windef; 15 16 mixin DECLARE_HANDLE!("HACMDRIVERID"); 17 mixin DECLARE_HANDLE!("HACMDRIVER"); 18 alias HACMDRIVER* LPHACMDRIVER; 19 20 /* Comment from MinGW 21 found through experimentation 22 */ 23 const size_t 24 ACMDRIVERDETAILS_SHORTNAME_CHARS = 32, 25 ACMDRIVERDETAILS_LONGNAME_CHARS = 128, 26 ACMDRIVERDETAILS_COPYRIGHT_CHARS = 80, 27 ACMDRIVERDETAILS_LICENSING_CHARS = 128; 28 29 /* Comment from MinGW 30 I don't know the right values for these macros 31 */ 32 const size_t 33 ACMFORMATDETAILS_FORMAT_CHARS = 256, 34 ACMFORMATTAGDETAILS_FORMATTAG_CHARS = 256, 35 ACMDRIVERDETAILS_FEATURES_CHARS = 256; 36 37 struct ACMFORMATDETAILSA { 38 DWORD cbStruct = ACMFORMATDETAILSA.sizeof; // are they? 39 DWORD dwFormatIndex; 40 DWORD dwFormatTag; 41 DWORD fdwSupport; 42 LPWAVEFORMATEX pwfx; 43 DWORD cbwfx; 44 char[ACMFORMATDETAILS_FORMAT_CHARS] szFormat; 45 } 46 alias ACMFORMATDETAILSA* LPACMFORMATDETAILSA; 47 48 struct ACMFORMATDETAILSW { 49 DWORD cbStruct = ACMFORMATDETAILSW.sizeof; 50 DWORD dwFormatIndex; 51 DWORD dwFormatTag; 52 DWORD fdwSupport; 53 LPWAVEFORMATEX pwfx; 54 DWORD cbwfx; 55 WCHAR[ACMFORMATDETAILS_FORMAT_CHARS] szFormat; 56 } 57 alias ACMFORMATDETAILSW* LPACMFORMATDETAILSW; 58 59 struct ACMFORMATTAGDETAILSA { 60 DWORD cbStruct = ACMFORMATTAGDETAILSA.sizeof; 61 DWORD dwFormatTagIndex; 62 DWORD dwFormatTag; 63 DWORD cbFormatSize; 64 DWORD fdwSupport; 65 DWORD cStandardFormats; 66 char[ACMFORMATTAGDETAILS_FORMATTAG_CHARS] szFormatTag; 67 } 68 alias ACMFORMATTAGDETAILSA* LPACMFORMATTAGDETAILSA; 69 70 struct ACMFORMATTAGDETAILSW { 71 DWORD cbStruct = ACMFORMATTAGDETAILSW.sizeof; 72 DWORD dwFormatTagIndex; 73 DWORD dwFormatTag; 74 DWORD cbFormatSize; 75 DWORD fdwSupport; 76 DWORD cStandardFormats; 77 WCHAR[ACMFORMATTAGDETAILS_FORMATTAG_CHARS] szFormatTag; 78 } 79 alias ACMFORMATTAGDETAILSW* LPACMFORMATTAGDETAILSW; 80 81 struct ACMDRIVERDETAILSA { 82 DWORD cbStruct = ACMDRIVERDETAILSA.sizeof; 83 FOURCC fccType; 84 FOURCC fccComp; 85 WORD wMid; 86 WORD wPid; 87 DWORD vdwACM; 88 DWORD vdwDriver; 89 DWORD fdwSupport; 90 DWORD cFormatTags; 91 DWORD cFilterTags; 92 HICON hicon; 93 char[ACMDRIVERDETAILS_SHORTNAME_CHARS] szShortName; 94 char[ACMDRIVERDETAILS_LONGNAME_CHARS] szLongName; 95 char[ACMDRIVERDETAILS_COPYRIGHT_CHARS] szCopyright; 96 char[ACMDRIVERDETAILS_LICENSING_CHARS] szLicensing; 97 char[ACMDRIVERDETAILS_FEATURES_CHARS] szFeatures; 98 } 99 alias ACMDRIVERDETAILSA* LPACMDRIVERDETAILSA; 100 101 struct ACMDRIVERDETAILSW { 102 DWORD cbStruct = ACMDRIVERDETAILSW.sizeof; 103 FOURCC fccType; 104 FOURCC fccComp; 105 WORD wMid; 106 WORD wPid; 107 DWORD vdwACM; 108 DWORD vdwDriver; 109 DWORD fdwSupport; 110 DWORD cFormatTags; 111 DWORD cFilterTags; 112 HICON hicon; 113 WCHAR[ACMDRIVERDETAILS_SHORTNAME_CHARS] szShortName; 114 WCHAR[ACMDRIVERDETAILS_LONGNAME_CHARS] szLongName; 115 WCHAR[ACMDRIVERDETAILS_COPYRIGHT_CHARS] szCopyright; 116 WCHAR[ACMDRIVERDETAILS_LICENSING_CHARS] szLicensing; 117 WCHAR[ACMDRIVERDETAILS_FEATURES_CHARS] szFeatures; 118 } 119 alias ACMDRIVERDETAILSW* LPACMDRIVERDETAILSW; 120 121 extern (Windows) { 122 alias BOOL function(HACMDRIVERID hadid, LPACMFORMATDETAILSA pafd, 123 DWORD_PTR dwInstance, DWORD fdwSupport) ACMFORMATENUMCBA; 124 alias BOOL function(HACMDRIVERID hadid, LPACMFORMATDETAILSW pafd, 125 DWORD_PTR dwInstance, DWORD fdwSupport) ACMFORMATENUMCBW; 126 alias BOOL function(HACMDRIVERID hadid, LPACMFORMATTAGDETAILSA paftd, 127 DWORD_PTR dwInstance, DWORD fdwSupport) ACMFORMATTAGENUMCBA; 128 alias BOOL function(HACMDRIVERID hadid, LPACMFORMATTAGDETAILSW paftd, 129 DWORD_PTR dwInstance, DWORD fdwSupport) ACMFORMATTAGENUMCBW; 130 alias BOOL function(HACMDRIVERID hadid, DWORD_PTR dwInstance, 131 DWORD fdwSupport) ACMDRIVERENUMCB; 132 133 MMRESULT acmDriverOpen(LPHACMDRIVER phad, HACMDRIVERID hadid, 134 DWORD fdwOpen); 135 MMRESULT acmDriverEnum(ACMDRIVERENUMCB fnCallback, DWORD_PTR dwInstance, 136 DWORD fdwEnum); 137 MMRESULT acmFormatEnumA(HACMDRIVER had, LPACMFORMATDETAILSA pafd, 138 ACMFORMATENUMCBA fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum); 139 MMRESULT acmFormatEnumW(HACMDRIVER had, LPACMFORMATDETAILSW pafd, 140 ACMFORMATENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum); 141 MMRESULT acmDriverClose(HACMDRIVER had, DWORD fdwClose); 142 MMRESULT acmDriverDetailsA(HACMDRIVERID hadid, LPACMDRIVERDETAILSA padd, 143 DWORD fdwDetails); 144 MMRESULT acmDriverDetailsW(HACMDRIVERID hadid, LPACMDRIVERDETAILSW padd, 145 DWORD fdwDetails); 146 MMRESULT acmFormatTagEnumA(HACMDRIVER had, LPACMFORMATTAGDETAILSA paftd, 147 ACMFORMATTAGENUMCBA fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum); 148 MMRESULT acmFormatTagEnumW(HACMDRIVER had, LPACMFORMATTAGDETAILSW paftd, 149 ACMFORMATTAGENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum); 150 } 151 152 version (Unicode) { 153 alias ACMFORMATDETAILSW ACMFORMATDETAILS; 154 alias ACMFORMATTAGDETAILSW ACMFORMATTAGDETAILS; 155 alias ACMDRIVERDETAILSW ACMDRIVERDETAILS; 156 alias ACMFORMATENUMCBW ACMFORMATENUMCB; 157 alias ACMFORMATTAGENUMCBW ACMFORMATTAGENUMCB; 158 alias acmFormatEnumW acmFormatEnum; 159 alias acmDriverDetailsW acmDriverDetails; 160 alias acmFormatTagEnumW acmFormatTagEnum; 161 } else { 162 alias ACMFORMATDETAILSA ACMFORMATDETAILS; 163 alias ACMFORMATTAGDETAILSA ACMFORMATTAGDETAILS; 164 alias ACMDRIVERDETAILSA ACMDRIVERDETAILS; 165 alias ACMFORMATENUMCBA ACMFORMATENUMCB; 166 alias ACMFORMATTAGENUMCBA ACMFORMATTAGENUMCB; 167 alias acmFormatEnumA acmFormatEnum; 168 alias acmDriverDetailsA acmDriverDetails; 169 alias acmFormatTagEnumA acmFormatTagEnum; 170 } 171 172 alias ACMFORMATDETAILS* LPACMFORMATDETAILS; 173 alias ACMFORMATTAGDETAILS* LPACMFORMATTAGDETAILS; 174 alias ACMDRIVERDETAILS* LPACMDRIVERDETAILS;