using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace Media
{
public partial class Form1 : Form
{
[DllImport("Winmm.dll")]
private static extern int waveOutSetVolume(int hwo, System.UInt32 pdwVolume);//设置音量
[DllImport("Winmm.dll")]
private static extern uint waveOutGetVolume(int hwo,out System.UInt32 pdwVolume); //获取音量
public Form1()
{
InitializeComponent();
}
private void get_Click(object sender, EventArgs e)
{
uint v;
uint i = waveOutGetVolume(0,out v);
uint vleft = v & 0xFFFF;
uint vright