MCPcopy Create free account
hub / github.com/MaxBelkov/visualsyslog / MyPlaySound

Function MyPlaySound

source/sound.cpp:188–199  ·  view source on GitHub ↗

---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

186}
187//---------------------------------------------------------------------------
188void MyPlaySound(AnsiString file)
189{
190 if( file.Length() == 0 )
191 return;
192 if( ! FileExists(file) )
193 {
194 WriteToLogError("WARNING\tPlay sound: file \"%s\" not found !", file.c_str());
195 return;
196 }
197 if( ::PlaySound(file.c_str(), NULL, SND_FILENAME | SND_NODEFAULT | SND_NOWAIT | SND_SYNC) == FALSE )
198 WriteToLogError("ERROR\tPlay sound: \"%s\"", FormatLastError2(GetLastError()).c_str());
199}
200//---------------------------------------------------------------------------
201#pragma package(smart_init)
202

Callers 1

ExecuteMethod · 0.85

Calls 2

WriteToLogErrorFunction · 0.85
FormatLastError2Function · 0.85

Tested by

no test coverage detected