ttp://www.kab-studio.biz/Programing/Codian/DLL_Hook_SClass/02.html
のソースをコピーしてsndPlaySoundを実行中リンクするのですが、wavファイルが鳴った後にエラーが出ます

The value of ESP was not properly saved across a function call.
This is usually a result of calling a function declared with one calling
convention with a function pointer declared with a different calling convention

そこで、typedef BOOL (sndPlaySound)( LPCSTR, UINT )の部分をMMSYSTEM.Hの宣言通りに、
typedef BOOL (WINAPI sndPlaySound)( LPCSTR, UINT )に変更したらエラーは出ませんが、
今度は音が鳴りません(戻り値は1)。原因と対処法を教えてください

OS - Windows Vista home edition
IDE - Visual Studio6 enterprise edition SP2
プロジェクト - Win32 Console Application

ちなみに実行時リンクでも同じくエラーもなく音が出ません。