CocosDenshion volume control on Windows

Trying to patch SimpleAudioEngine to set volume in Windows

void MciPlayer::Volume(UINT volume)
{

  if (! m_hDev)
    return;

  MCIERROR MciErr ;  // error value

  MCI_DGV_SETAUDIO_PARMS  mciParams = {0};

  mciParams.dwItem = MCI_DGV_SETAUDIO_VOLUME;

  mciParams.dwValue = volume;

  MciErr = mciSendCommand (m_hDev, MCI_SETAUDIO, MCI_DGV_SETAUDIO_ITEM | MCI_DGV_SETAUDIO_VALUE, (DWORD) & mciParams);   

}



UINT MciPlayer::Volume () const

{

  if (! m_hDev)

    return 0;

  MCI_STATUS_PARMS mciParams = {0};

  mciParams.dwItem = MCI_DGV_STATUS_VOLUME;

  mciSendCommand (m_hDev, MCI_STATUS, MCI_STATUS_ITEM, (DWORD) & mciParams);

  return mciParams.dwReturn;

}

But it isn’t working, I’m getting an error on mciSendCommand for setting the volume. Has anyone out there solved this issue?