home *** CD-ROM | disk | FTP | other *** search
/ On Hand / On_Hand_From_Softbank_1994_Release_2_Disc_2_1994.iso / 00202 / s / disk4 / mcitest.ba_ / mcitest.bin
Text File  |  1993-04-28  |  1KB  |  35 lines

  1. ' Force all runtime errors to be handled here.
  2. Sub DisplayErrorMessageBox ()
  3.     Select Case Err
  4.         Case MCIERR_CANNOT_LOAD_DRIVER
  5.             Msg$ = "Error load media device driver."
  6.         Case MCIERR_DEVICE_OPEN
  7.             Msg$ = "The device is not open or is not known."
  8.         Case MCIERR_INVALID_DEVICE_ID
  9.             Msg$ = "Invalid device id."
  10.         Case MCIERR_INVALID_FILE
  11.             Msg$ = "Invalid filename."
  12.         Case MCIERR_UNSUPPORTED_FUNCTION
  13.             Msg$ = "Action not available for this device."
  14.         Case Else
  15.             Msg$ = "Unknown error (" + Str$(Err) + ")."
  16.     End Select
  17.  
  18.     MsgBox Msg$, 48, MCI_APP_TITLE
  19. End Sub
  20.  
  21. ' This subroutine allows any Windows events to be processed.
  22. ' This may be necessary to solve any synchronization
  23. ' problems with Windows events.
  24. '
  25. ' This subroutine can also be used to force a delay in
  26. ' processing.
  27. Sub WaitForEventsToFinish (NbrTimes As Integer)
  28.     Dim i As Integer
  29.  
  30.     For i = 1 To NbrTimes
  31.         dummy% = DoEvents()
  32.     Next i
  33. End Sub
  34.  
  35.