PageRenderTime 10ms CodeModel.GetById 11ms app.highlight 129ms RepoModel.GetById 1ms app.codeStats 1ms

/indra/media_plugins/winmmshim/forwarding_api.cpp

https://bitbucket.org/lindenlab/viewer-beta/
C++ | 1627 lines | 1229 code | 183 blank | 215 comment | 0 complexity | 75bc9dd0cda84147804523b65414468c MD5 | raw file
   1/** 
   2 * @file forwarding_api.cpp
   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
  27#include "forwarding_api.h"
  28
  29CloseDriver_type CloseDriver_orig;
  30OpenDriver_type OpenDriver_orig;
  31SendDriverMessage_type SendDriverMessage_orig;
  32DrvGetModuleHandle_type DrvGetModuleHandle_orig;
  33GetDriverModuleHandle_type GetDriverModuleHandle_orig;
  34DefDriverProc_type DefDriverProc_orig;
  35DriverCallback_type DriverCallback_orig;
  36mmsystemGetVersion_type mmsystemGetVersion_orig;
  37sndPlaySoundA_type sndPlaySoundA_orig;
  38sndPlaySoundW_type sndPlaySoundW_orig;
  39PlaySoundA_type PlaySoundA_orig;
  40PlaySoundW_type PlaySoundW_orig;
  41waveOutGetNumDevs_type waveOutGetNumDevs_orig;
  42waveOutGetDevCapsA_type waveOutGetDevCapsA_orig;
  43waveOutGetDevCapsW_type waveOutGetDevCapsW_orig;
  44waveOutGetVolume_type waveOutGetVolume_orig;
  45waveOutSetVolume_type waveOutSetVolume_orig;
  46waveOutGetErrorTextA_type waveOutGetErrorTextA_orig;
  47waveOutGetErrorTextW_type waveOutGetErrorTextW_orig;
  48waveOutOpen_type waveOutOpen_orig;
  49waveOutClose_type waveOutClose_orig;
  50waveOutPrepareHeader_type waveOutPrepareHeader_orig;
  51waveOutUnprepareHeader_type waveOutUnprepareHeader_orig;
  52waveOutWrite_type waveOutWrite_orig;
  53waveOutPause_type waveOutPause_orig;
  54waveOutRestart_type waveOutRestart_orig;
  55waveOutReset_type waveOutReset_orig;
  56waveOutBreakLoop_type waveOutBreakLoop_orig;
  57waveOutGetPosition_type waveOutGetPosition_orig;
  58waveOutGetPitch_type waveOutGetPitch_orig;
  59waveOutSetPitch_type waveOutSetPitch_orig;
  60waveOutGetPlaybackRate_type waveOutGetPlaybackRate_orig;
  61waveOutSetPlaybackRate_type waveOutSetPlaybackRate_orig;
  62waveOutGetID_type waveOutGetID_orig;
  63waveOutMessage_type waveOutMessage_orig;
  64waveInGetNumDevs_type waveInGetNumDevs_orig;
  65waveInGetDevCapsA_type waveInGetDevCapsA_orig;
  66waveInGetDevCapsW_type waveInGetDevCapsW_orig;
  67waveInGetErrorTextA_type waveInGetErrorTextA_orig;
  68waveInGetErrorTextW_type waveInGetErrorTextW_orig;
  69waveInOpen_type waveInOpen_orig;
  70waveInClose_type waveInClose_orig;
  71waveInPrepareHeader_type waveInPrepareHeader_orig;
  72waveInUnprepareHeader_type waveInUnprepareHeader_orig;
  73waveInAddBuffer_type waveInAddBuffer_orig;
  74waveInStart_type waveInStart_orig;
  75waveInStop_type waveInStop_orig;
  76waveInReset_type waveInReset_orig;
  77waveInGetPosition_type waveInGetPosition_orig;
  78waveInGetID_type waveInGetID_orig;
  79waveInMessage_type waveInMessage_orig;
  80midiOutGetNumDevs_type midiOutGetNumDevs_orig;
  81midiStreamOpen_type midiStreamOpen_orig;
  82midiStreamClose_type midiStreamClose_orig;
  83midiStreamProperty_type midiStreamProperty_orig;
  84midiStreamPosition_type midiStreamPosition_orig;
  85midiStreamOut_type midiStreamOut_orig;
  86midiStreamPause_type midiStreamPause_orig;
  87midiStreamRestart_type midiStreamRestart_orig;
  88midiStreamStop_type midiStreamStop_orig;
  89midiConnect_type midiConnect_orig;
  90midiDisconnect_type midiDisconnect_orig;
  91midiOutGetDevCapsA_type midiOutGetDevCapsA_orig;
  92midiOutGetDevCapsW_type midiOutGetDevCapsW_orig;
  93midiOutGetVolume_type midiOutGetVolume_orig;
  94midiOutSetVolume_type midiOutSetVolume_orig;
  95midiOutGetErrorTextA_type midiOutGetErrorTextA_orig;
  96midiOutGetErrorTextW_type midiOutGetErrorTextW_orig;
  97midiOutOpen_type midiOutOpen_orig;
  98midiOutClose_type midiOutClose_orig;
  99midiOutPrepareHeader_type midiOutPrepareHeader_orig;
 100midiOutUnprepareHeader_type midiOutUnprepareHeader_orig;
 101midiOutShortMsg_type midiOutShortMsg_orig;
 102midiOutLongMsg_type midiOutLongMsg_orig;
 103midiOutReset_type midiOutReset_orig;
 104midiOutCachePatches_type midiOutCachePatches_orig;
 105midiOutCacheDrumPatches_type midiOutCacheDrumPatches_orig;
 106midiOutGetID_type midiOutGetID_orig;
 107midiOutMessage_type midiOutMessage_orig;
 108midiInGetNumDevs_type midiInGetNumDevs_orig;
 109midiInGetDevCapsA_type midiInGetDevCapsA_orig;
 110midiInGetDevCapsW_type midiInGetDevCapsW_orig;
 111midiInGetErrorTextA_type midiInGetErrorTextA_orig;
 112midiInGetErrorTextW_type midiInGetErrorTextW_orig;
 113midiInOpen_type midiInOpen_orig;
 114midiInClose_type midiInClose_orig;
 115midiInPrepareHeader_type midiInPrepareHeader_orig;
 116midiInUnprepareHeader_type midiInUnprepareHeader_orig;
 117midiInAddBuffer_type midiInAddBuffer_orig;
 118midiInStart_type midiInStart_orig;
 119midiInStop_type midiInStop_orig;
 120midiInReset_type midiInReset_orig;
 121midiInGetID_type midiInGetID_orig;
 122midiInMessage_type midiInMessage_orig;
 123auxGetNumDevs_type auxGetNumDevs_orig;
 124auxGetDevCapsA_type auxGetDevCapsA_orig;
 125auxGetDevCapsW_type auxGetDevCapsW_orig;
 126auxSetVolume_type auxSetVolume_orig;
 127auxGetVolume_type auxGetVolume_orig;
 128auxOutMessage_type auxOutMessage_orig;
 129mixerGetNumDevs_type mixerGetNumDevs_orig;
 130mixerGetDevCapsA_type mixerGetDevCapsA_orig;
 131mixerGetDevCapsW_type mixerGetDevCapsW_orig;
 132mixerOpen_type mixerOpen_orig;
 133mixerClose_type mixerClose_orig;
 134mixerMessage_type mixerMessage_orig;
 135mixerGetLineInfoA_type mixerGetLineInfoA_orig;
 136mixerGetLineInfoW_type mixerGetLineInfoW_orig;
 137mixerGetID_type mixerGetID_orig;
 138mixerGetLineControlsA_type mixerGetLineControlsA_orig;
 139mixerGetLineControlsW_type mixerGetLineControlsW_orig;
 140mixerGetControlDetailsA_type mixerGetControlDetailsA_orig;
 141mixerGetControlDetailsW_type mixerGetControlDetailsW_orig;
 142mixerSetControlDetails_type mixerSetControlDetails_orig;
 143mmGetCurrentTask_type mmGetCurrentTask_orig;
 144mmTaskBlock_type mmTaskBlock_orig;
 145mmTaskCreate_type mmTaskCreate_orig;
 146mmTaskSignal_type mmTaskSignal_orig;
 147mmTaskYield_type mmTaskYield_orig;
 148timeGetSystemTime_type timeGetSystemTime_orig;
 149timeGetTime_type timeGetTime_orig;
 150timeSetEvent_type timeSetEvent_orig;
 151timeKillEvent_type timeKillEvent_orig;
 152timeGetDevCaps_type timeGetDevCaps_orig;
 153timeBeginPeriod_type timeBeginPeriod_orig;
 154timeEndPeriod_type timeEndPeriod_orig;
 155joyGetNumDevs_type joyGetNumDevs_orig;
 156joyConfigChanged_type joyConfigChanged_orig;
 157joyGetDevCapsA_type joyGetDevCapsA_orig;
 158joyGetDevCapsW_type joyGetDevCapsW_orig;
 159joyGetPos_type joyGetPos_orig;
 160joyGetPosEx_type joyGetPosEx_orig;
 161joyGetThreshold_type joyGetThreshold_orig;
 162joyReleaseCapture_type joyReleaseCapture_orig;
 163joySetCapture_type joySetCapture_orig;
 164joySetThreshold_type joySetThreshold_orig;
 165mmioStringToFOURCCA_type mmioStringToFOURCCA_orig;
 166mmioStringToFOURCCW_type mmioStringToFOURCCW_orig;
 167mmioInstallIOProcA_type mmioInstallIOProcA_orig;
 168mmioInstallIOProcW_type mmioInstallIOProcW_orig;
 169mmioOpenA_type mmioOpenA_orig;
 170mmioOpenW_type mmioOpenW_orig;
 171mmioRenameA_type mmioRenameA_orig;
 172mmioRenameW_type mmioRenameW_orig;
 173mmioClose_type mmioClose_orig;
 174mmioRead_type mmioRead_orig;
 175mmioWrite_type mmioWrite_orig;
 176mmioSeek_type mmioSeek_orig;
 177mmioGetInfo_type mmioGetInfo_orig;
 178mmioSetInfo_type mmioSetInfo_orig;
 179mmioSetBuffer_type mmioSetBuffer_orig;
 180mmioFlush_type mmioFlush_orig;
 181mmioAdvance_type mmioAdvance_orig;
 182mmioSendMessage_type mmioSendMessage_orig;
 183mmioDescend_type mmioDescend_orig;
 184mmioAscend_type mmioAscend_orig;
 185mmioCreateChunk_type mmioCreateChunk_orig;
 186mciSendCommandA_type mciSendCommandA_orig;
 187mciSendCommandW_type mciSendCommandW_orig;
 188mciSendStringA_type mciSendStringA_orig;
 189mciSendStringW_type mciSendStringW_orig;
 190mciGetDeviceIDA_type mciGetDeviceIDA_orig;
 191mciGetDeviceIDW_type mciGetDeviceIDW_orig;
 192mciGetDeviceIDFromElementIDA_type mciGetDeviceIDFromElementIDA_orig;
 193mciGetDeviceIDFromElementIDW_type mciGetDeviceIDFromElementIDW_orig;
 194mciGetDriverData_type mciGetDriverData_orig;
 195mciGetErrorStringA_type mciGetErrorStringA_orig;
 196mciGetErrorStringW_type mciGetErrorStringW_orig;
 197mciSetDriverData_type mciSetDriverData_orig;
 198mciDriverNotify_type mciDriverNotify_orig;
 199mciDriverYield_type mciDriverYield_orig;
 200mciSetYieldProc_type mciSetYieldProc_orig;
 201mciFreeCommandResource_type mciFreeCommandResource_orig;
 202mciGetCreatorTask_type mciGetCreatorTask_orig;
 203mciGetYieldProc_type mciGetYieldProc_orig;
 204mciLoadCommandResource_type mciLoadCommandResource_orig;
 205mciExecute_type mciExecute_orig;
 206
 207// grab pointers to function calls in the real DLL
 208void init_function_pointers(HMODULE winmm_handle)
 209{	
 210	CloseDriver_orig = (CloseDriver_type)::GetProcAddress(winmm_handle, "CloseDriver");
 211	OpenDriver_orig = (OpenDriver_type)::GetProcAddress(winmm_handle, "OpenDriver");
 212	SendDriverMessage_orig = (SendDriverMessage_type)::GetProcAddress(winmm_handle, "SendDriverMessage");
 213	DrvGetModuleHandle_orig = (DrvGetModuleHandle_type)::GetProcAddress(winmm_handle, "DrvGetModuleHandle");
 214	GetDriverModuleHandle_orig = (GetDriverModuleHandle_type)::GetProcAddress(winmm_handle, "GetDriverModuleHandle");
 215	DefDriverProc_orig = (DefDriverProc_type)::GetProcAddress(winmm_handle, "DefDriverProc");
 216	DriverCallback_orig = (DriverCallback_type)::GetProcAddress(winmm_handle, "DriverCallback");
 217	mmsystemGetVersion_orig = (mmsystemGetVersion_type)::GetProcAddress(winmm_handle, "mmsystemGetVersion");
 218	sndPlaySoundA_orig = (sndPlaySoundA_type)::GetProcAddress(winmm_handle, "sndPlaySoundA");
 219	sndPlaySoundW_orig = (sndPlaySoundW_type)::GetProcAddress(winmm_handle, "sndPlaySoundW");
 220	PlaySoundA_orig = (PlaySoundA_type)::GetProcAddress(winmm_handle, "PlaySoundA");
 221	PlaySoundW_orig = (PlaySoundW_type)::GetProcAddress(winmm_handle, "PlaySoundW");
 222	waveOutGetNumDevs_orig = (waveOutGetNumDevs_type)::GetProcAddress(winmm_handle, "waveOutGetNumDevs");
 223	waveOutGetDevCapsA_orig = (waveOutGetDevCapsA_type)::GetProcAddress(winmm_handle, "waveOutGetDevCapsA");
 224	waveOutGetDevCapsW_orig = (waveOutGetDevCapsW_type)::GetProcAddress(winmm_handle, "waveOutGetDevCapsW");
 225	waveOutGetVolume_orig = (waveOutGetVolume_type)::GetProcAddress(winmm_handle, "waveOutGetVolume");
 226	waveOutSetVolume_orig = (waveOutSetVolume_type)::GetProcAddress(winmm_handle, "waveOutSetVolume");
 227	waveOutGetErrorTextA_orig = (waveOutGetErrorTextA_type)::GetProcAddress(winmm_handle, "waveOutGetErrorTextA");
 228	waveOutGetErrorTextW_orig = (waveOutGetErrorTextW_type)::GetProcAddress(winmm_handle, "waveOutGetErrorTextW");
 229	waveOutOpen_orig = (waveOutOpen_type)::GetProcAddress(winmm_handle, "waveOutOpen");
 230	waveOutClose_orig = (waveOutClose_type)::GetProcAddress(winmm_handle, "waveOutClose");
 231	waveOutPrepareHeader_orig = (waveOutPrepareHeader_type)::GetProcAddress(winmm_handle, "waveOutPrepareHeader");
 232	waveOutUnprepareHeader_orig = (waveOutUnprepareHeader_type)::GetProcAddress(winmm_handle, "waveOutUnprepareHeader");
 233	waveOutWrite_orig = (waveOutWrite_type)::GetProcAddress(winmm_handle, "waveOutWrite");
 234	waveOutPause_orig = (waveOutPause_type)::GetProcAddress(winmm_handle, "waveOutPause");
 235	waveOutRestart_orig = (waveOutRestart_type)::GetProcAddress(winmm_handle, "waveOutRestart");
 236	waveOutReset_orig = (waveOutReset_type)::GetProcAddress(winmm_handle, "waveOutReset");
 237	waveOutBreakLoop_orig = (waveOutBreakLoop_type)::GetProcAddress(winmm_handle, "waveOutBreakLoop");
 238	waveOutGetPosition_orig = (waveOutGetPosition_type)::GetProcAddress(winmm_handle, "waveOutGetPosition");
 239	waveOutGetPitch_orig = (waveOutGetPitch_type)::GetProcAddress(winmm_handle, "waveOutGetPitch");
 240	waveOutSetPitch_orig = (waveOutSetPitch_type)::GetProcAddress(winmm_handle, "waveOutSetPitch");
 241	waveOutGetPlaybackRate_orig = (waveOutGetPlaybackRate_type)::GetProcAddress(winmm_handle, "waveOutGetPlaybackRate");
 242	waveOutSetPlaybackRate_orig = (waveOutSetPlaybackRate_type)::GetProcAddress(winmm_handle, "waveOutSetPlaybackRate");
 243	waveOutGetID_orig = (waveOutGetID_type)::GetProcAddress(winmm_handle, "waveOutGetID");
 244	waveOutMessage_orig = (waveOutMessage_type)::GetProcAddress(winmm_handle, "waveOutMessage");
 245	waveInGetNumDevs_orig = (waveInGetNumDevs_type)::GetProcAddress(winmm_handle, "waveInGetNumDevs");
 246	waveInGetDevCapsA_orig = (waveInGetDevCapsA_type)::GetProcAddress(winmm_handle, "waveInGetDevCapsA");
 247	waveInGetDevCapsW_orig = (waveInGetDevCapsW_type)::GetProcAddress(winmm_handle, "waveInGetDevCapsW");
 248	waveInGetErrorTextA_orig = (waveInGetErrorTextA_type)::GetProcAddress(winmm_handle, "waveInGetErrorTextA");
 249	waveInGetErrorTextW_orig = (waveInGetErrorTextW_type)::GetProcAddress(winmm_handle, "waveInGetErrorTextW");
 250	waveInOpen_orig = (waveInOpen_type)::GetProcAddress(winmm_handle, "waveInOpen");
 251	waveInClose_orig = (waveInClose_type)::GetProcAddress(winmm_handle, "waveInClose");
 252	waveInPrepareHeader_orig = (waveInPrepareHeader_type)::GetProcAddress(winmm_handle, "waveInPrepareHeader");
 253	waveInUnprepareHeader_orig = (waveInUnprepareHeader_type)::GetProcAddress(winmm_handle, "waveInUnprepareHeader");
 254	waveInAddBuffer_orig = (waveInAddBuffer_type)::GetProcAddress(winmm_handle, "waveInAddBuffer");
 255	waveInStart_orig = (waveInStart_type)::GetProcAddress(winmm_handle, "waveInStart");
 256	waveInStop_orig = (waveInStop_type)::GetProcAddress(winmm_handle, "waveInStop");
 257	waveInReset_orig = (waveInReset_type)::GetProcAddress(winmm_handle, "waveInReset");
 258	waveInGetPosition_orig = (waveInGetPosition_type)::GetProcAddress(winmm_handle, "waveInGetPosition");
 259	waveInGetID_orig = (waveInGetID_type)::GetProcAddress(winmm_handle, "waveInGetID");
 260	waveInMessage_orig = (waveInMessage_type)::GetProcAddress(winmm_handle, "waveInMessage");
 261	midiOutGetNumDevs_orig = (midiOutGetNumDevs_type)::GetProcAddress(winmm_handle, "midiOutGetNumDevs");
 262	midiStreamOpen_orig = (midiStreamOpen_type)::GetProcAddress(winmm_handle, "midiStreamOpen");
 263	midiStreamClose_orig = (midiStreamClose_type)::GetProcAddress(winmm_handle, "midiStreamClose");
 264	midiStreamProperty_orig = (midiStreamProperty_type)::GetProcAddress(winmm_handle, "midiStreamProperty");
 265	midiStreamPosition_orig = (midiStreamPosition_type)::GetProcAddress(winmm_handle, "midiStreamPosition");
 266	midiStreamOut_orig = (midiStreamOut_type)::GetProcAddress(winmm_handle, "midiStreamOut");
 267	midiStreamPause_orig = (midiStreamPause_type)::GetProcAddress(winmm_handle, "midiStreamPause");
 268	midiStreamRestart_orig = (midiStreamRestart_type)::GetProcAddress(winmm_handle, "midiStreamRestart");
 269	midiStreamStop_orig = (midiStreamStop_type)::GetProcAddress(winmm_handle, "midiStreamStop");
 270	midiConnect_orig = (midiConnect_type)::GetProcAddress(winmm_handle, "midiConnect");
 271	midiDisconnect_orig = (midiDisconnect_type)::GetProcAddress(winmm_handle, "midiDisconnect");
 272	midiOutGetDevCapsA_orig = (midiOutGetDevCapsA_type)::GetProcAddress(winmm_handle, "midiOutGetDevCapsA");
 273	midiOutGetDevCapsW_orig = (midiOutGetDevCapsW_type)::GetProcAddress(winmm_handle, "midiOutGetDevCapsW");
 274	midiOutGetVolume_orig = (midiOutGetVolume_type)::GetProcAddress(winmm_handle, "midiOutGetVolume");
 275	midiOutSetVolume_orig = (midiOutSetVolume_type)::GetProcAddress(winmm_handle, "midiOutSetVolume");
 276	midiOutGetErrorTextA_orig = (midiOutGetErrorTextA_type)::GetProcAddress(winmm_handle, "midiOutGetErrorTextA");
 277	midiOutGetErrorTextW_orig = (midiOutGetErrorTextW_type)::GetProcAddress(winmm_handle, "midiOutGetErrorTextW");
 278	midiOutOpen_orig = (midiOutOpen_type)::GetProcAddress(winmm_handle, "midiOutOpen");
 279	midiOutClose_orig = (midiOutClose_type)::GetProcAddress(winmm_handle, "midiOutClose");
 280	midiOutPrepareHeader_orig = (midiOutPrepareHeader_type)::GetProcAddress(winmm_handle, "midiOutPrepareHeader");
 281	midiOutUnprepareHeader_orig = (midiOutUnprepareHeader_type)::GetProcAddress(winmm_handle, "midiOutUnprepareHeader");
 282	midiOutShortMsg_orig = (midiOutShortMsg_type)::GetProcAddress(winmm_handle, "midiOutShortMsg");
 283	midiOutLongMsg_orig = (midiOutLongMsg_type)::GetProcAddress(winmm_handle, "midiOutLongMsg");
 284	midiOutReset_orig = (midiOutReset_type)::GetProcAddress(winmm_handle, "midiOutReset");
 285	midiOutCachePatches_orig = (midiOutCachePatches_type)::GetProcAddress(winmm_handle, "midiOutCachePatches");
 286	midiOutCacheDrumPatches_orig = (midiOutCacheDrumPatches_type)::GetProcAddress(winmm_handle, "midiOutCacheDrumPatches");
 287	midiOutGetID_orig = (midiOutGetID_type)::GetProcAddress(winmm_handle, "midiOutGetID");
 288	midiOutMessage_orig = (midiOutMessage_type)::GetProcAddress(winmm_handle, "midiOutMessage");
 289	midiInGetNumDevs_orig = (midiInGetNumDevs_type)::GetProcAddress(winmm_handle, "midiInGetNumDevs");
 290	midiInGetDevCapsA_orig = (midiInGetDevCapsA_type)::GetProcAddress(winmm_handle, "midiInGetDevCapsA");
 291	midiInGetDevCapsW_orig = (midiInGetDevCapsW_type)::GetProcAddress(winmm_handle, "midiInGetDevCapsW");
 292	midiInGetErrorTextA_orig = (midiInGetErrorTextA_type)::GetProcAddress(winmm_handle, "midiInGetErrorTextA");
 293	midiInGetErrorTextW_orig = (midiInGetErrorTextW_type)::GetProcAddress(winmm_handle, "midiInGetErrorTextW");
 294	midiInOpen_orig = (midiInOpen_type)::GetProcAddress(winmm_handle, "midiInOpen");
 295	midiInClose_orig = (midiInClose_type)::GetProcAddress(winmm_handle, "midiInClose");
 296	midiInPrepareHeader_orig = (midiInPrepareHeader_type)::GetProcAddress(winmm_handle, "midiInPrepareHeader");
 297	midiInUnprepareHeader_orig = (midiInUnprepareHeader_type)::GetProcAddress(winmm_handle, "midiInUnprepareHeader");
 298	midiInAddBuffer_orig = (midiInAddBuffer_type)::GetProcAddress(winmm_handle, "midiInAddBuffer");
 299	midiInStart_orig = (midiInStart_type)::GetProcAddress(winmm_handle, "midiInStart");
 300	midiInStop_orig = (midiInStop_type)::GetProcAddress(winmm_handle, "midiInStop");
 301	midiInReset_orig = (midiInReset_type)::GetProcAddress(winmm_handle, "midiInReset");
 302	midiInGetID_orig = (midiInGetID_type)::GetProcAddress(winmm_handle, "midiInGetID");
 303	midiInMessage_orig = (midiInMessage_type)::GetProcAddress(winmm_handle, "midiInMessage");
 304	auxGetNumDevs_orig = (auxGetNumDevs_type)::GetProcAddress(winmm_handle, "auxGetNumDevs");
 305	auxGetDevCapsA_orig = (auxGetDevCapsA_type)::GetProcAddress(winmm_handle, "auxGetDevCapsA");
 306	auxGetDevCapsW_orig = (auxGetDevCapsW_type)::GetProcAddress(winmm_handle, "auxGetDevCapsW");
 307	auxSetVolume_orig = (auxSetVolume_type)::GetProcAddress(winmm_handle, "auxSetVolume");
 308	auxGetVolume_orig = (auxGetVolume_type)::GetProcAddress(winmm_handle, "auxGetVolume");
 309	auxOutMessage_orig = (auxOutMessage_type)::GetProcAddress(winmm_handle, "auxOutMessage");
 310	mixerGetNumDevs_orig = (mixerGetNumDevs_type)::GetProcAddress(winmm_handle, "mixerGetNumDevs");
 311	mixerGetDevCapsA_orig = (mixerGetDevCapsA_type)::GetProcAddress(winmm_handle, "mixerGetDevCapsA");
 312	mixerGetDevCapsW_orig = (mixerGetDevCapsW_type)::GetProcAddress(winmm_handle, "mixerGetDevCapsW");
 313	mixerOpen_orig = (mixerOpen_type)::GetProcAddress(winmm_handle, "mixerOpen");
 314	mixerClose_orig = (mixerClose_type)::GetProcAddress(winmm_handle, "mixerClose");
 315	mixerMessage_orig = (mixerMessage_type)::GetProcAddress(winmm_handle, "mixerMessage");
 316	mixerGetLineInfoA_orig = (mixerGetLineInfoA_type)::GetProcAddress(winmm_handle, "mixerGetLineInfoA");
 317	mixerGetLineInfoW_orig = (mixerGetLineInfoW_type)::GetProcAddress(winmm_handle, "mixerGetLineInfoW");
 318	mixerGetID_orig = (mixerGetID_type)::GetProcAddress(winmm_handle, "mixerGetID");
 319	mixerGetLineControlsA_orig = (mixerGetLineControlsA_type)::GetProcAddress(winmm_handle, "mixerGetLineControlsA");
 320	mixerGetLineControlsW_orig = (mixerGetLineControlsW_type)::GetProcAddress(winmm_handle, "mixerGetLineControlsW");
 321	mixerGetControlDetailsA_orig = (mixerGetControlDetailsA_type)::GetProcAddress(winmm_handle, "mixerGetControlDetailsA");
 322	mixerGetControlDetailsW_orig = (mixerGetControlDetailsW_type)::GetProcAddress(winmm_handle, "mixerGetControlDetailsW");
 323	mixerSetControlDetails_orig = (mixerSetControlDetails_type)::GetProcAddress(winmm_handle, "mixerSetControlDetails");
 324	mmGetCurrentTask_orig = (mmGetCurrentTask_type)::GetProcAddress(winmm_handle, "mmGetCurrentTask");
 325	mmTaskBlock_orig = (mmTaskBlock_type)::GetProcAddress(winmm_handle, "mmTaskBlock");
 326	mmTaskCreate_orig = (mmTaskCreate_type)::GetProcAddress(winmm_handle, "mmTaskCreate");
 327	mmTaskSignal_orig = (mmTaskSignal_type)::GetProcAddress(winmm_handle, "mmTaskSignal");
 328	mmTaskYield_orig = (mmTaskYield_type)::GetProcAddress(winmm_handle, "mmTaskYield");
 329	timeGetSystemTime_orig = (timeGetSystemTime_type)::GetProcAddress(winmm_handle, "timeGetSystemTime");
 330	timeGetTime_orig = (timeGetTime_type)::GetProcAddress(winmm_handle, "timeGetTime");
 331	timeSetEvent_orig = (timeSetEvent_type)::GetProcAddress(winmm_handle, "timeSetEvent");
 332	timeKillEvent_orig = (timeKillEvent_type)::GetProcAddress(winmm_handle, "timeKillEvent");
 333	timeGetDevCaps_orig = (timeGetDevCaps_type)::GetProcAddress(winmm_handle, "timeGetDevCaps");
 334	timeBeginPeriod_orig = (timeBeginPeriod_type)::GetProcAddress(winmm_handle, "timeBeginPeriod");
 335	timeEndPeriod_orig = (timeEndPeriod_type)::GetProcAddress(winmm_handle, "timeEndPeriod");
 336	joyGetNumDevs_orig = (joyGetNumDevs_type)::GetProcAddress(winmm_handle, "joyGetNumDevs");
 337	joyConfigChanged_orig = (joyConfigChanged_type)::GetProcAddress(winmm_handle, "joyConfigChanged");
 338	joyGetDevCapsA_orig = (joyGetDevCapsA_type)::GetProcAddress(winmm_handle, "joyGetDevCapsA");
 339	joyGetDevCapsW_orig = (joyGetDevCapsW_type)::GetProcAddress(winmm_handle, "joyGetDevCapsW");
 340	joyGetPos_orig = (joyGetPos_type)::GetProcAddress(winmm_handle, "joyGetPos");
 341	joyGetPosEx_orig = (joyGetPosEx_type)::GetProcAddress(winmm_handle, "joyGetPosEx");
 342	joyGetThreshold_orig = (joyGetThreshold_type)::GetProcAddress(winmm_handle, "joyGetThreshold");
 343	joyReleaseCapture_orig = (joyReleaseCapture_type)::GetProcAddress(winmm_handle, "joyReleaseCapture");
 344	joySetCapture_orig = (joySetCapture_type)::GetProcAddress(winmm_handle, "joySetCapture");
 345	joySetThreshold_orig = (joySetThreshold_type)::GetProcAddress(winmm_handle, "joySetThreshold");
 346	mciDriverNotify_orig = (mciDriverNotify_type)::GetProcAddress(winmm_handle, "mciDriverNotify");
 347	mciDriverYield_orig = (mciDriverYield_type)::GetProcAddress(winmm_handle, "mciDriverYield");
 348	mmioStringToFOURCCA_orig = (mmioStringToFOURCCA_type)::GetProcAddress(winmm_handle, "mmioStringToFOURCCA");
 349	mmioStringToFOURCCW_orig = (mmioStringToFOURCCW_type)::GetProcAddress(winmm_handle, "mmioStringToFOURCCW");
 350	mmioInstallIOProcA_orig = (mmioInstallIOProcA_type)::GetProcAddress(winmm_handle, "mmioInstallIOProcA");
 351	mmioInstallIOProcW_orig = (mmioInstallIOProcW_type)::GetProcAddress(winmm_handle, "mmioInstallIOProcW");
 352	mmioOpenA_orig = (mmioOpenA_type)::GetProcAddress(winmm_handle, "mmioOpenA");
 353	mmioOpenW_orig = (mmioOpenW_type)::GetProcAddress(winmm_handle, "mmioOpenW");
 354	mmioRenameA_orig = (mmioRenameA_type)::GetProcAddress(winmm_handle, "mmioRenameA");
 355	mmioRenameW_orig = (mmioRenameW_type)::GetProcAddress(winmm_handle, "mmioRenameW");
 356	mmioClose_orig = (mmioClose_type)::GetProcAddress(winmm_handle, "mmioClose");
 357	mmioRead_orig = (mmioRead_type)::GetProcAddress(winmm_handle, "mmioRead");
 358	mmioWrite_orig = (mmioWrite_type)::GetProcAddress(winmm_handle, "mmioWrite");
 359	mmioSeek_orig = (mmioSeek_type)::GetProcAddress(winmm_handle, "mmioSeek");
 360	mmioGetInfo_orig = (mmioGetInfo_type)::GetProcAddress(winmm_handle, "mmioGetInfo");
 361	mmioSetInfo_orig = (mmioSetInfo_type)::GetProcAddress(winmm_handle, "mmioSetInfo");
 362	mmioSetBuffer_orig = (mmioSetBuffer_type)::GetProcAddress(winmm_handle, "mmioSetBuffer");
 363	mmioFlush_orig = (mmioFlush_type)::GetProcAddress(winmm_handle, "mmioFlush");
 364	mmioAdvance_orig = (mmioAdvance_type)::GetProcAddress(winmm_handle, "mmioAdvance");
 365	mmioSendMessage_orig = (mmioSendMessage_type)::GetProcAddress(winmm_handle, "mmioSendMessage");
 366	mmioDescend_orig = (mmioDescend_type)::GetProcAddress(winmm_handle, "mmioDescend");
 367	mmioAscend_orig = (mmioAscend_type)::GetProcAddress(winmm_handle, "mmioAscend");
 368	mmioCreateChunk_orig = (mmioCreateChunk_type)::GetProcAddress(winmm_handle, "mmioCreateChunk");
 369	mciSendCommandA_orig = (mciSendCommandA_type)::GetProcAddress(winmm_handle, "mciSendCommandA");
 370	mciSendCommandW_orig = (mciSendCommandW_type)::GetProcAddress(winmm_handle, "mciSendCommandW");
 371	mciSendStringA_orig = (mciSendStringA_type)::GetProcAddress(winmm_handle, "mciSendStringA");
 372	mciSendStringW_orig = (mciSendStringW_type)::GetProcAddress(winmm_handle, "mciSendStringW");
 373	mciGetDeviceIDA_orig = (mciGetDeviceIDA_type)::GetProcAddress(winmm_handle, "mciGetDeviceIDA");
 374	mciGetDeviceIDW_orig = (mciGetDeviceIDW_type)::GetProcAddress(winmm_handle, "mciGetDeviceIDW");
 375	mciGetDeviceIDFromElementIDA_orig = (mciGetDeviceIDFromElementIDA_type)::GetProcAddress(winmm_handle, "mciGetDeviceIDFromElementIDA");
 376	mciGetDeviceIDFromElementIDW_orig = (mciGetDeviceIDFromElementIDW_type)::GetProcAddress(winmm_handle, "mciGetDeviceIDFromElementIDW");
 377	mciGetDriverData_orig = (mciGetDriverData_type)::GetProcAddress(winmm_handle, "mciGetDriverData");
 378	mciGetErrorStringA_orig = (mciGetErrorStringA_type)::GetProcAddress(winmm_handle, "mciGetErrorStringA");
 379	mciGetErrorStringW_orig = (mciGetErrorStringW_type)::GetProcAddress(winmm_handle, "mciGetErrorStringW");
 380	mciSetDriverData_orig = (mciSetDriverData_type)::GetProcAddress(winmm_handle, "mciSetDriverData");
 381	mciSetYieldProc_orig = (mciSetYieldProc_type)::GetProcAddress(winmm_handle, "mciSetYieldProc");
 382	mciFreeCommandResource_orig = (mciFreeCommandResource_type)::GetProcAddress(winmm_handle, "mciFreeCommandResource");
 383	mciGetCreatorTask_orig = (mciGetCreatorTask_type)::GetProcAddress(winmm_handle, "mciGetCreatorTask");
 384	mciGetYieldProc_orig = (mciGetYieldProc_type)::GetProcAddress(winmm_handle, "mciGetYieldProc");
 385	mciLoadCommandResource_orig = (mciLoadCommandResource_type)::GetProcAddress(winmm_handle, "mciLoadCommandResource");
 386	mciExecute_orig = (mciExecute_type)::GetProcAddress(winmm_handle, "mciExecute");
 387}
 388
 389extern "C" {
 390	LRESULT   WINAPI CloseDriver( HDRVR hDriver, LPARAM lParam1, LPARAM lParam2)
 391	{
 392		ll_winmm_shim_initialize();
 393		//OutputDebugString(L"CloseDriver\n");
 394		return CloseDriver_orig( hDriver, lParam1, lParam2);
 395	}
 396
 397	HDRVR     WINAPI OpenDriver( LPCWSTR szDriverName, LPCWSTR szSectionName, LPARAM lParam2)
 398	{
 399		ll_winmm_shim_initialize();
 400		//OutputDebugString(L"OpenDriver\n");
 401		return OpenDriver_orig( szDriverName, szSectionName, lParam2);
 402	}
 403
 404	LRESULT   WINAPI SendDriverMessage( HDRVR hDriver, UINT message, LPARAM lParam1, LPARAM lParam2)
 405	{
 406		ll_winmm_shim_initialize();
 407		//OutputDebugString(L"SendDriverMessage\n");
 408		return SendDriverMessage_orig( hDriver, message, lParam1, lParam2);
 409	}
 410
 411	HMODULE   WINAPI DrvGetModuleHandle( HDRVR hDriver)
 412	{
 413		ll_winmm_shim_initialize();
 414		//OutputDebugString(L"DrvGetModuleHandle\n");
 415		return DrvGetModuleHandle_orig( hDriver);
 416	}
 417
 418	HMODULE   WINAPI GetDriverModuleHandle( HDRVR hDriver)
 419	{
 420		ll_winmm_shim_initialize();
 421		//OutputDebugString(L"GetDriverModuleHandle\n");
 422		return GetDriverModuleHandle_orig( hDriver);
 423	}
 424
 425	LRESULT   WINAPI DefDriverProc( DWORD_PTR dwDriverIdentifier, HDRVR hdrvr, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
 426	{
 427		ll_winmm_shim_initialize();
 428		//OutputDebugString(L"DefDriverProc\n");
 429		return DefDriverProc_orig( dwDriverIdentifier, hdrvr, uMsg, lParam1, lParam2);
 430	}
 431
 432	BOOL WINAPI DriverCallback( DWORD dwCallBack, DWORD dwFlags, HDRVR hdrvr, DWORD msg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2)
 433	{
 434		ll_winmm_shim_initialize();
 435		//OutputDebugString(L"DriverCallback\n");
 436		return DriverCallback_orig(dwCallBack, dwFlags, hdrvr, msg, dwUser, dwParam1, dwParam2);
 437	}
 438
 439	UINT WINAPI mmsystemGetVersion(void)
 440	{
 441		ll_winmm_shim_initialize();
 442		//OutputDebugString(L"mmsystemGetVersion\n");
 443		return mmsystemGetVersion_orig();
 444	}
 445
 446	BOOL WINAPI sndPlaySoundA( LPCSTR pszSound, UINT fuSound)
 447	{
 448		ll_winmm_shim_initialize();
 449		//OutputDebugString(L"sndPlaySoundA\n");
 450		return sndPlaySoundA_orig( pszSound, fuSound);
 451	}
 452
 453	BOOL WINAPI sndPlaySoundW( LPCWSTR pszSound, UINT fuSound)
 454	{
 455		ll_winmm_shim_initialize();
 456		//OutputDebugString(L"sndPlaySoundW\n");
 457		return sndPlaySoundW_orig( pszSound, fuSound);
 458	}
 459
 460	BOOL WINAPI PlaySoundA( LPCSTR pszSound, HMODULE hmod, DWORD fdwSound)
 461	{
 462		ll_winmm_shim_initialize();
 463		//OutputDebugString(L"PlaySoundA\n");
 464		return PlaySoundA_orig( pszSound, hmod, fdwSound);
 465	}
 466
 467	BOOL WINAPI PlaySoundW( LPCWSTR pszSound, HMODULE hmod, DWORD fdwSound)
 468	{
 469		ll_winmm_shim_initialize();
 470		//OutputDebugString(L"PlaySoundW\n");
 471		return PlaySoundW_orig( pszSound, hmod, fdwSound);
 472	}
 473
 474	UINT WINAPI waveOutGetNumDevs(void)
 475	{
 476		ll_winmm_shim_initialize();
 477		//OutputDebugString(L"waveOutGetNumDevs\n");
 478		return waveOutGetNumDevs_orig();
 479	}
 480
 481	MMRESULT WINAPI waveOutGetDevCapsA( UINT_PTR uDeviceID, LPWAVEOUTCAPSA pwoc, UINT cbwoc)
 482	{
 483		ll_winmm_shim_initialize();
 484		//OutputDebugString(L"waveOutGetDevCapsA\n");
 485		return waveOutGetDevCapsA_orig( uDeviceID, pwoc, cbwoc);
 486	}
 487
 488	MMRESULT WINAPI waveOutGetDevCapsW( UINT_PTR uDeviceID, LPWAVEOUTCAPSW pwoc, UINT cbwoc)
 489	{
 490		ll_winmm_shim_initialize();
 491		//OutputDebugString(L"waveOutGetDevCapsW\n");
 492		return waveOutGetDevCapsW_orig( uDeviceID, pwoc, cbwoc);
 493	}
 494
 495
 496	MMRESULT WINAPI waveOutGetVolume( HWAVEOUT hwo, LPDWORD pdwVolume)
 497	{
 498		ll_winmm_shim_initialize();
 499		//OutputDebugString(L"waveOutGetVolume\n");
 500		return waveOutGetVolume_orig( hwo, pdwVolume);
 501	}
 502
 503	MMRESULT WINAPI waveOutSetVolume( HWAVEOUT hwo, DWORD dwVolume)
 504	{
 505		ll_winmm_shim_initialize();
 506		//OutputDebugString(L"waveOutSetVolume\n");
 507		return waveOutSetVolume_orig( hwo, dwVolume);
 508	}
 509
 510	MMRESULT WINAPI waveOutGetErrorTextA( MMRESULT mmrError, LPSTR pszText, UINT cchText)
 511	{
 512		ll_winmm_shim_initialize();
 513		//OutputDebugString(L"waveOutGetErrorTextA\n");
 514		return waveOutGetErrorTextA_orig( mmrError, pszText, cchText);
 515	}
 516
 517	MMRESULT WINAPI waveOutGetErrorTextW( MMRESULT mmrError, LPWSTR pszText, UINT cchText)
 518	{
 519		ll_winmm_shim_initialize();
 520		//OutputDebugString(L"waveOutGetErrorTextW\n");
 521		return waveOutGetErrorTextW_orig( mmrError, pszText, cchText);
 522	}
 523
 524	//MMRESULT WINAPI waveOutOpen( LPHWAVEOUT phwo, UINT uDeviceID, LPCWAVEFORMATEX pwfx, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen)
 525	//{
 526	//	//OutputDebugString(L"waveOutGetErrorTextW\n");
 527	//	return waveOutOpen_orig( phwo, uDeviceID, pwfx, dwCallback, dwInstance, fdwOpen);
 528	//}
 529
 530	//MMRESULT WINAPI waveOutClose( HWAVEOUT hwo)
 531	//{
 532	//	//OutputDebugString(L"waveOutGetErrorTextW\n");
 533	//	return waveOutClose_orig( hwo );
 534	//}
 535
 536	MMRESULT WINAPI waveOutPrepareHeader( HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh)
 537	{
 538		ll_winmm_shim_initialize();
 539		//OutputDebugString(L"waveOutPrepareHeader\n");
 540		return waveOutPrepareHeader_orig( hwo, pwh, cbwh);
 541	}
 542
 543	MMRESULT WINAPI waveOutUnprepareHeader( HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh)
 544	{
 545		ll_winmm_shim_initialize();
 546		//OutputDebugString(L"waveOutUnprepareHeader\n");
 547		return waveOutUnprepareHeader_orig( hwo, pwh, cbwh);
 548	}
 549
 550
 551	//MMRESULT WINAPI waveOutWrite( HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh)
 552	//{
 553	//	//OutputDebugString(L"waveOutUnprepareHeader\n");
 554	//	return waveOutWrite_orig( hwo, pwh, cbwh);
 555	//}
 556
 557	MMRESULT WINAPI waveOutPause( HWAVEOUT hwo)
 558	{
 559		ll_winmm_shim_initialize();
 560		//OutputDebugString(L"waveOutPause\n");
 561		return waveOutPause_orig( hwo);
 562	}
 563
 564	MMRESULT WINAPI waveOutRestart( HWAVEOUT hwo)
 565	{
 566		ll_winmm_shim_initialize();
 567		//OutputDebugString(L"waveOutRestart\n");
 568		return waveOutRestart_orig( hwo);
 569	}
 570
 571	MMRESULT WINAPI waveOutReset( HWAVEOUT hwo)
 572	{
 573		ll_winmm_shim_initialize();
 574		//OutputDebugString(L"waveOutReset\n");
 575		return waveOutReset_orig( hwo);
 576	}
 577
 578	MMRESULT WINAPI waveOutBreakLoop( HWAVEOUT hwo)
 579	{
 580		ll_winmm_shim_initialize();
 581		//OutputDebugString(L"waveOutBreakLoop\n");
 582		return waveOutBreakLoop_orig( hwo);
 583	}
 584
 585	MMRESULT WINAPI waveOutGetPosition( HWAVEOUT hwo, LPMMTIME pmmt, UINT cbmmt)
 586	{
 587		ll_winmm_shim_initialize();
 588		//OutputDebugString(L"waveOutGetPosition\n");
 589		return waveOutGetPosition_orig( hwo, pmmt, cbmmt);
 590	}
 591
 592	MMRESULT WINAPI waveOutGetPitch( HWAVEOUT hwo, LPDWORD pdwPitch)
 593	{
 594		ll_winmm_shim_initialize();
 595		//OutputDebugString(L"waveOutGetPitch\n");
 596		return waveOutGetPitch_orig( hwo, pdwPitch);
 597	}
 598
 599	MMRESULT WINAPI waveOutSetPitch( HWAVEOUT hwo, DWORD dwPitch)
 600	{
 601		ll_winmm_shim_initialize();
 602		//OutputDebugString(L"waveOutSetPitch\n");
 603		return waveOutSetPitch_orig( hwo, dwPitch);
 604	}
 605
 606	MMRESULT WINAPI waveOutGetPlaybackRate( HWAVEOUT hwo, LPDWORD pdwRate)
 607	{
 608		ll_winmm_shim_initialize();
 609		//OutputDebugString(L"waveOutGetPlaybackRate\n");
 610		return waveOutGetPlaybackRate_orig( hwo, pdwRate);
 611	}
 612
 613	MMRESULT WINAPI waveOutSetPlaybackRate( HWAVEOUT hwo, DWORD dwRate)
 614	{
 615		ll_winmm_shim_initialize();
 616		//OutputDebugString(L"waveOutSetPlaybackRate\n");
 617		return waveOutSetPlaybackRate_orig( hwo, dwRate);
 618	}
 619
 620	MMRESULT WINAPI waveOutGetID( HWAVEOUT hwo, LPUINT puDeviceID)
 621	{
 622		ll_winmm_shim_initialize();
 623		//OutputDebugString(L"waveOutGetID\n");
 624		return waveOutGetID_orig( hwo, puDeviceID);
 625	}
 626
 627	MMRESULT WINAPI waveOutMessage( HWAVEOUT hwo, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2)
 628	{
 629		ll_winmm_shim_initialize();
 630		//OutputDebugString(L"waveOutMessage\n");
 631		return waveOutMessage_orig( hwo, uMsg, dw1, dw2);
 632	}
 633
 634	UINT WINAPI waveInGetNumDevs(void)
 635	{
 636		ll_winmm_shim_initialize();
 637		//OutputDebugString(L"waveInGetNumDevs\n");
 638		return waveInGetNumDevs_orig();
 639	}
 640
 641	MMRESULT WINAPI waveInGetDevCapsA( UINT_PTR uDeviceID, LPWAVEINCAPSA pwic, UINT cbwic)
 642	{
 643		ll_winmm_shim_initialize();
 644		//OutputDebugString(L"waveInGetDevCapsA\n");
 645		return waveInGetDevCapsA_orig( uDeviceID, pwic, cbwic);
 646	}
 647
 648	MMRESULT WINAPI waveInGetDevCapsW( UINT_PTR uDeviceID, LPWAVEINCAPSW pwic, UINT cbwic)
 649	{
 650		ll_winmm_shim_initialize();
 651		//OutputDebugString(L"waveInGetDevCapsW\n");
 652		return waveInGetDevCapsW_orig( uDeviceID, pwic, cbwic);
 653	}
 654
 655	MMRESULT WINAPI waveInGetErrorTextA(MMRESULT mmrError, LPSTR pszText, UINT cchText)
 656	{
 657		ll_winmm_shim_initialize();
 658		//OutputDebugString(L"waveInGetErrorTextA\n");
 659		return waveInGetErrorTextA_orig(mmrError, pszText, cchText);
 660	}
 661
 662	MMRESULT WINAPI waveInGetErrorTextW(MMRESULT mmrError, LPWSTR pszText, UINT cchText)
 663	{
 664		ll_winmm_shim_initialize();
 665		//OutputDebugString(L"waveInGetErrorTextW\n");
 666		return waveInGetErrorTextW_orig(mmrError, pszText, cchText);
 667	}
 668
 669	MMRESULT WINAPI waveInOpen( LPHWAVEIN phwi, UINT uDeviceID, LPCWAVEFORMATEX pwfx, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen)
 670	{
 671		ll_winmm_shim_initialize();
 672		//OutputDebugString(L"waveInOpen\n");
 673		return waveInOpen_orig(phwi, uDeviceID, pwfx, dwCallback, dwInstance, fdwOpen);
 674	}
 675
 676	MMRESULT WINAPI waveInClose( HWAVEIN hwi)
 677	{
 678		ll_winmm_shim_initialize();
 679		//OutputDebugString(L"waveInClose\n");
 680		return waveInClose_orig( hwi);
 681	}
 682
 683	MMRESULT WINAPI waveInPrepareHeader( HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh)
 684	{
 685		ll_winmm_shim_initialize();
 686		//OutputDebugString(L"waveInPrepareHeader\n");
 687		return waveInPrepareHeader_orig( hwi, pwh, cbwh);
 688	}
 689
 690	MMRESULT WINAPI waveInUnprepareHeader( HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh)
 691	{
 692		ll_winmm_shim_initialize();
 693		//OutputDebugString(L"waveInUnprepareHeader\n");
 694		return waveInUnprepareHeader_orig( hwi, pwh, cbwh);
 695	}
 696
 697	MMRESULT WINAPI waveInAddBuffer( HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh)
 698	{
 699		ll_winmm_shim_initialize();
 700		//OutputDebugString(L"waveInAddBuffer\n");
 701		return waveInAddBuffer_orig( hwi, pwh, cbwh);
 702	}
 703
 704	MMRESULT WINAPI waveInStart( HWAVEIN hwi)
 705	{
 706		ll_winmm_shim_initialize();
 707		//OutputDebugString(L"waveInStart\n");
 708		return waveInStart_orig( hwi);
 709	}
 710
 711	MMRESULT WINAPI waveInStop( HWAVEIN hwi)
 712	{
 713		ll_winmm_shim_initialize();
 714		//OutputDebugString(L"waveInStop\n");
 715		return waveInStop_orig(hwi);
 716	}
 717
 718	MMRESULT WINAPI waveInReset( HWAVEIN hwi)
 719	{
 720		ll_winmm_shim_initialize();
 721		//OutputDebugString(L"waveInReset\n");
 722		return waveInReset_orig(hwi);
 723	}
 724
 725	MMRESULT WINAPI waveInGetPosition( HWAVEIN hwi, LPMMTIME pmmt, UINT cbmmt)
 726	{
 727		ll_winmm_shim_initialize();
 728		//OutputDebugString(L"waveInGetPosition\n");
 729		return waveInGetPosition_orig( hwi, pmmt, cbmmt);
 730	}
 731
 732	MMRESULT WINAPI waveInGetID( HWAVEIN hwi, LPUINT puDeviceID)
 733	{
 734		ll_winmm_shim_initialize();
 735		//OutputDebugString(L"waveInGetID\n");
 736		return waveInGetID_orig( hwi, puDeviceID);
 737	}
 738
 739	MMRESULT WINAPI waveInMessage( HWAVEIN hwi, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2)
 740	{
 741		ll_winmm_shim_initialize();
 742		//OutputDebugString(L"waveInMessage\n");
 743		return waveInMessage_orig( hwi, uMsg, dw1, dw2);
 744	}
 745
 746	UINT WINAPI midiOutGetNumDevs(void)
 747	{
 748		ll_winmm_shim_initialize();
 749		//OutputDebugString(L"midiOutGetNumDevs\n");
 750		return midiOutGetNumDevs_orig();
 751	}
 752
 753	MMRESULT WINAPI midiStreamOpen( LPHMIDISTRM phms, LPUINT puDeviceID, DWORD cMidi, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen)
 754	{
 755		ll_winmm_shim_initialize();
 756		//OutputDebugString(L"midiStreamOpen\n");
 757		return midiStreamOpen_orig( phms, puDeviceID, cMidi, dwCallback, dwInstance, fdwOpen);
 758	}
 759
 760	MMRESULT WINAPI midiStreamClose( HMIDISTRM hms)
 761	{
 762		ll_winmm_shim_initialize();
 763		//OutputDebugString(L"midiStreamClose\n");
 764		return midiStreamClose_orig( hms);
 765	}
 766
 767	MMRESULT WINAPI midiStreamProperty( HMIDISTRM hms, LPBYTE lppropdata, DWORD dwProperty)
 768	{
 769		ll_winmm_shim_initialize();
 770		//OutputDebugString(L"midiStreamProperty\n");
 771		return midiStreamProperty_orig( hms, lppropdata, dwProperty);
 772	}
 773
 774	MMRESULT WINAPI midiStreamPosition( HMIDISTRM hms, LPMMTIME lpmmt, UINT cbmmt)
 775	{
 776		ll_winmm_shim_initialize();
 777		//OutputDebugString(L"midiStreamPosition\n");
 778		return midiStreamPosition_orig( hms, lpmmt, cbmmt);
 779	}
 780
 781	MMRESULT WINAPI midiStreamOut( HMIDISTRM hms, LPMIDIHDR pmh, UINT cbmh)
 782	{
 783		ll_winmm_shim_initialize();
 784		//OutputDebugString(L"midiStreamOut\n");
 785		return midiStreamOut_orig( hms, pmh, cbmh);
 786	}
 787
 788	MMRESULT WINAPI midiStreamPause( HMIDISTRM hms)
 789	{
 790		ll_winmm_shim_initialize();
 791		//OutputDebugString(L"midiStreamPause\n");
 792		return midiStreamPause_orig( hms);
 793	}
 794
 795	MMRESULT WINAPI midiStreamRestart( HMIDISTRM hms)
 796	{
 797		ll_winmm_shim_initialize();
 798		//OutputDebugString(L"midiStreamRestart\n");
 799		return midiStreamRestart_orig( hms);
 800	}
 801
 802	MMRESULT WINAPI midiStreamStop( HMIDISTRM hms)
 803	{
 804		ll_winmm_shim_initialize();
 805		//OutputDebugString(L"midiStreamStop\n");
 806		return midiStreamStop_orig( hms);
 807	}
 808
 809	MMRESULT WINAPI midiConnect( HMIDI hmi, HMIDIOUT hmo, LPVOID pReserved)
 810	{
 811		ll_winmm_shim_initialize();
 812		//OutputDebugString(L"midiConnect\n");
 813		return midiConnect_orig( hmi, hmo, pReserved);
 814	}
 815
 816	MMRESULT WINAPI midiDisconnect( HMIDI hmi, HMIDIOUT hmo, LPVOID pReserved)
 817	{
 818		ll_winmm_shim_initialize();
 819		//OutputDebugString(L"midiDisconnect\n");
 820		return midiDisconnect_orig( hmi, hmo, pReserved);
 821	}
 822
 823	MMRESULT WINAPI midiOutGetDevCapsA( UINT_PTR uDeviceID, LPMIDIOUTCAPSA pmoc, UINT cbmoc)
 824	{
 825		ll_winmm_shim_initialize();
 826		//OutputDebugString(L"midiOutGetDevCapsA\n");
 827		return midiOutGetDevCapsA_orig( uDeviceID, pmoc, cbmoc);
 828	}
 829
 830	MMRESULT WINAPI midiOutGetDevCapsW( UINT_PTR uDeviceID, LPMIDIOUTCAPSW pmoc, UINT cbmoc)
 831	{
 832		ll_winmm_shim_initialize();
 833		//OutputDebugString(L"midiOutGetDevCapsW\n");
 834		return midiOutGetDevCapsW_orig( uDeviceID, pmoc, cbmoc);
 835	}
 836
 837	MMRESULT WINAPI midiOutGetVolume( HMIDIOUT hmo, LPDWORD pdwVolume)
 838	{
 839		ll_winmm_shim_initialize();
 840		//OutputDebugString(L"midiOutGetVolume\n");
 841		return midiOutGetVolume_orig( hmo, pdwVolume);
 842	}
 843
 844	MMRESULT WINAPI midiOutSetVolume( HMIDIOUT hmo, DWORD dwVolume)
 845	{
 846		ll_winmm_shim_initialize();
 847		//OutputDebugString(L"midiOutSetVolume\n");
 848		return midiOutSetVolume_orig( hmo, dwVolume);
 849	}
 850
 851	MMRESULT WINAPI midiOutGetErrorTextA( MMRESULT mmrError, LPSTR pszText, UINT cchText)
 852	{
 853		ll_winmm_shim_initialize();
 854		//OutputDebugString(L"midiOutGetErrorTextA\n");
 855		return midiOutGetErrorTextA_orig( mmrError, pszText, cchText);
 856	}
 857
 858	MMRESULT WINAPI midiOutGetErrorTextW( MMRESULT mmrError, LPWSTR pszText, UINT cchText)
 859	{
 860		ll_winmm_shim_initialize();
 861		//OutputDebugString(L"midiOutGetErrorTextW\n");
 862		return midiOutGetErrorTextW_orig( mmrError, pszText, cchText);
 863	}
 864
 865	MMRESULT WINAPI midiOutOpen( LPHMIDIOUT phmo, UINT uDeviceID, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen)
 866	{
 867		ll_winmm_shim_initialize();
 868		//OutputDebugString(L"midiOutOpen\n");
 869		return midiOutOpen_orig(phmo, uDeviceID, dwCallback, dwInstance, fdwOpen);
 870	}
 871
 872	MMRESULT WINAPI midiOutClose( HMIDIOUT hmo)
 873	{
 874		ll_winmm_shim_initialize();
 875		//OutputDebugString(L"midiOutClose\n");
 876		return midiOutClose_orig( hmo);
 877	}
 878
 879	MMRESULT WINAPI midiOutPrepareHeader( HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh)
 880	{
 881		ll_winmm_shim_initialize();
 882		//OutputDebugString(L"midiOutPrepareHeader\n");
 883		return midiOutPrepareHeader_orig( hmo, pmh, cbmh);
 884	}
 885
 886	MMRESULT WINAPI midiOutUnprepareHeader(HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh)
 887	{
 888		ll_winmm_shim_initialize();
 889		//OutputDebugString(L"midiOutUnprepareHeader\n");
 890		return midiOutUnprepareHeader_orig(hmo, pmh, cbmh);
 891	}
 892
 893	MMRESULT WINAPI midiOutShortMsg( HMIDIOUT hmo, DWORD dwMsg)
 894	{
 895		ll_winmm_shim_initialize();
 896		//OutputDebugString(L"midiOutShortMsg\n");
 897		return midiOutShortMsg_orig( hmo, dwMsg);
 898	}
 899
 900	MMRESULT WINAPI midiOutLongMsg(HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh)
 901	{
 902		ll_winmm_shim_initialize();
 903		//OutputDebugString(L"midiOutLongMsg\n");
 904		return midiOutLongMsg_orig(hmo, pmh, cbmh);
 905	}
 906
 907	MMRESULT WINAPI midiOutReset( HMIDIOUT hmo)
 908	{
 909		ll_winmm_shim_initialize();
 910		//OutputDebugString(L"midiOutReset\n");
 911		return midiOutReset_orig( hmo);
 912	}
 913
 914	MMRESULT WINAPI midiOutCachePatches( HMIDIOUT hmo, UINT uBank, LPWORD pwpa, UINT fuCache)
 915	{
 916		ll_winmm_shim_initialize();
 917		//OutputDebugString(L"midiOutCachePatches\n");
 918		return midiOutCachePatches_orig( hmo, uBank, pwpa, fuCache);
 919	}
 920
 921	MMRESULT WINAPI midiOutCacheDrumPatches( HMIDIOUT hmo, UINT uPatch, LPWORD pwkya, UINT fuCache)
 922	{
 923		ll_winmm_shim_initialize();
 924		//OutputDebugString(L"midiOutCacheDrumPatches\n");
 925		return midiOutCacheDrumPatches_orig( hmo, uPatch, pwkya, fuCache);
 926	}
 927
 928	MMRESULT WINAPI midiOutGetID( HMIDIOUT hmo, LPUINT puDeviceID)
 929	{
 930		ll_winmm_shim_initialize();
 931		//OutputDebugString(L"midiOutGetID\n");
 932		return midiOutGetID_orig( hmo, puDeviceID);
 933	}
 934
 935	MMRESULT WINAPI midiOutMessage( HMIDIOUT hmo, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2)
 936	{
 937		ll_winmm_shim_initialize();
 938		//OutputDebugString(L"midiOutMessage\n");
 939		return midiOutMessage_orig( hmo, uMsg, dw1, dw2);
 940	}
 941
 942	UINT WINAPI midiInGetNumDevs(void)
 943	{
 944		ll_winmm_shim_initialize();
 945		//OutputDebugString(L"midiInGetNumDevs\n");
 946		return midiInGetNumDevs_orig();
 947	}
 948
 949	MMRESULT WINAPI midiInGetDevCapsA( UINT_PTR uDeviceID, LPMIDIINCAPSA pmic, UINT cbmic)
 950	{
 951		ll_winmm_shim_initialize();
 952		//OutputDebugString(L"midiInGetDevCapsA\n");
 953		return midiInGetDevCapsA_orig( uDeviceID, pmic, cbmic);
 954	}
 955
 956	MMRESULT WINAPI midiInGetDevCapsW( UINT_PTR uDeviceID, LPMIDIINCAPSW pmic, UINT cbmic)
 957	{
 958		ll_winmm_shim_initialize();
 959		//OutputDebugString(L"midiInGetDevCapsW\n");
 960		return midiInGetDevCapsW_orig( uDeviceID, pmic, cbmic);
 961	}
 962
 963	MMRESULT WINAPI midiInGetErrorTextA( MMRESULT mmrError, LPSTR pszText, UINT cchText)
 964	{
 965		ll_winmm_shim_initialize();
 966		//OutputDebugString(L"midiInGetErrorTextA\n");
 967		return midiInGetErrorTextA_orig( mmrError, pszText, cchText);
 968	}
 969
 970	MMRESULT WINAPI midiInGetErrorTextW( MMRESULT mmrError, LPWSTR pszText, UINT cchText)
 971	{
 972		ll_winmm_shim_initialize();
 973		//OutputDebugString(L"midiInGetErrorTextW\n");
 974		return midiInGetErrorTextW_orig( mmrError, pszText, cchText);
 975	}
 976
 977	MMRESULT WINAPI midiInOpen( LPHMIDIIN phmi, UINT uDeviceID, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen)
 978	{
 979		ll_winmm_shim_initialize();
 980		//OutputDebugString(L"midiInOpen\n");
 981		return midiInOpen_orig(phmi, uDeviceID, dwCallback, dwInstance, fdwOpen);
 982	}
 983
 984	MMRESULT WINAPI midiInClose( HMIDIIN hmi)
 985	{
 986		ll_winmm_shim_initialize();
 987		//OutputDebugString(L"midiInClose\n");
 988		return midiInClose_orig( hmi);
 989	}
 990
 991	MMRESULT WINAPI midiInPrepareHeader( HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh)
 992	{
 993		ll_winmm_shim_initialize();
 994		//OutputDebugString(L"midiInPrepareHeader\n");
 995		return midiInPrepareHeader_orig( hmi, pmh, cbmh);
 996	}
 997
 998	MMRESULT WINAPI midiInUnprepareHeader( HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh)
 999	{
1000		ll_winmm_shim_initialize();
1001		//OutputDebugString(L"midiInUnprepareHeader\n");
1002		return midiInUnprepareHeader_orig( hmi, pmh, cbmh);
1003	}
1004
1005	MMRESULT WINAPI midiInAddBuffer( HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh)
1006	{
1007		ll_winmm_shim_initialize();
1008		//OutputDebugString(L"midiInAddBuffer\n");
1009		return midiInAddBuffer_orig( hmi, pmh, cbmh);
1010	}
1011
1012	MMRESULT WINAPI midiInStart( HMIDIIN hmi)
1013	{
1014		ll_winmm_shim_initialize();
1015		//OutputDebugString(L"midiInStart\n");
1016		return midiInStart_orig( hmi);
1017	}
1018
1019	MMRESULT WINAPI midiInStop( HMIDIIN hmi)
1020	{
1021		ll_winmm_shim_initialize();
1022		//OutputDebugString(L"midiInStop\n");
1023		return midiInStop_orig(hmi);
1024	}
1025
1026	MMRESULT WINAPI midiInReset( HMIDIIN hmi)
1027	{
1028		ll_winmm_shim_initialize();
1029		//OutputDebugString(L"midiInReset\n");
1030		return midiInReset_orig( hmi);
1031	}
1032
1033	MMRESULT WINAPI midiInGetID( HMIDIIN hmi, LPUINT puDeviceID)
1034	{
1035		ll_winmm_shim_initialize();
1036		//OutputDebugString(L"midiInGetID\n");
1037		return midiInGetID_orig( hmi, puDeviceID);
1038	}
1039
1040	MMRESULT WINAPI midiInMessage( HMIDIIN hmi, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2)
1041	{
1042		ll_winmm_shim_initialize();
1043		//OutputDebugString(L"midiInMessage\n");
1044		return midiInMessage_orig( hmi, uMsg, dw1, dw2);
1045	}
1046
1047	UINT WINAPI auxGetNumDevs(void)
1048	{
1049		ll_winmm_shim_initialize();
1050		//OutputDebugString(L"auxGetNumDevs\n");
1051		return auxGetNumDevs_orig();
1052	}
1053
1054	MMRESULT WINAPI auxGetDevCapsA( UINT_PTR uDeviceID, LPAUXCAPSA pac, UINT cbac)
1055	{
1056		ll_winmm_shim_initialize();
1057		//OutputDebugString(L"auxGetDevCapsA\n");
1058		return auxGetDevCapsA_orig( uDeviceID, pac, cbac);
1059	}
1060
1061	MMRESULT WINAPI auxGetDevCapsW( UINT_PTR uDeviceID, LPAUXCAPSW pac, UINT cbac)
1062	{
1063		ll_winmm_shim_initialize();
1064		//OutputDebugString(L"auxGetDevCapsW\n");
1065		return auxGetDevCapsW_orig( uDeviceID, pac, cbac);
1066	}
1067
1068	MMRESULT WINAPI auxSetVolume( UINT uDeviceID, DWORD dwVolume)
1069	{
1070		ll_winmm_shim_initialize();
1071		//OutputDebugString(L"auxSetVolume\n");
1072		return auxSetVolume_orig( uDeviceID, dwVolume);
1073	}
1074
1075	MMRESULT WINAPI auxGetVolume( UINT uDeviceID, LPDWORD pdwVolume)
1076	{
1077		ll_winmm_shim_initialize();
1078		//OutputDebugString(L"auxGetVolume\n");
1079		return auxGetVolume_orig( uDeviceID, pdwVolume);
1080	}
1081
1082	MMRESULT WINAPI auxOutMessage( UINT uDeviceID, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2)
1083	{
1084		ll_winmm_shim_initialize();
1085		//OutputDebugString(L"auxOutMessage\n");
1086		return auxOutMessage_orig( uDeviceID, uMsg, dw1, dw2);
1087	}
1088
1089	UINT WINAPI mixerGetNumDevs(void)
1090	{
1091		ll_winmm_shim_initialize();
1092		//OutputDebugString(L"mixerGetNumDevs\n");
1093		return mixerGetNumDevs_orig();
1094	}
1095
1096	MMRESULT WINAPI mixerGetDevCapsA( UINT_PTR uMxId, LPMIXERCAPSA pmxcaps, UINT cbmxcaps)
1097	{
1098		ll_winmm_shim_initialize();
1099		//OutputDebugString(L"mixerGetDevCapsA\n");
1100		return mixerGetDevCapsA_orig( uMxId, pmxcaps, cbmxcaps);
1101	}
1102
1103	MMRESULT WINAPI mixerGetDevCapsW( UINT_PTR uMxId, LPMIXERCAPSW pmxcaps, UINT cbmxcaps)
1104	{
1105		ll_winmm_shim_initialize();
1106		//OutputDebugString(L"mixerGetDevCapsW\n");
1107		return mixerGetDevCapsW_orig( uMxId, pmxcaps, cbmxcaps);
1108	}
1109
1110	MMRESULT WINAPI mixerOpen( LPHMIXER phmx, UINT uMxId, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen)
1111	{
1112		ll_winmm_shim_initialize();
1113		//OutputDebugString(L"mixerOpen\n");
1114		return mixerOpen_orig( phmx, uMxId, dwCallback, dwInstance, fdwOpen);
1115	}
1116
1117	MMRESULT WINAPI mixerClose( HMIXER hmx)
1118	{
1119		ll_winmm_shim_initialize();
1120		//OutputDebugString(L"mixerClose\n");
1121		return mixerClose_orig( hmx);
1122	}
1123
1124	DWORD WINAPI mixerMessage( HMIXER hmx, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
1125	{
1126		ll_winmm_shim_initialize();
1127		//OutputDebugString(L"mixerMessage\n");
1128		return mixerMessage_orig( hmx, uMsg, dwParam1, dwParam2);
1129	}
1130
1131	MMRESULT WINAPI mixerGetLineInfoA( HMIXEROBJ hmxobj, LPMIXERLINEA pmxl, DWORD fdwInfo)
1132	{
1133		ll_winmm_shim_initialize();
1134		//OutputDebugString(L"mixerGetLineInfoA\n");
1135		return mixerGetLineInfoA_orig( hmxobj, pmxl, fdwInfo);
1136	}
1137
1138	MMRESULT WINAPI mixerGetLineInfoW( HMIXEROBJ hmxobj, LPMIXERLINEW pmxl, DWORD fdwInfo)
1139	{
1140		ll_winmm_shim_initialize();
1141		//OutputDebugString(L"mixerGetLineInfoW\n");
1142		return mixerGetLineInfoW_orig( hmxobj, pmxl, fdwInfo);
1143	}
1144
1145	MMRESULT WINAPI mixerGetID( HMIXEROBJ hmxobj, UINT FAR *puMxId, DWORD fdwId)
1146	{
1147		ll_winmm_shim_initialize();
1148		//OutputDebugString(L"mixerGetID\n");
1149		return mixerGetID_orig( hmxobj, puMxId, fdwId);
1150	}
1151
1152	MMRESULT WINAPI mixerGetLineControlsA( HMIXEROBJ hmxobj, LPMIXERLINECONTROLSA pmxlc, DWORD fdwControls)
1153	{
1154		ll_winmm_shim_initialize();
1155		//OutputDebugString(L"mixerGetLineControlsA\n");
1156		return mixerGetLineControlsA_orig( hmxobj, pmxlc, fdwControls);
1157	}
1158
1159	MMRESULT WINAPI mixerGetLineControlsW( HMIXEROBJ hmxobj, LPMIXERLINECONTROLSW pmxlc, DWORD fdwControls)
1160	{
1161		ll_winmm_shim_initialize();
1162		//OutputDebugString(L"mixerGetLineControlsW\n");
1163		return mixerGetLineControlsW_orig( hmxobj, pmxlc, fdwControls);
1164	}
1165
1166	MMRESULT WINAPI mixerGetControlDetailsA( HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails)
1167	{
1168		ll_winmm_shim_initialize();
1169		//OutputDebugString(L"mixerGetControlDetailsA\n");
1170		return mixerGetControlDetailsA_orig( hmxobj, pmxcd, fdwDetails);
1171	}
1172
1173	MMRESULT WINAPI mixerGetControlDetailsW( HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails)
1174	{
1175		ll_winmm_shim_initialize();
1176		//OutputDebugString(L"mixerGetControlDetailsW\n");
1177		return mixerGetControlDetailsW_orig( hmxobj, pmxcd, fdwDetails);
1178	}
1179
1180	MMRESULT WINAPI mixerSetControlDetails( HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails)
1181	{
1182		ll_winmm_shim_initialize();
1183		//OutputDebugString(L"mixerSetControlDetails\n");
1184		return mixerSetControlDetails_orig( hmxobj, pmxcd, fdwDetails);
1185	}
1186
1187	DWORD    WINAPI mmGetCurrentTask(void)
1188	{
1189		ll_winmm_shim_initialize();
1190		//OutputDebugString(L"mmGetCurrentTask\n");
1191		return mmGetCurrentTask_orig();
1192	}
1193
1194	void WINAPI mmTaskBlock(DWORD val)
1195	{
1196		ll_winmm_shim_initialize();
1197		//OutputDebugString(L"mmTaskBlock\n");
1198		return mmTaskBlock_orig(val);
1199	}
1200
1201	UINT WINAPI mmTaskCreate(LPTASKCALLBACK a, HANDLE* b, DWORD_PTR c)
1202	{
1203		ll_winmm_shim_initialize();
1204		//OutputDebugString(L"mmTaskCreate\n");
1205		return mmTaskCreate_orig(a, b, c);
1206	}
1207
1208	BOOL WINAPI mmTaskSignal(DWORD a)
1209	{
1210		ll_winmm_shim_initialize();
1211		//OutputDebugString(L"mmTaskSignal\n");
1212		return mmTaskSignal_orig(a);
1213	}
1214
1215	VOID WINAPI mmTaskYield()
1216	{
1217		ll_winmm_shim_initialize();
1218		//OutputDebugString(L"mmTaskYield\n");
1219		mmTaskYield_orig();
1220	}
1221
1222	MMRESULT WINAPI timeGetSystemTime( LPMMTIME pmmt, UINT cbmmt)
1223	{
1224		ll_winmm_shim_initialize();
1225		//OutputDebugString(L"timeGetSystemTime\n");
1226		return timeGetSystemTime_orig( pmmt, cbmmt);
1227	}
1228
1229	DWORD WINAPI timeGetTime(void)
1230	{
1231		ll_winmm_shim_initialize();
1232		//OutputDebugString(L"timeGetTime\n");
1233		return timeGetTime_orig();
1234	}
1235
1236	MMRESULT WINAPI timeSetEvent( UINT uDelay, UINT uResolution, LPTIMECALLBACK fptc, DWORD_PTR dwUser, UINT fuEvent)
1237	{
1238		ll_winmm_shim_initialize();
1239		//OutputDebugString(L"timeSetEvent\n");
1240		return timeSetEvent_orig(uDelay, uResolution, fptc, dwUser, fuEvent);
1241	}
1242
1243	MMRESULT WINAPI timeKillEvent( UINT uTimerID)
1244	{
1245		ll_winmm_shim_initialize();
1246		//OutputDebugString(L"timeKillEvent\n");
1247		return timeKillEvent_orig( uTimerID);
1248	}
1249
1250	MMRESULT WINAPI timeGetDevCaps( LPTIMECAPS ptc, UINT cbtc)
1251	{
1252		ll_winmm_shim_initialize();
1253		//OutputDebugString(L"timeGetDevCaps\n");
1254		return timeGetDevCaps_orig( ptc, cbtc);
1255	}
1256
1257	MMRESULT WINAPI timeBeginPeriod( UINT uPeriod)
1258	{
1259		ll_winmm_shim_initialize();
1260		//OutputDebugString(L"timeBeginPeriod\n");
1261		return timeBeginPeriod_orig( uPeriod);
1262	}
1263
1264	MMRESULT WINAPI timeEndPeriod( UINT uPeriod)
1265	{
1266		ll_winmm_shim_initialize();
1267		//OutputDebugString(L"timeEndPeriod\n");
1268		return timeEndPeriod_orig( uPeriod);
1269	}
1270
1271	UINT WINAPI joyGetNumDevs(void)
1272	{
1273		ll_winmm_shim_initialize();
1274		//OutputDebugString(L"joyGetNumDevs\n");
1275		return joyGetNumDevs_orig();
1276	}
1277
1278	MMRESULT WINAPI joyConfigChanged(DWORD dwFlags)
1279	{
1280		ll_winmm_shim_initialize();
1281		//OutputDebugString(L"joyConfigChanged\n");
1282		return joyConfigChanged_orig(dwFlags);
1283	}
1284
1285	MMRESULT WINAPI joyGetDevCapsA( UINT_PTR uJoyID, LPJOYCAPSA pjc, UINT cbjc)
1286	{
1287		ll_winmm_shim_initialize();
1288		//OutputDebugString(L"joyGetDevCapsA\n");
1289		return joyGetDevCapsA_orig( uJoyID, pjc, cbjc);
1290	}
1291
1292	MMRESULT WINAPI joyGetDevCapsW( UINT_PTR uJoyID, LPJOYCAPSW pjc, UINT cbjc)
1293	{
1294		ll_winmm_shim_initialize();
1295		//OutputDebugString(L"joyGetDevCapsW\n");
1296		return joyGetDevCapsW_orig( uJoyID, pjc, cbjc);
1297	}
1298
1299	MMRESULT WINAPI joyGetPos( UINT uJoyID, LPJOYINFO pji)
1300	{
1301		ll_winmm_shim_initialize();
1302		//OutputDebugString(L"joyGetPos\n");
1303		return joyGetPos_orig( uJoyID, pji);
1304	}
1305
1306	MMRESULT WINAPI joyGetPosEx( UINT uJoyID, LPJOYINFOEX pji)
1307	{
1308		ll_winmm_shim_initialize();
1309		//OutputDebugString(L"joyGetPosEx\n");
1310		return joyGetPosEx_orig( uJoyID, pji);
1311	}
1312
1313	MMRESULT WINAPI joyGetThreshold( UINT uJoyID, LPUINT puThreshold)
1314	{
1315		ll_winmm_shim_initialize();
1316		//OutputDebugString(L"joyGetThreshold\n");
1317		return joyGetThreshold_orig( uJoyID, puThreshold);
1318	}
1319
1320	MMRESULT WINAPI joyReleaseCapture( UINT uJoyID)
1321	{
1322		ll_winmm_shim_initialize();
1323		//OutputDebugString(L"joyReleaseCapture\n");
1324		return joyReleaseCapture_orig( uJoyID);
1325	}
1326
1327	MMRESULT WINAPI joySetCapture( HWND hwnd, UINT uJoyID, UINT uPeriod, BOOL fChanged)
1328	{
1329		ll_winmm_shim_initialize();
1330		//OutputDebugString(L"joySetCapture\n");
1331		return joySetCapture_orig(hwnd, uJoyID, uPeriod, fChanged);
1332	}
1333
1334	MMRESULT WINAPI joySetThreshold( UINT uJoyID, UINT uThreshold)
1335	{
1336		ll_winmm_shim_initialize();
1337		//OutputDebugString(L"joySetThreshold\n");
1338		return joySetThreshold_orig( uJoyID, uThreshold);
1339	}
1340
1341	BOOL WINAPI  mciDriverNotify(HWND hwndCallback, UINT uDeviceID, UINT uStatus)
1342	{
1343		ll_winmm_shim_initialize();
1344		//OutputDebugString(L"mciDriverNotify\n");
1345		return mciDriverNotify_orig(hwndCallback, uDeviceID, uStatus);
1346	}
1347
1348	UINT WINAPI  mciDriverYield(UINT uDeviceID)
1349	{
1350		ll_winmm_shim_initialize();
1351		//OutputDebugString(L"mciDriverYield\n");
1352		return mciDriverYield_orig(uDeviceID);
1353	}	
1354
1355	FOURCC WINAPI mmioStringToFOURCCA( LPCSTR sz, UINT uFlags)
1356	{
1357		ll_winmm_shim_initialize();
1358		//OutputDebugString(L"mmioStringToFOURCCA\n");
1359		return mmioStringToFOURCCA_orig( sz, uFlags);
1360	}
1361
1362	FOURCC WINAPI mmioStringToFOURCCW( LPCWSTR sz, UINT uFlags)
1363	{
1364		ll_winmm_shim_initialize();
1365		//OutputDebugString(L"mmioStringToFOURCCW\n");
1366		return mmioStringToFOURCCW_orig( sz, uFlags);
1367	}
1368
1369	LPMMIOPROC WINAPI mmioInstallIOProcA( FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags)
1370	{
1371		ll_winmm_shim_initialize();
1372		//OutputDebugString(L"mmioInstallIOProcA\n");
1373		return mmioInstallIOProcA_orig( fccIOProc, pIOProc, dwFlags);
1374	}
1375
1376	LPMMIOPROC WINAPI mmioInstallIOProcW( FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags)
1377	{
1378		ll_winmm_shim_initialize();
1379		//OutputDebugString(L"mmioInstallIOProcW\n");
1380		return mmioInstallIOProcW_orig( fccIOProc, pIOProc, dwFlags);
1381	}
1382
1383	HMMIO WINAPI mmioOpenA( LPSTR pszFileName, LPMMIOINFO pmmioinfo, DWORD fdwOpen)
1384	{
1385		ll_winmm_shim_initialize();
1386		//OutputDebugString(L"mmioOpenA\n");
1387		return mmioOpenA_orig( pszFileName, pmmioinfo, fdwOpen);
1388	}
1389
1390	HMMIO WINAPI mmioOpenW( LPWSTR pszFileName, LPMMIOINFO pmmioinfo, DWORD fdwOpen)
1391	{
1392		ll_winmm_shim_initialize();
1393		//OutputDebugString(L"mmioOpenW\n");
1394		return mmioOpenW_orig( pszFileName, pmmioinfo, fdwOpen);
1395	}
1396
1397	MMRESULT WINAPI mmioRenameA( LPCSTR pszFileName, LPCSTR pszNewFileName, LPCMMIOINFO pmmioinfo, DWORD fdwRename)
1398	{
1399		ll_winmm_shim_initialize();
1400		//OutputDebugString(L"mmioRenameA\n");
1401		return mmioRenameA_orig( pszFileName, pszNewFileName, pmmioinfo, fdwRename);
1402	}
1403
1404	MMRESULT WINAPI mmioRenameW( LPCWSTR pszFileName, LPCWSTR pszNewFileName, LPCMMIOINFO pmmioinfo, DWORD fdwRename)
1405	{
1406		ll_winmm_shim_initialize();
1407		//OutputDebugString(L"mmioRenameW\n");
1408		return mmioRenameW_orig( pszFileName, pszNewFileName, pmmioinfo, fdwRename);
1409	}
1410
1411	MMRESULT WINAPI mmioClose( HMMIO hmmio, UINT fuClose)
1412	{
1413		ll_winmm_shim_initialize();
1414		//OutputDebugString(L"mmioClose\n");
1415		return mmioClose_orig( hmmio, fuClose);
1416	}
1417
1418	LONG WINAPI mmioRead( HMMIO hmmio, HPSTR pch, LONG cch)
1419	{
1420		ll_winmm_shim_initialize();
1421		//OutputDebugString(L"mmioRead\n");
1422		return mmioRead_orig( hmmio, pch, cch);
1423	}
1424
1425	LONG WINAPI mmioWrite( HMMIO hmmio, const char _huge* pch, LONG cch)
1426	{
1427		ll_winmm_shim_initialize();
1428		//OutputDebugString(L"mmioWrite\n");
1429		return mmioWrite_orig( hmmio, pch, cch);
1430	}
1431
1432	LONG WINAPI mmioSeek( HMMIO hmmio, LONG lOffset, int iOrigin)
1433	{
1434		ll_winmm_shim_initialize();
1435		//OutputDebugString(L"mmioSeek\n");
1436		return mmioSeek_orig(hmmio, lOffset, iOrigin);
1437	}
1438
1439	MMRESULT WINAPI mmioGetInfo( HMMIO hmmio, LPMMIOINFO pmmioinfo, UINT fuInfo)
1440	{
1441		ll_winmm_shim_initialize();
1442		//OutputDebugString(L"mmioGetInfo\n");
1443		return mmioGetInfo_orig( hmmio, pmmioinfo, fuInfo);
1444	}
1445
1446	MMRESULT WINAPI mmioSetInfo( HMMIO hmmio, LPCMMIOINFO pmmioinfo, UINT fuInfo)
1447	{
1448		ll_winmm_shim_initialize();
1449		//OutputDebugString(L"mmioSetInfo\n");
1450		return mmioSetInfo_orig( hmmio, pmmioinfo, fuInfo);
1451	}
1452
1453	MMRESULT WINAPI mmioSetBuffer( HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer, UINT fuBuffer)
1454	{
1455		ll_winmm_shim_initialize();
1456		//OutputDebugString(L"mmioSetBuffer\n");
1457		return mmioSetBuffer_orig(hmmio, pchBuffer, cchBuffer, fuBuffer);
1458	}
1459
1460	MMRESULT WINAPI mmioFlush( HMMIO hmmio, UINT fuFlush)
1461	{
1462		ll_winmm_shim_initialize();
1463		//OutputDebugString(L"mmioFlush\n");
1464		return mmioFlush_orig( hmmio, fuFlush);
1465	}
1466
1467	MMRESULT WINAPI mmioAdvance( HMMIO hmmio, LPMMIOINFO pmmioinfo, UINT fuAdvance)
1468	{
1469		ll_winmm_shim_initialize();
1470		//OutputDebugString(L"mmioAdvance\n");
1471		return mmioAdvance_orig( hmmio, pmmioinfo, fuAdvance);
1472	}
1473
1474	LRESULT WINAPI mmioSendMessage( HMMIO hmmio, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
1475	{
1476		ll_winmm_shim_initialize();
1477		//OutputDebugString(L"mmioSendMessage\n");
1478		return mmioSendMessage_orig(hmmio, uMsg, lParam1, lParam2);
1479	}
1480
1481	MMRESULT WINAPI mmioDescend( HMMIO hmmio, LPMMCKINFO pmmcki, const MMCKINFO FAR* pmmckiParent, UINT fuDescend)
1482	{
1483		ll_winmm_shim_initialize();
1484		//OutputDebugString(L"mmioDescend\n");
1485		return mmioDescend_orig(hmmio, pmmcki, pmmckiParent, fuDescend);
1486	}
1487
1488	MMRESULT WINAPI mmioAscend( HMMIO hmmio, LPMMCKINFO pmmcki, UINT fuAscend)
1489	{
1490		ll_winmm_shim_initialize();
1491		//OutputDebugString(L"mmioAscend\n");
1492		return mmioAscend_orig( hmmio, pmmcki, fuAscend);
1493	}
1494
1495	MMRESULT WINAPI mmioCreateChunk(HMMIO hmmio, LPMMCKINFO pmmcki, UINT fuCreate)
1496	{
1497		ll_winmm_shim_initialize();
1498		//OutputDebugString(L"mmioCreateChunk\n");
1499		return mmioCreateChunk_orig(hmmio, pmmcki, fuCreate);
1500	}
1501
1502	MCIERROR WINAPI mciSendCommandA( MCIDEVICEID mciId, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
1503	{
1504		ll_winmm_shim_initialize();
1505		//OutputDebugString(L"mciSendCommandA\n");
1506		return mciSendCommandA_orig( mciId, uMsg, dwParam1, dwParam2);
1507	}
1508
1509	MCIERROR WINAPI mciSendCommandW( MCIDEVICEID mciId, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
1510	{
1511		ll_winmm_shim_initialize();
1512		//OutputDebugString(L"mciSendCommandW\n");
1513		return mciSendCommandW_orig( mciId, uMsg, dwParam1, dwParam2);
1514	}
1515
1516	MCIERROR  WINAPI mciSendStringA( LPCSTR lpstrCommand, LPSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback)
1517	{
1518		ll_winmm_shim_initialize();
1519		//OutputDebugString(L"mciSendStringA\n");
1520		return mciSendStringA_orig( lpstrCommand, lpstrReturnString, uReturnLength, hwndCallback);
1521	}
1522
1523	MCIERROR  WINAPI mciSendStringW( LPCWSTR lpstrCommand, LPWSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback)
1524	{
1525		ll_winmm_shim_initialize();
1526		//OutputDebugString(L"mciSendStringW\n");
1527		return mciSendStringW_orig( lpstrCommand, lpstrReturnString, uReturnLength, hwndCallback);
1528	}
1529
1530	MCIDEVICEID WINAPI mciGetDeviceIDA( LPCSTR pszDevice)
1531	{
1532		//OutputDebugString(L"mciGetDeviceIDA\n");
1533		return mciGetDeviceIDA_orig( pszDevice);
1534	}
1535
1536	MCIDEVICEID WINAPI mciGetDeviceIDW( LPCWSTR pszDevice)
1537	{
1538		ll_winmm_shim_initialize();
1539		//OutputDebugString(L"mciGetDeviceIDW\n");
1540		return mciGetDeviceIDW_orig( pszDevice);
1541	}
1542
1543	MCIDEVICEID WINAPI mciGetDeviceIDFromElementIDA( DWORD dwElementID, LPCSTR lpstrType )
1544	{
1545		ll_winmm_shim_initialize();
1546		//OutputDebugString(L"mciGetDeviceIDFromElementIDA\n");
1547		return mciGetDeviceIDFromElementIDA_orig( dwElementID, lpstrType );
1548	}
1549
1550	MCIDEVICEID WINAPI mciGetDeviceIDFromElementIDW( DWORD dwElementID, LPCWSTR lpstrType )
1551	{
1552		ll_winmm_shim_initialize();
1553		//OutputDebugString(L"mciGetDeviceIDFromElementIDW\n");
1554		return mciGetDeviceIDFromElementIDW_orig( dwElementID, lpstrType );
1555	}
1556
1557	DWORD_PTR WINAPI  mciGetDriverData(UINT uDeviceID)
1558	{
1559		ll_winmm_shim_initialize();
1560		//OutputDebugString(L"mciGetDriverData\n");
1561		return mciGetDriverData_orig(uDeviceID);
1562	}
1563
1564	BOOL WINAPI mciGetErrorStringA( MCIERROR mcierr, LPSTR pszText, UINT cchText)
1565	{
1566		ll_winmm_shim_initialize();
1567		//OutputDebugString(L"mciGetErrorStringA\n");
1568		return mciGetErrorStringA_orig( mcierr, pszText, cchText);
1569	}
1570
1571	BOOL WINAPI mciGetErrorStringW( MCIERROR mcierr, LPWSTR pszText, UINT cchText)
1572	{
1573		ll_winmm_shim_initialize();
1574		//OutputDebugString(L"mciGetErrorStringW\n");
1575		return mciGetErrorStringW_orig( mcierr, pszText, cchText);
1576	}
1577
1578	BOOL WINAPI  mciSetDriverData(UINT uDeviceID, DWORD_PTR dwData)
1579	{
1580		ll_winmm_shim_initialize();
1581		//OutputDebugString(L"mciSetDriverData_type\n");
1582		return mciSetDriverData_orig( uDeviceID, dwData );
1583	}
1584
1585	BOOL WINAPI mciSetYieldProc( MCIDEVICEID mciId, YIELDPROC fpYieldProc, DWORD dwYieldData)
1586	{
1587		ll_winmm_shim_initialize();
1588		//OutputDebugString(L"mciSetYieldProc\n");
1589		return mciSetYieldProc_orig(mciId, fpYieldProc, dwYieldData);
1590	}
1591
1592	BOOL WINAPI  mciFreeCommandResource(UINT uTable)
1593	{
1594		ll_winmm_shim_initialize();
1595		//OutputDebugString(L"mciFreeCommandResource\n");
1596		return mciFreeCommandResource_orig(uTable);
1597	}
1598
1599	HTASK WINAPI mciGetCreatorTask( MCIDEVICEID mciId)
1600	{
1601		ll_winmm_shim_initialize();
1602		//OutputDebugString(L"mciGetCreatorTask\n");
1603		return mciGetCreatorTask_orig( mciId);
1604	}
1605
1606	YIELDPROC WINAPI mciGetYieldProc( MCIDEVICEID mciId, LPDWORD pdwYieldData)
1607	{
1608		ll_winmm_shim_initialize();
1609		//OutputDebugString(L"mciGetYieldProc\n");
1610		return mciGetYieldProc_orig( mciId, pdwYieldData);
1611	}
1612
1613	UINT WINAPI mciLoadCommandResource(HINSTANCE hInstance, LPCWSTR lpResName, UINT uType)
1614	{
1615		ll_winmm_shim_initialize();
1616		//OutputDebugString(L"mciLoadCommandResource");
1617		return mciLoadCommandResource_orig(hInstance, lpResName, uType);
1618	}
1619	
1620
1621	BOOL WINAPI mciExecute(LPCSTR pszCommand)
1622	{
1623		ll_winmm_shim_initialize();
1624		//OutputDebugString(L"mciExecute\n");
1625		return mciExecute_orig(pszCommand);
1626	}
1627}