Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

340 lines
4.6 KiB

  1. #include "multimediapch.h"
  2. #pragma hdrstop
  3. #define _WINMM_
  4. #include <mmsystem.h>
  5. static
  6. void
  7. WINAPI
  8. MigrateAllDrivers (
  9. void
  10. )
  11. {
  12. return;
  13. }
  14. static
  15. void
  16. WINAPI
  17. MigrateSoundEvents (
  18. void
  19. )
  20. {
  21. return;
  22. }
  23. static
  24. BOOL
  25. WINAPI
  26. PlaySoundW(
  27. LPCWSTR szSoundName,
  28. HMODULE hModule,
  29. DWORD wFlags
  30. )
  31. {
  32. return FALSE;
  33. }
  34. static
  35. BOOL
  36. WINAPI
  37. PlaySoundA(
  38. LPCSTR szSoundName,
  39. HMODULE hModule,
  40. DWORD wFlags
  41. )
  42. {
  43. return FALSE;
  44. }
  45. static
  46. void
  47. WINAPI
  48. WinmmLogoff(
  49. void
  50. )
  51. {
  52. return;
  53. }
  54. static
  55. void
  56. WINAPI
  57. WinmmLogon(
  58. BOOL fConsole
  59. )
  60. {
  61. return;
  62. }
  63. static
  64. UINT
  65. WINAPI
  66. waveOutGetNumDevs(
  67. void
  68. )
  69. {
  70. return 0;
  71. }
  72. static
  73. MMRESULT
  74. WINAPI
  75. waveOutMessage(
  76. IN HWAVEOUT hwo,
  77. IN UINT uMsg,
  78. IN DWORD_PTR dw1,
  79. IN DWORD_PTR dw2
  80. )
  81. {
  82. // Perhaps should raise an exception here. There's no way to know
  83. // the proper return value, and this shouldn't be called if other
  84. // wave functions have failed.
  85. return MMSYSERR_ERROR;
  86. }
  87. static
  88. MMRESULT
  89. WINAPI
  90. mixerClose(
  91. IN OUT HMIXER hmx
  92. )
  93. {
  94. return MMSYSERR_ERROR;
  95. }
  96. static
  97. MMRESULT
  98. WINAPI
  99. mixerGetControlDetailsW(
  100. IN HMIXEROBJ hmxobj,
  101. IN OUT LPMIXERCONTROLDETAILS pmxcd,
  102. IN DWORD fdwDetails
  103. )
  104. {
  105. return MMSYSERR_ERROR;
  106. }
  107. static
  108. MMRESULT
  109. WINAPI
  110. mixerGetLineControlsW(
  111. IN HMIXEROBJ hmxobj,
  112. IN OUT LPMIXERLINECONTROLSW pmxlc,
  113. IN DWORD fdwControls
  114. )
  115. {
  116. return MMSYSERR_ERROR;
  117. }
  118. MMRESULT
  119. WINAPI
  120. mixerGetID(
  121. IN HMIXEROBJ hmxobj,
  122. OUT UINT FAR *puMxId,
  123. IN DWORD fdwId
  124. )
  125. {
  126. return MMSYSERR_ERROR;
  127. }
  128. static
  129. MMRESULT
  130. WINAPI
  131. mixerGetLineInfoW(
  132. IN HMIXEROBJ hmxobj,
  133. OUT LPMIXERLINEW pmxl,
  134. IN DWORD fdwInfo
  135. )
  136. {
  137. return MMSYSERR_ERROR;
  138. }
  139. static
  140. DWORD
  141. WINAPI
  142. mixerMessage(
  143. IN HMIXER hmx,
  144. IN UINT uMsg,
  145. IN DWORD_PTR dwParam1,
  146. IN DWORD_PTR dwParam2
  147. )
  148. {
  149. // Perhaps should raise an exception here. There's no way to know
  150. // the proper return value, and this shouldn't be called if other
  151. // mixer functions have failed.
  152. return MMSYSERR_ERROR;
  153. }
  154. static
  155. MMRESULT
  156. WINAPI
  157. mixerOpen(
  158. OUT LPHMIXER phmx,
  159. IN UINT uMxId,
  160. IN DWORD_PTR dwCallback,
  161. IN DWORD_PTR dwInstance,
  162. IN DWORD fdwOpen
  163. )
  164. {
  165. return MMSYSERR_ERROR;
  166. }
  167. static
  168. MMRESULT
  169. WINAPI
  170. mixerSetControlDetails(
  171. IN HMIXEROBJ hmxobj,
  172. IN LPMIXERCONTROLDETAILS pmxcd,
  173. IN DWORD fdwDetails
  174. )
  175. {
  176. return MMSYSERR_ERROR;
  177. }
  178. static
  179. MMRESULT
  180. WINAPI
  181. mmioAscend(
  182. HMMIO hmmio,
  183. LPMMCKINFO lpck,
  184. UINT wFlags
  185. )
  186. {
  187. return MMSYSERR_ERROR;
  188. }
  189. static
  190. MMRESULT
  191. WINAPI
  192. mmioClose(
  193. HMMIO hmmio,
  194. UINT wFlags
  195. )
  196. {
  197. return MMSYSERR_ERROR;
  198. }
  199. static
  200. MMRESULT
  201. WINAPI
  202. mmioDescend(
  203. HMMIO hmmio,
  204. LPMMCKINFO lpck,
  205. const MMCKINFO *lpckParent,
  206. UINT wFlags
  207. )
  208. {
  209. return MMSYSERR_ERROR;
  210. }
  211. static
  212. HMMIO
  213. WINAPI
  214. mmioOpenW(
  215. LPWSTR szFilename,
  216. LPMMIOINFO lpmmioinfo,
  217. DWORD dwOpenFlags
  218. )
  219. {
  220. if (lpmmioinfo)
  221. {
  222. // Must fill in wErrorRet field. Docs say, of MMIOERR_INVALIDFILE:
  223. // "Another failure condition occurred. This is the default error for an open-file failure."
  224. lpmmioinfo->wErrorRet = MMIOERR_INVALIDFILE;
  225. }
  226. return NULL;
  227. }
  228. static
  229. LONG
  230. WINAPI
  231. mmioRead(
  232. HMMIO hmmio,
  233. HPSTR pch,
  234. LONG cch
  235. )
  236. {
  237. return -1;
  238. }
  239. static
  240. BOOL
  241. WINAPI
  242. sndPlaySoundW(
  243. IN LPCWSTR pszSound,
  244. IN UINT fuSound
  245. )
  246. {
  247. return FALSE;
  248. }
  249. static
  250. MCIERROR
  251. WINAPI
  252. mciSendCommandW(
  253. IN MCIDEVICEID IDDevice,
  254. IN UINT uMsg,
  255. IN DWORD_PTR fdwCommand,
  256. IN DWORD_PTR dwParam
  257. )
  258. {
  259. return MCIERR_OUT_OF_MEMORY;
  260. }
  261. static
  262. MCIERROR
  263. WINAPI
  264. mciSendStringW(
  265. IN LPCWSTR lpstrCommand,
  266. OUT LPWSTR lpstrReturnString,
  267. IN UINT uReturnLength,
  268. IN HWND hwndCallback
  269. )
  270. {
  271. return MCIERR_OUT_OF_MEMORY;
  272. }
  273. //
  274. // !! WARNING !! The entries below must be in alphabetical order, and are CASE SENSITIVE (eg lower case comes last!)
  275. //
  276. DEFINE_PROCNAME_ENTRIES(winmm)
  277. {
  278. DLPENTRY(MigrateAllDrivers)
  279. DLPENTRY(MigrateSoundEvents)
  280. DLPENTRY(PlaySoundA)
  281. DLPENTRY(PlaySoundW)
  282. DLPENTRY(WinmmLogoff)
  283. DLPENTRY(WinmmLogon)
  284. DLPENTRY(mciSendCommandW)
  285. DLPENTRY(mciSendStringW)
  286. DLPENTRY(mixerClose)
  287. DLPENTRY(mixerGetControlDetailsW)
  288. DLPENTRY(mixerGetID)
  289. DLPENTRY(mixerGetLineControlsW)
  290. DLPENTRY(mixerGetLineInfoW)
  291. DLPENTRY(mixerMessage)
  292. DLPENTRY(mixerOpen)
  293. DLPENTRY(mixerSetControlDetails)
  294. DLPENTRY(mmioAscend)
  295. DLPENTRY(mmioClose)
  296. DLPENTRY(mmioDescend)
  297. DLPENTRY(mmioOpenW)
  298. DLPENTRY(mmioRead)
  299. DLPENTRY(sndPlaySoundW)
  300. DLPENTRY(waveOutGetNumDevs)
  301. DLPENTRY(waveOutMessage)
  302. };
  303. DEFINE_PROCNAME_MAP(winmm)