Func mciSendString($sCommand)
Local $Err, $Ret
$Err = DllCall("winmm.dll", "dword", "mciSendStringW", "wstr", $sCommand, "ptr", 0, "uint", 0, "ptr", 0)
If @error Then
Return SetError(1, 0, 0)
Else
If $Err[0] Then
$Ret = DllCall("winmm.dll", "bool", "mciGetErrorStringW", "dword", $Err[0], "wstr", "", "uint", 4096)
If (Not @error) And ($Ret[0]) Then
ConsoleWrite(StringFormat('%-40s - %s', $sCommand, $Ret[2]) & @CR)
EndIf
Return SetError(1, $Err[0], 0)
EndIf
EndIf
Return 1
EndFunc ;==>mciSendString