Suspending the Video Server

[This is preliminary documentation and subject to change.]

You can use the BPCSuspend object to suspend background data capture and cause the video server to release its devices for use by other applications.

To do this you create an instance of BPCSuspend and call its DeviceRelease method. If the video server successfully releases all devices the method returns a valid BPCSuspended object. Otherwise, it returns Nothing. If Nothing is returned, it means that the video server was unable to release some devices because they are currently being used by client video applications.

Your application should handle the case where DeviceRelease returns Nothing as it would a device busy or device open type of failure. Your application can wait and try again, or signal the user to shut down video applications.

When your application is done using the devices, it should destroy the BPCSuspended object. This notifies the video server that it can resume using the devices and return to background data capture.

'Note: for the following object creation to work, 
'you must add the Vid.ocx component into your project.
'For more information, see Adding the Video Control to an Application
Dim susp As BPCSuspend
Set susp = New BPCSuspend
Dim suspended As BPCSuspended
 
'Attempt to suspend the video server
susp.DeviceRelease 0, suspended 
 
'Test whether the video server was suspended
If (suspended Is Nothing) Then
  'Handle the case where devices cannot be released
Else
  'Use the devices
End If
 
'Release suspended to enable the video server to use the devices
Set suspended = Nothing
 

Note  If you are developing applications using C/C++, you can use the wrapper class implemented in Bpcsusp.h to provide suspend functionality.