********* *** Mic_Mute.PRG ********* Declare Long mixerClose in WinMM Long hMixer Declare Long mixerOpen in WinMM ; Long @hMixer, Long nMxId, Long dwCallback, ; Long dwInstance, Long dwOpenFlags Declare Long mixerGetLineInfo in WinMM ; Long hMxObj, String @cMxLine, Long dwInfoFlags Declare Long mixerGetLineControls in WinMM ; Long hMxObj, String @cMxLineControl, Long dwControlsFlags Declare Long mixerSetControlDetails in WinMM ; Long hMxObj, String @cMxControlDetail, Long dwDetailFlags Declare Long RtlMoveMemory in Kernel32 as Copy2Mem ; Long pDest, String @cSource, Long nLength Declare Long RtlMoveMemory in Kernel32 as CopyMem ; String @cDest, Long pSource, Long nLength Declare Long LocalAlloc in Kernel32 Long uFlags, Long dwBytes Declare Long LocalFree in Kernel32 Long hMem If SetMicMute( .T. ) Wait 'Mute is ON. Press any key to turn OFF...' window endif If SetMicMute( .F. ) Wait 'Mute is OFF' window nowait endif Clear Dlls ****************** ** Procedure for muting microphone ** ** Return value: ** .T. = succeed ** .F. = failed ****************** Function SetMicMute( tl_Mute ) Local lh_Mixer, lp_Buffer Local lc_MxControlDetail, lc_MxLine, lc_MxLineControl, lc_LineId Local ll_Success lh_Mixer = 0 If (mixerOpen( @lh_Mixer, 0, 0, 0, 0 ) == 0) lc_MxLine = padr( Num2DWord( 168 ) + replicate( chr(0), 20 ) + ; Num2DWord( 4099 ), 168, chr(0) ) If (mixerGetLineInfo( lh_Mixer, @lc_MxLine, 3 ) == 0) lp_Buffer = LocalAlloc( 64, 148 ) If (lp_Buffer != 0) lc_MxLineControl = Num2DWord( 24 ) + substr( lc_MxLine, 13, 4 ) + ; Num2DWord( 0x20010002 ) + Num2DWord( 1 ) + ; Num2DWord( 148 ) + Num2DWord( lp_Buffer ) If (mixerGetLineControls( lh_Mixer, @lc_MxLineControl, 2 ) == 0) lc_LineId = space(4) CopyMem( @lc_LineId, lp_Buffer+4, 4 ) lc_MxControlDetail = Num2DWord( 24 ) + lc_LineId + chr(1) + ; replicate( chr(0), 7 ) + Num2DWord( 4 ) + Num2DWord( lp_Buffer ) Copy2Mem( lp_Buffer, iif( tl_Mute, Num2DWord( 1 ), Num2DWord( 0 )), 4 ) ll_Success = (mixerSetControlDetails( lh_Mixer, @lc_MxControlDetail, 0 ) == 0) endif LocalFree( lp_Buffer ) endif endif mixerClose( lh_Mixer ) endif Return ll_Success EndFuncThanks again for the aid and best regards