Ver Mensaje Individual
  #2  
Antiguo 27-03-2009
Avatar de cHackAll
[cHackAll] cHackAll is offline
Baneado?
 
Registrado: oct 2006
Posts: 2.159
Reputación: 20
cHackAll Va por buen camino
Código Delphi [-]
// . . .
 
uses MMSystem;
 
var
 Value: Cardinal = 0; // 1 = mute
 MixerControl: TMixerControl;
 MixerLineControls: TMixerLineControls = (cbStruct: SizeOf(MixerLineControls); cControls: 1; cbmxctrl: SizeOf(MixerControl); pamxctrl: @MixerControl);
 MixerControlDetails: TMixerControlDetails = (cbStruct: SizeOf(MixerControlDetails); cChannels: 1; cbDetails: SizeOf(Value); paDetails: @Value);
 
procedure TForm1.Button1Click(Sender: TObject); // global in XP
var hMixer: Integer;
begin
 if mixerOpen(@hMixer, 0, 0, 0, MIXER_OBJECTF_MIXER) = 0 then
  begin
   repeat Inc(MixerLineControls.dwControlID);
    mixerGetLineControls(hMixer, @MixerLineControls, MIXER_GETLINECONTROLSF_ONEBYID);
   until MixerControl.dwControlType = MIXERCONTROL_CONTROLTYPE_MUTE;
   MixerControlDetails.dwControlID := MixerControl.dwControlID;
   mixerSetControlDetails(hMixer, @MixerControlDetails, MIXER_SETCONTROLDETAILSF_VALUE);
   mixerClose(hMixer);
  end;
end; // by cHackAll

procedure TForm1.Button2Click(Sender: TObject);
begin
 keybd_event($AD, 0, 0, 0); // easy switch (global for Vista & Se7en)
end;
__________________
RTFM > STFW > Foro > Truco > Post > cHackAll > KeBugCheckEx
Responder Con Cita