强制布尔值(15)

terry_zhou82

New Member
Member
#3
代码如下://希望WIN7始终不是静音。procedure TForm1.Timer1Timer(Sender: TObject);const bMute=False;var deviceEnumerator: IMMDeviceEnumerator
defaultDevice: IMMDevice
endpointVolume: IAudioEndpointVolume;begin CoCreateInstance(CLASS_IMMDeviceEnumerator, nil, CLSCTX_INPROC_SERVER, IID_IMMDeviceEnumerator, deviceEnumerator)
deviceEnumerator.GetDefaultAudioEndpoint(eRender, eConsole, defaultDevice)
defaultDevice.Activate(IID_IAudioEndpointVolume, CLSCTX_INPROC_SERVER, nil, endpointVolume)
endpointVolume.GetMute(bmute);end;end.哪里错了啊,总是显示“[DCC Error] Unit1.pas(38): E2033 Types of actual and formal var parameters must be identical”
 

Users Who Are Viewing This Thread (Users: 1, Guests: 0)