/indra/media_plugins/winmmshim/forwarding_api.h

https://bitbucket.org/lindenlab/viewer-beta/ · C++ Header · 390 lines · 360 code · 4 blank · 26 comment · 0 complexity · bcfd0d8102d3768b7ec063819ffac780 MD5 · raw file

  1. /**
  2. * @file forwarding_api.h
  3. * @brief forwards winmm API calls to real winmm.dll
  4. *
  5. * $LicenseInfo:firstyear=2010&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2010, Linden Research, Inc.
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation;
  12. * version 2.1 of the License only.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this library; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. *
  23. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  24. * $/LicenseInfo$
  25. */
  26. // this turns off __declspec(dllimport) for the functions declared in mmsystem.h
  27. #define _WINMM_
  28. #include <windows.h>
  29. #include <mmsystem.h>
  30. void init_function_pointers(HMODULE winmm_handle);
  31. void ll_winmm_shim_initialize();
  32. typedef VOID (*LPTASKCALLBACK)(DWORD_PTR dwInst);
  33. typedef LRESULT (WINAPI *CloseDriver_type)( HDRVR hDriver, LPARAM lParam1, LPARAM lParam2);
  34. extern CloseDriver_type CloseDriver_orig;
  35. typedef HDRVR (WINAPI *OpenDriver_type)( LPCWSTR szDriverName, LPCWSTR szSectionName, LPARAM lParam2);
  36. extern OpenDriver_type OpenDriver_orig;
  37. typedef LRESULT (WINAPI *SendDriverMessage_type)( HDRVR hDriver, UINT message, LPARAM lParam1, LPARAM lParam2);
  38. extern SendDriverMessage_type SendDriverMessage_orig;
  39. typedef HMODULE (WINAPI *DrvGetModuleHandle_type)( HDRVR hDriver);
  40. extern DrvGetModuleHandle_type DrvGetModuleHandle_orig;
  41. typedef HMODULE (WINAPI *GetDriverModuleHandle_type)( HDRVR hDriver);
  42. extern GetDriverModuleHandle_type GetDriverModuleHandle_orig;
  43. typedef LRESULT (WINAPI *DefDriverProc_type)( DWORD_PTR dwDriverIdentifier, HDRVR hdrvr, UINT uMsg, LPARAM lParam1, LPARAM lParam2);
  44. extern DefDriverProc_type DefDriverProc_orig;
  45. typedef BOOL (WINAPI *DriverCallback_type)(DWORD dwCallBack, DWORD dwFlags, HDRVR hdrvr, DWORD msg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2);
  46. extern DriverCallback_type DriverCallback_orig;
  47. typedef UINT (WINAPI *mmsystemGetVersion_type)(void);
  48. extern mmsystemGetVersion_type mmsystemGetVersion_orig;
  49. typedef BOOL (WINAPI *sndPlaySoundA_type)( LPCSTR pszSound, UINT fuSound);
  50. extern sndPlaySoundA_type sndPlaySoundA_orig;
  51. typedef BOOL (WINAPI *sndPlaySoundW_type)( LPCWSTR pszSound, UINT fuSound);
  52. extern sndPlaySoundW_type sndPlaySoundW_orig;
  53. typedef BOOL (WINAPI *PlaySoundA_type)( LPCSTR pszSound, HMODULE hmod, DWORD fdwSound);
  54. extern PlaySoundA_type PlaySoundA_orig;
  55. typedef BOOL (WINAPI *PlaySoundW_type)( LPCWSTR pszSound, HMODULE hmod, DWORD fdwSound);
  56. extern PlaySoundW_type PlaySoundW_orig;
  57. typedef UINT (WINAPI *waveOutGetNumDevs_type)(void);
  58. extern waveOutGetNumDevs_type waveOutGetNumDevs_orig;
  59. typedef MMRESULT (WINAPI *waveOutGetDevCapsA_type)( UINT_PTR uDeviceID, LPWAVEOUTCAPSA pwoc, UINT cbwoc);
  60. extern waveOutGetDevCapsA_type waveOutGetDevCapsA_orig;
  61. typedef MMRESULT (WINAPI *waveOutGetDevCapsW_type)( UINT_PTR uDeviceID, LPWAVEOUTCAPSW pwoc, UINT cbwoc);
  62. extern waveOutGetDevCapsW_type waveOutGetDevCapsW_orig;
  63. typedef MMRESULT (WINAPI *waveOutGetVolume_type)( HWAVEOUT hwo, LPDWORD pdwVolume);
  64. extern waveOutGetVolume_type waveOutGetVolume_orig;
  65. typedef MMRESULT (WINAPI *waveOutSetVolume_type)( HWAVEOUT hwo, DWORD dwVolume);
  66. extern waveOutSetVolume_type waveOutSetVolume_orig;
  67. typedef MMRESULT (WINAPI *waveOutGetErrorTextA_type)( MMRESULT mmrError, LPSTR pszText, UINT cchText);
  68. extern waveOutGetErrorTextA_type waveOutGetErrorTextA_orig;
  69. typedef MMRESULT (WINAPI *waveOutGetErrorTextW_type)( MMRESULT mmrError, LPWSTR pszText, UINT cchText);
  70. extern waveOutGetErrorTextW_type waveOutGetErrorTextW_orig;
  71. typedef MMRESULT (WINAPI *waveOutOpen_type)( LPHWAVEOUT phwo, UINT uDeviceID, LPCWAVEFORMATEX pwfx, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen);
  72. extern waveOutOpen_type waveOutOpen_orig;
  73. typedef MMRESULT (WINAPI *waveOutClose_type)( HWAVEOUT hwo);
  74. extern waveOutClose_type waveOutClose_orig;
  75. typedef MMRESULT (WINAPI *waveOutPrepareHeader_type)( HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh);
  76. extern waveOutPrepareHeader_type waveOutPrepareHeader_orig;
  77. typedef MMRESULT (WINAPI *waveOutUnprepareHeader_type)( HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh);
  78. extern waveOutUnprepareHeader_type waveOutUnprepareHeader_orig;
  79. typedef MMRESULT (WINAPI *waveOutWrite_type)( HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh);
  80. extern waveOutWrite_type waveOutWrite_orig;
  81. typedef MMRESULT (WINAPI *waveOutPause_type)( HWAVEOUT hwo);
  82. extern waveOutPause_type waveOutPause_orig;
  83. typedef MMRESULT (WINAPI *waveOutRestart_type)( HWAVEOUT hwo);
  84. extern waveOutRestart_type waveOutRestart_orig;
  85. typedef MMRESULT (WINAPI *waveOutReset_type)( HWAVEOUT hwo);
  86. extern waveOutReset_type waveOutReset_orig;
  87. typedef MMRESULT (WINAPI *waveOutBreakLoop_type)( HWAVEOUT hwo);
  88. extern waveOutBreakLoop_type waveOutBreakLoop_orig;
  89. typedef MMRESULT (WINAPI *waveOutGetPosition_type)( HWAVEOUT hwo, LPMMTIME pmmt, UINT cbmmt);
  90. extern waveOutGetPosition_type waveOutGetPosition_orig;
  91. typedef MMRESULT (WINAPI *waveOutGetPitch_type)( HWAVEOUT hwo, LPDWORD pdwPitch);
  92. extern waveOutGetPitch_type waveOutGetPitch_orig;
  93. typedef MMRESULT (WINAPI *waveOutSetPitch_type)( HWAVEOUT hwo, DWORD dwPitch);
  94. extern waveOutSetPitch_type waveOutSetPitch_orig;
  95. typedef MMRESULT (WINAPI *waveOutGetPlaybackRate_type)( HWAVEOUT hwo, LPDWORD pdwRate);
  96. extern waveOutGetPlaybackRate_type waveOutGetPlaybackRate_orig;
  97. typedef MMRESULT (WINAPI *waveOutSetPlaybackRate_type)( HWAVEOUT hwo, DWORD dwRate);
  98. extern waveOutSetPlaybackRate_type waveOutSetPlaybackRate_orig;
  99. typedef MMRESULT (WINAPI *waveOutGetID_type)( HWAVEOUT hwo, LPUINT puDeviceID);
  100. extern waveOutGetID_type waveOutGetID_orig;
  101. typedef MMRESULT (WINAPI *waveOutMessage_type)( HWAVEOUT hwo, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2);
  102. extern waveOutMessage_type waveOutMessage_orig;
  103. typedef UINT (WINAPI *waveInGetNumDevs_type)(void);
  104. extern waveInGetNumDevs_type waveInGetNumDevs_orig;
  105. typedef MMRESULT (WINAPI *waveInGetDevCapsA_type)( UINT_PTR uDeviceID, LPWAVEINCAPSA pwic, UINT cbwic);
  106. extern waveInGetDevCapsA_type waveInGetDevCapsA_orig;
  107. typedef MMRESULT (WINAPI *waveInGetDevCapsW_type)( UINT_PTR uDeviceID, LPWAVEINCAPSW pwic, UINT cbwic);
  108. extern waveInGetDevCapsW_type waveInGetDevCapsW_orig;
  109. typedef MMRESULT (WINAPI *waveInGetErrorTextA_type)(MMRESULT mmrError, LPSTR pszText, UINT cchText);
  110. extern waveInGetErrorTextA_type waveInGetErrorTextA_orig;
  111. typedef MMRESULT (WINAPI *waveInGetErrorTextW_type)(MMRESULT mmrError, LPWSTR pszText, UINT cchText);
  112. extern waveInGetErrorTextW_type waveInGetErrorTextW_orig;
  113. typedef MMRESULT (WINAPI *waveInOpen_type)( LPHWAVEIN phwi, UINT uDeviceID, LPCWAVEFORMATEX pwfx, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen);
  114. extern waveInOpen_type waveInOpen_orig;
  115. typedef MMRESULT (WINAPI *waveInClose_type)( HWAVEIN hwi);
  116. extern waveInClose_type waveInClose_orig;
  117. typedef MMRESULT (WINAPI *waveInPrepareHeader_type)( HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh);
  118. extern waveInPrepareHeader_type waveInPrepareHeader_orig;
  119. typedef MMRESULT (WINAPI *waveInUnprepareHeader_type)( HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh);
  120. extern waveInUnprepareHeader_type waveInUnprepareHeader_orig;
  121. typedef MMRESULT (WINAPI *waveInAddBuffer_type)( HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh);
  122. extern waveInAddBuffer_type waveInAddBuffer_orig;
  123. typedef MMRESULT (WINAPI *waveInStart_type)( HWAVEIN hwi);
  124. extern waveInStart_type waveInStart_orig;
  125. typedef MMRESULT (WINAPI *waveInStop_type)( HWAVEIN hwi);
  126. extern waveInStop_type waveInStop_orig;
  127. typedef MMRESULT (WINAPI *waveInReset_type)( HWAVEIN hwi);
  128. extern waveInReset_type waveInReset_orig;
  129. typedef MMRESULT (WINAPI *waveInGetPosition_type)( HWAVEIN hwi, LPMMTIME pmmt, UINT cbmmt);
  130. extern waveInGetPosition_type waveInGetPosition_orig;
  131. typedef MMRESULT (WINAPI *waveInGetID_type)( HWAVEIN hwi, LPUINT puDeviceID);
  132. extern waveInGetID_type waveInGetID_orig;
  133. typedef MMRESULT (WINAPI *waveInMessage_type)( HWAVEIN hwi, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2);
  134. extern waveInMessage_type waveInMessage_orig;
  135. typedef UINT (WINAPI *midiOutGetNumDevs_type)(void);
  136. extern midiOutGetNumDevs_type midiOutGetNumDevs_orig;
  137. typedef MMRESULT (WINAPI *midiStreamOpen_type)( LPHMIDISTRM phms, LPUINT puDeviceID, DWORD cMidi, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen);
  138. extern midiStreamOpen_type midiStreamOpen_orig;
  139. typedef MMRESULT (WINAPI *midiStreamClose_type)( HMIDISTRM hms);
  140. extern midiStreamClose_type midiStreamClose_orig;
  141. typedef MMRESULT (WINAPI *midiStreamProperty_type)( HMIDISTRM hms, LPBYTE lppropdata, DWORD dwProperty);
  142. extern midiStreamProperty_type midiStreamProperty_orig;
  143. typedef MMRESULT (WINAPI *midiStreamPosition_type)( HMIDISTRM hms, LPMMTIME lpmmt, UINT cbmmt);
  144. extern midiStreamPosition_type midiStreamPosition_orig;
  145. typedef MMRESULT (WINAPI *midiStreamOut_type)( HMIDISTRM hms, LPMIDIHDR pmh, UINT cbmh);
  146. extern midiStreamOut_type midiStreamOut_orig;
  147. typedef MMRESULT (WINAPI *midiStreamPause_type)( HMIDISTRM hms);
  148. extern midiStreamPause_type midiStreamPause_orig;
  149. typedef MMRESULT (WINAPI *midiStreamRestart_type)( HMIDISTRM hms);
  150. extern midiStreamRestart_type midiStreamRestart_orig;
  151. typedef MMRESULT (WINAPI *midiStreamStop_type)( HMIDISTRM hms);
  152. extern midiStreamStop_type midiStreamStop_orig;
  153. typedef MMRESULT (WINAPI *midiConnect_type)( HMIDI hmi, HMIDIOUT hmo, LPVOID pReserved);
  154. extern midiConnect_type midiConnect_orig;
  155. typedef MMRESULT (WINAPI *midiDisconnect_type)( HMIDI hmi, HMIDIOUT hmo, LPVOID pReserved);
  156. extern midiDisconnect_type midiDisconnect_orig;
  157. typedef MMRESULT (WINAPI *midiOutGetDevCapsA_type)( UINT_PTR uDeviceID, LPMIDIOUTCAPSA pmoc, UINT cbmoc);
  158. extern midiOutGetDevCapsA_type midiOutGetDevCapsA_orig;
  159. typedef MMRESULT (WINAPI *midiOutGetDevCapsW_type)( UINT_PTR uDeviceID, LPMIDIOUTCAPSW pmoc, UINT cbmoc);
  160. extern midiOutGetDevCapsW_type midiOutGetDevCapsW_orig;
  161. typedef MMRESULT (WINAPI *midiOutGetVolume_type)( HMIDIOUT hmo, LPDWORD pdwVolume);
  162. extern midiOutGetVolume_type midiOutGetVolume_orig;
  163. typedef MMRESULT (WINAPI *midiOutSetVolume_type)( HMIDIOUT hmo, DWORD dwVolume);
  164. extern midiOutSetVolume_type midiOutSetVolume_orig;
  165. typedef MMRESULT (WINAPI *midiOutGetErrorTextA_type)( MMRESULT mmrError, LPSTR pszText, UINT cchText);
  166. extern midiOutGetErrorTextA_type midiOutGetErrorTextA_orig;
  167. typedef MMRESULT (WINAPI *midiOutGetErrorTextW_type)( MMRESULT mmrError, LPWSTR pszText, UINT cchText);
  168. extern midiOutGetErrorTextW_type midiOutGetErrorTextW_orig;
  169. typedef MMRESULT (WINAPI *midiOutOpen_type)( LPHMIDIOUT phmo, UINT uDeviceID, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen);
  170. extern midiOutOpen_type midiOutOpen_orig;
  171. typedef MMRESULT (WINAPI *midiOutClose_type)( HMIDIOUT hmo);
  172. extern midiOutClose_type midiOutClose_orig;
  173. typedef MMRESULT (WINAPI *midiOutPrepareHeader_type)( HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh);
  174. extern midiOutPrepareHeader_type midiOutPrepareHeader_orig;
  175. typedef MMRESULT (WINAPI *midiOutUnprepareHeader_type)(HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh);
  176. extern midiOutUnprepareHeader_type midiOutUnprepareHeader_orig;
  177. typedef MMRESULT (WINAPI *midiOutShortMsg_type)( HMIDIOUT hmo, DWORD dwMsg);
  178. extern midiOutShortMsg_type midiOutShortMsg_orig;
  179. typedef MMRESULT (WINAPI *midiOutLongMsg_type)(HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh);
  180. extern midiOutLongMsg_type midiOutLongMsg_orig;
  181. typedef MMRESULT (WINAPI *midiOutReset_type)( HMIDIOUT hmo);
  182. extern midiOutReset_type midiOutReset_orig;
  183. typedef MMRESULT (WINAPI *midiOutCachePatches_type)( HMIDIOUT hmo, UINT uBank, LPWORD pwpa, UINT fuCache);
  184. extern midiOutCachePatches_type midiOutCachePatches_orig;
  185. typedef MMRESULT (WINAPI *midiOutCacheDrumPatches_type)( HMIDIOUT hmo, UINT uPatch, LPWORD pwkya, UINT fuCache);
  186. extern midiOutCacheDrumPatches_type midiOutCacheDrumPatches_orig;
  187. typedef MMRESULT (WINAPI *midiOutGetID_type)( HMIDIOUT hmo, LPUINT puDeviceID);
  188. extern midiOutGetID_type midiOutGetID_orig;
  189. typedef MMRESULT (WINAPI *midiOutMessage_type)( HMIDIOUT hmo, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2);
  190. extern midiOutMessage_type midiOutMessage_orig;
  191. typedef UINT (WINAPI *midiInGetNumDevs_type)(void);
  192. extern midiInGetNumDevs_type midiInGetNumDevs_orig;
  193. typedef MMRESULT (WINAPI *midiInGetDevCapsA_type)( UINT_PTR uDeviceID, LPMIDIINCAPSA pmic, UINT cbmic);
  194. extern midiInGetDevCapsA_type midiInGetDevCapsA_orig;
  195. typedef MMRESULT (WINAPI *midiInGetDevCapsW_type)( UINT_PTR uDeviceID, LPMIDIINCAPSW pmic, UINT cbmic);
  196. extern midiInGetDevCapsW_type midiInGetDevCapsW_orig;
  197. typedef MMRESULT (WINAPI *midiInGetErrorTextA_type)( MMRESULT mmrError, LPSTR pszText, UINT cchText);
  198. extern midiInGetErrorTextA_type midiInGetErrorTextA_orig;
  199. typedef MMRESULT (WINAPI *midiInGetErrorTextW_type)( MMRESULT mmrError, LPWSTR pszText, UINT cchText);
  200. extern midiInGetErrorTextW_type midiInGetErrorTextW_orig;
  201. typedef MMRESULT (WINAPI *midiInOpen_type)( LPHMIDIIN phmi, UINT uDeviceID, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen);
  202. extern midiInOpen_type midiInOpen_orig;
  203. typedef MMRESULT (WINAPI *midiInClose_type)( HMIDIIN hmi);
  204. extern midiInClose_type midiInClose_orig;
  205. typedef MMRESULT (WINAPI *midiInPrepareHeader_type)( HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh);
  206. extern midiInPrepareHeader_type midiInPrepareHeader_orig;
  207. typedef MMRESULT (WINAPI *midiInUnprepareHeader_type)( HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh);
  208. extern midiInUnprepareHeader_type midiInUnprepareHeader_orig;
  209. typedef MMRESULT (WINAPI *midiInAddBuffer_type)( HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh);
  210. extern midiInAddBuffer_type midiInAddBuffer_orig;
  211. typedef MMRESULT (WINAPI *midiInStart_type)( HMIDIIN hmi);
  212. extern midiInStart_type midiInStart_orig;
  213. typedef MMRESULT (WINAPI *midiInStop_type)( HMIDIIN hmi);
  214. extern midiInStop_type midiInStop_orig;
  215. typedef MMRESULT (WINAPI *midiInReset_type)( HMIDIIN hmi);
  216. extern midiInReset_type midiInReset_orig;
  217. typedef MMRESULT (WINAPI *midiInGetID_type)( HMIDIIN hmi, LPUINT puDeviceID);
  218. extern midiInGetID_type midiInGetID_orig;
  219. typedef MMRESULT (WINAPI *midiInMessage_type)( HMIDIIN hmi, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2);
  220. extern midiInMessage_type midiInMessage_orig;
  221. typedef UINT (WINAPI *auxGetNumDevs_type)(void);
  222. extern auxGetNumDevs_type auxGetNumDevs_orig;
  223. typedef MMRESULT (WINAPI *auxGetDevCapsA_type)( UINT_PTR uDeviceID, LPAUXCAPSA pac, UINT cbac);
  224. extern auxGetDevCapsA_type auxGetDevCapsA_orig;
  225. typedef MMRESULT (WINAPI *auxGetDevCapsW_type)( UINT_PTR uDeviceID, LPAUXCAPSW pac, UINT cbac);
  226. extern auxGetDevCapsW_type auxGetDevCapsW_orig;
  227. typedef MMRESULT (WINAPI *auxSetVolume_type)( UINT uDeviceID, DWORD dwVolume);
  228. extern auxSetVolume_type auxSetVolume_orig;
  229. typedef MMRESULT (WINAPI *auxGetVolume_type)( UINT uDeviceID, LPDWORD pdwVolume);
  230. extern auxGetVolume_type auxGetVolume_orig;
  231. typedef MMRESULT (WINAPI *auxOutMessage_type)( UINT uDeviceID, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2);
  232. extern auxOutMessage_type auxOutMessage_orig;
  233. typedef UINT (WINAPI *mixerGetNumDevs_type)(void);
  234. extern mixerGetNumDevs_type mixerGetNumDevs_orig;
  235. typedef MMRESULT (WINAPI *mixerGetDevCapsA_type)( UINT_PTR uMxId, LPMIXERCAPSA pmxcaps, UINT cbmxcaps);
  236. extern mixerGetDevCapsA_type mixerGetDevCapsA_orig;
  237. typedef MMRESULT (WINAPI *mixerGetDevCapsW_type)( UINT_PTR uMxId, LPMIXERCAPSW pmxcaps, UINT cbmxcaps);
  238. extern mixerGetDevCapsW_type mixerGetDevCapsW_orig;
  239. typedef MMRESULT (WINAPI *mixerOpen_type)( LPHMIXER phmx, UINT uMxId, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen);
  240. extern mixerOpen_type mixerOpen_orig;
  241. typedef MMRESULT (WINAPI *mixerClose_type)( HMIXER hmx);
  242. extern mixerClose_type mixerClose_orig;
  243. typedef DWORD (WINAPI *mixerMessage_type)( HMIXER hmx, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2);
  244. extern mixerMessage_type mixerMessage_orig;
  245. typedef MMRESULT (WINAPI *mixerGetLineInfoA_type)( HMIXEROBJ hmxobj, LPMIXERLINEA pmxl, DWORD fdwInfo);
  246. extern mixerGetLineInfoA_type mixerGetLineInfoA_orig;
  247. typedef MMRESULT (WINAPI *mixerGetLineInfoW_type)( HMIXEROBJ hmxobj, LPMIXERLINEW pmxl, DWORD fdwInfo);
  248. extern mixerGetLineInfoW_type mixerGetLineInfoW_orig;
  249. typedef MMRESULT (WINAPI *mixerGetID_type)( HMIXEROBJ hmxobj, UINT FAR *puMxId, DWORD fdwId);
  250. extern mixerGetID_type mixerGetID_orig;
  251. typedef MMRESULT (WINAPI *mixerGetLineControlsA_type)( HMIXEROBJ hmxobj, LPMIXERLINECONTROLSA pmxlc, DWORD fdwControls);
  252. extern mixerGetLineControlsA_type mixerGetLineControlsA_orig;
  253. typedef MMRESULT (WINAPI *mixerGetLineControlsW_type)( HMIXEROBJ hmxobj, LPMIXERLINECONTROLSW pmxlc, DWORD fdwControls);
  254. extern mixerGetLineControlsW_type mixerGetLineControlsW_orig;
  255. typedef MMRESULT (WINAPI *mixerGetControlDetailsA_type)( HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails);
  256. extern mixerGetControlDetailsA_type mixerGetControlDetailsA_orig;
  257. typedef MMRESULT (WINAPI *mixerGetControlDetailsW_type)( HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails);
  258. extern mixerGetControlDetailsW_type mixerGetControlDetailsW_orig;
  259. typedef MMRESULT (WINAPI *mixerSetControlDetails_type)( HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails);
  260. extern mixerSetControlDetails_type mixerSetControlDetails_orig;
  261. typedef DWORD (WINAPI *mmGetCurrentTask_type)(void);
  262. extern mmGetCurrentTask_type mmGetCurrentTask_orig;
  263. typedef void (WINAPI *mmTaskBlock_type)(DWORD);
  264. extern mmTaskBlock_type mmTaskBlock_orig;
  265. typedef UINT (WINAPI *mmTaskCreate_type)(LPTASKCALLBACK, HANDLE*, DWORD_PTR);
  266. extern mmTaskCreate_type mmTaskCreate_orig;
  267. typedef BOOL (WINAPI *mmTaskSignal_type)(DWORD);
  268. extern mmTaskSignal_type mmTaskSignal_orig;
  269. typedef VOID (WINAPI *mmTaskYield_type)(VOID);
  270. extern mmTaskYield_type mmTaskYield_orig;
  271. typedef MMRESULT (WINAPI *timeGetSystemTime_type)( LPMMTIME pmmt, UINT cbmmt);
  272. extern timeGetSystemTime_type timeGetSystemTime_orig;
  273. typedef DWORD (WINAPI *timeGetTime_type)(void);
  274. extern timeGetTime_type timeGetTime_orig;
  275. typedef MMRESULT (WINAPI *timeSetEvent_type)( UINT uDelay, UINT uResolution, LPTIMECALLBACK fptc, DWORD_PTR dwUser, UINT fuEvent);
  276. extern timeSetEvent_type timeSetEvent_orig;
  277. typedef MMRESULT (WINAPI *timeKillEvent_type)( UINT uTimerID);
  278. extern timeKillEvent_type timeKillEvent_orig;
  279. typedef MMRESULT (WINAPI *timeGetDevCaps_type)( LPTIMECAPS ptc, UINT cbtc);
  280. extern timeGetDevCaps_type timeGetDevCaps_orig;
  281. typedef MMRESULT (WINAPI *timeBeginPeriod_type)( UINT uPeriod);
  282. extern timeBeginPeriod_type timeBeginPeriod_orig;
  283. typedef MMRESULT (WINAPI *timeEndPeriod_type)( UINT uPeriod);
  284. extern timeEndPeriod_type timeEndPeriod_orig;
  285. typedef UINT (WINAPI *joyGetNumDevs_type)(void);
  286. extern joyGetNumDevs_type joyGetNumDevs_orig;
  287. typedef MMRESULT (WINAPI *joyConfigChanged_type)(DWORD dwFlags);
  288. extern joyConfigChanged_type joyConfigChanged_orig;
  289. typedef MMRESULT (WINAPI *joyGetDevCapsA_type)( UINT_PTR uJoyID, LPJOYCAPSA pjc, UINT cbjc);
  290. extern joyGetDevCapsA_type joyGetDevCapsA_orig;
  291. typedef MMRESULT (WINAPI *joyGetDevCapsW_type)( UINT_PTR uJoyID, LPJOYCAPSW pjc, UINT cbjc);
  292. extern joyGetDevCapsW_type joyGetDevCapsW_orig;
  293. typedef MMRESULT (WINAPI *joyGetPos_type)( UINT uJoyID, LPJOYINFO pji);
  294. extern joyGetPos_type joyGetPos_orig;
  295. typedef MMRESULT (WINAPI *joyGetPosEx_type)( UINT uJoyID, LPJOYINFOEX pji);
  296. extern joyGetPosEx_type joyGetPosEx_orig;
  297. typedef MMRESULT (WINAPI *joyGetThreshold_type)( UINT uJoyID, LPUINT puThreshold);
  298. extern joyGetThreshold_type joyGetThreshold_orig;
  299. typedef MMRESULT (WINAPI *joyReleaseCapture_type)( UINT uJoyID);
  300. extern joyReleaseCapture_type joyReleaseCapture_orig;
  301. typedef MMRESULT (WINAPI *joySetCapture_type)( HWND hwnd, UINT uJoyID, UINT uPeriod, BOOL fChanged);
  302. extern joySetCapture_type joySetCapture_orig;
  303. typedef MMRESULT (WINAPI *joySetThreshold_type)( UINT uJoyID, UINT uThreshold);
  304. extern joySetThreshold_type joySetThreshold_orig;
  305. typedef BOOL (WINAPI *mciDriverNotify_type)(HWND hwndCallback, UINT uDeviceID, UINT uStatus);
  306. extern mciDriverNotify_type mciDriverNotify_orig;
  307. typedef UINT (WINAPI *mciDriverYield_type)(UINT uDeviceID);
  308. extern mciDriverYield_type mciDriverYield_orig;
  309. typedef FOURCC (WINAPI *mmioStringToFOURCCA_type)( LPCSTR sz, UINT uFlags);
  310. extern mmioStringToFOURCCA_type mmioStringToFOURCCA_orig;
  311. typedef FOURCC (WINAPI *mmioStringToFOURCCW_type)( LPCWSTR sz, UINT uFlags);
  312. extern mmioStringToFOURCCW_type mmioStringToFOURCCW_orig;
  313. typedef LPMMIOPROC (WINAPI *mmioInstallIOProcA_type)( FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags);
  314. extern mmioInstallIOProcA_type mmioInstallIOProcA_orig;
  315. typedef LPMMIOPROC (WINAPI *mmioInstallIOProcW_type)( FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags);
  316. extern mmioInstallIOProcW_type mmioInstallIOProcW_orig;
  317. typedef HMMIO (WINAPI *mmioOpenA_type)( LPSTR pszFileName, LPMMIOINFO pmmioinfo, DWORD fdwOpen);
  318. extern mmioOpenA_type mmioOpenA_orig;
  319. typedef HMMIO (WINAPI *mmioOpenW_type)( LPWSTR pszFileName, LPMMIOINFO pmmioinfo, DWORD fdwOpen);
  320. extern mmioOpenW_type mmioOpenW_orig;
  321. typedef MMRESULT (WINAPI *mmioRenameA_type)( LPCSTR pszFileName, LPCSTR pszNewFileName, LPCMMIOINFO pmmioinfo, DWORD fdwRename);
  322. extern mmioRenameA_type mmioRenameA_orig;
  323. typedef MMRESULT (WINAPI *mmioRenameW_type)( LPCWSTR pszFileName, LPCWSTR pszNewFileName, LPCMMIOINFO pmmioinfo, DWORD fdwRename);
  324. extern mmioRenameW_type mmioRenameW_orig;
  325. typedef MMRESULT (WINAPI *mmioClose_type)( HMMIO hmmio, UINT fuClose);
  326. extern mmioClose_type mmioClose_orig;
  327. typedef LONG (WINAPI *mmioRead_type)( HMMIO hmmio, HPSTR pch, LONG cch);
  328. extern mmioRead_type mmioRead_orig;
  329. typedef LONG (WINAPI *mmioWrite_type)( HMMIO hmmio, const char _huge* pch, LONG cch);
  330. extern mmioWrite_type mmioWrite_orig;
  331. typedef LONG (WINAPI *mmioSeek_type)( HMMIO hmmio, LONG lOffset, int iOrigin);
  332. extern mmioSeek_type mmioSeek_orig;
  333. typedef MMRESULT (WINAPI *mmioGetInfo_type)( HMMIO hmmio, LPMMIOINFO pmmioinfo, UINT fuInfo);
  334. extern mmioGetInfo_type mmioGetInfo_orig;
  335. typedef MMRESULT (WINAPI *mmioSetInfo_type)( HMMIO hmmio, LPCMMIOINFO pmmioinfo, UINT fuInfo);
  336. extern mmioSetInfo_type mmioSetInfo_orig;
  337. typedef MMRESULT (WINAPI *mmioSetBuffer_type)( HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer, UINT fuBuffer);
  338. extern mmioSetBuffer_type mmioSetBuffer_orig;
  339. typedef MMRESULT (WINAPI *mmioFlush_type)( HMMIO hmmio, UINT fuFlush);
  340. extern mmioFlush_type mmioFlush_orig;
  341. typedef MMRESULT (WINAPI *mmioAdvance_type)( HMMIO hmmio, LPMMIOINFO pmmioinfo, UINT fuAdvance);
  342. extern mmioAdvance_type mmioAdvance_orig;
  343. typedef LRESULT (WINAPI *mmioSendMessage_type)( HMMIO hmmio, UINT uMsg, LPARAM lParam1, LPARAM lParam2);
  344. extern mmioSendMessage_type mmioSendMessage_orig;
  345. typedef MMRESULT (WINAPI *mmioDescend_type)( HMMIO hmmio, LPMMCKINFO pmmcki, const MMCKINFO FAR* pmmckiParent, UINT fuDescend);
  346. extern mmioDescend_type mmioDescend_orig;
  347. typedef MMRESULT (WINAPI *mmioAscend_type)( HMMIO hmmio, LPMMCKINFO pmmcki, UINT fuAscend);
  348. extern mmioAscend_type mmioAscend_orig;
  349. typedef MMRESULT (WINAPI *mmioCreateChunk_type)(HMMIO hmmio, LPMMCKINFO pmmcki, UINT fuCreate);
  350. extern mmioCreateChunk_type mmioCreateChunk_orig;
  351. typedef MCIERROR (WINAPI *mciSendCommandA_type)( MCIDEVICEID mciId, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2);
  352. extern mciSendCommandA_type mciSendCommandA_orig;
  353. typedef MCIERROR (WINAPI *mciSendCommandW_type)( MCIDEVICEID mciId, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2);
  354. extern mciSendCommandW_type mciSendCommandW_orig;
  355. typedef MCIERROR (WINAPI *mciSendStringA_type)( LPCSTR lpstrCommand, LPSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback);
  356. extern mciSendStringA_type mciSendStringA_orig;
  357. typedef MCIERROR (WINAPI *mciSendStringW_type)( LPCWSTR lpstrCommand, LPWSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback);
  358. extern mciSendStringW_type mciSendStringW_orig;
  359. typedef MCIDEVICEID (WINAPI *mciGetDeviceIDA_type)( LPCSTR pszDevice);
  360. extern mciGetDeviceIDA_type mciGetDeviceIDA_orig;
  361. typedef MCIDEVICEID (WINAPI *mciGetDeviceIDW_type)( LPCWSTR pszDevice);
  362. extern mciGetDeviceIDW_type mciGetDeviceIDW_orig;
  363. typedef MCIDEVICEID (WINAPI *mciGetDeviceIDFromElementIDA_type)( DWORD dwElementID, LPCSTR lpstrType );
  364. extern mciGetDeviceIDFromElementIDA_type mciGetDeviceIDFromElementIDA_orig;
  365. typedef MCIDEVICEID (WINAPI *mciGetDeviceIDFromElementIDW_type)( DWORD dwElementID, LPCWSTR lpstrType );
  366. extern mciGetDeviceIDFromElementIDW_type mciGetDeviceIDFromElementIDW_orig;
  367. typedef DWORD_PTR (WINAPI *mciGetDriverData_type)(UINT uDeviceID);
  368. extern mciGetDriverData_type mciGetDriverData_orig;
  369. typedef BOOL (WINAPI *mciGetErrorStringA_type)( MCIERROR mcierr, LPSTR pszText, UINT cchText);
  370. extern mciGetErrorStringA_type mciGetErrorStringA_orig;
  371. typedef BOOL (WINAPI *mciGetErrorStringW_type)( MCIERROR mcierr, LPWSTR pszText, UINT cchText);
  372. extern mciGetErrorStringW_type mciGetErrorStringW_orig;
  373. typedef BOOL (WINAPI *mciSetDriverData_type)(UINT uDeviceID, DWORD_PTR dwData);
  374. extern mciSetDriverData_type mciSetDriverData_orig;
  375. typedef BOOL (WINAPI *mciSetYieldProc_type)( MCIDEVICEID mciId, YIELDPROC fpYieldProc, DWORD dwYieldData);
  376. extern mciSetYieldProc_type mciSetYieldProc_orig;
  377. typedef BOOL (WINAPI *mciFreeCommandResource_type)(UINT uTable);
  378. extern mciFreeCommandResource_type mciFreeCommandResource_orig;
  379. typedef HTASK (WINAPI *mciGetCreatorTask_type)( MCIDEVICEID mciId);
  380. extern mciGetCreatorTask_type mciGetCreatorTask_orig;
  381. typedef YIELDPROC (WINAPI *mciGetYieldProc_type)( MCIDEVICEID mciId, LPDWORD pdwYieldData);
  382. extern mciGetYieldProc_type mciGetYieldProc_orig;
  383. typedef UINT (WINAPI *mciLoadCommandResource_type)(HINSTANCE hInstance, LPCWSTR lpResName, UINT uType);
  384. extern mciLoadCommandResource_type mciLoadCommandResource_orig;
  385. typedef BOOL (WINAPI *mciExecute_type)(LPCSTR pszCommand);
  386. extern mciExecute_type mciExecute_orig;