TCHAR cmd[256];

wsprintf(cmd,"status %s volume",shortPath);

TCHAR volume[256];//用cmd命令获取当前音量,是字符串类型的,存放在volume中

mciSendString(cmd,volume, sizeof(volume), 0 );

int v0=atoi(volume);//把字符串类型转为Internet型,要include<stdlib.h>

wsprintf(cmd,"setaudio %s volume to %i",shortPath,v0+200);//修改音量

mciSendString(cmd,"",0,NULL);