The MMDevApi has a number of incorrect declarations. The double parameters should be single. The Boolean parameters work better as integer. And many if not all of the TGUID parameters should be PGUID. After correcting the declarations I was able to set the mute and the volume level.