---------------------------------------------------------------------------
| 186 | } |
| 187 | //--------------------------------------------------------------------------- |
| 188 | void 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 |
no test coverage detected