VBVFrame Methods

Wave Editing Methods

All four Wave file editing methods share the same general characteristics:

NOTE: In all the Wave editing functions below,the Position1 and Position2 parameters are represented as Long(s). This convention has been designed to work with the VB6 environment. However, because the Long data type is different in VB.NET, you must cast the position parameters to Integers.

AppendWaveFile

(ByVal channel as Integer, ByVal Wavefile1 as String, ByVal Wavefile2 as String)

This utility method appends the contents of wavefile2 to the end of wavefile1.

CopyWaveFile

(ByVal channel as Integer , ByVal FileName1 as String, ByVal OutFileName as String, ByVal Position1 as Long, ByVal Position2 as Long)

This utility method creates OutFileName having the contents of the audio data of FileName1 between Position1 and Position2.

InsertWaveFile

(ByVal channel as Integer, ByVal FileName1 as String, ByVal FileName2 as String, ByVal OutFileName as String, ByVal Position1 as Long)

This utility method creates OutFileName having the contents of FileName1 plus FileName2 inserted at Position1 of FileName1.

OverwriteWaveFile

(ByVal channel as Integer, ByVal FileName1 as String, ByVal FileName2 as String, ByVal OutFileName as String, ByVal Position1 as Long, ByVal Position2 as Long)

This utility method creates OutFileName having the contents of FileName1 overwritten by contents of FileName2 from Position1 till Position2 of FileName1.

Other Methods

GetCustomLicenseCount

(LicenseName As String) As Integer

Use this method to determine how many custom licenses under a particular license name are loaded and activated on the RTM.

GrabCustomLicense

(LicenseName As String) As Integer

Grabs and reserves one license under a particular license name. LicenseName is composed of the prefix you chose to distinguish your custom licenses from other licenses plus your custom license name. See Naming of Custom Licenses.

GetFreeCustomLicensesCount

(LicenseName As String) As Integer

Use this method to determine how many available custom licenses can be reserved on the RTM under a particular license name.

ReleaseCustomLicense

(LicenseName As String, LicenseID As Integer)

Releases a custom license. Requires the license name used to reserve the license and the license ID that was returned upon license grabbing.

ShowLineStatus

ShowLineStatus (Show as Boolean)

Shows or hides the LineStatus window. The LineStatus window can also be embedded in your own form using the LineStat OCX. If using the control, you are not able to show the system provided window. See LineStatus Control.

ShowLogwindow

ShowLogwindow (Channel as Integer, Show as Boolean)

Shows or hides the log windows. There is a log window for each channel, contained within the VBVLog application. The VBVLog application is started if necessary.

StartSystem

StartSystem(ShowStatus as Boolean)

StartSystem performs the same function as the StartSystem option in the run mode context menu.

Before the system starts, all controls on all loaded forms are checked for errors. When this method is executed from the Context menu, the line status application is automatically started. When called form code, the method provides a parameter, ShowStatus, to control display of the status application. The line status application is specified by the LineStat INI file setting is started, the default is vbvlog.exe.

Once the system is started, stop voice operations with StopSystem.

If an error occurs while starting the system, the method generates a trappable error. See vbvStartSystemErrorConstants for possible error values.

StopSystem

StopSystem(KillChannels as Boolean) As Integer

Once the system is started, you can stop voice operations with the StopSystem method. If KillChannels is False, VBVoice waits for all lines to clear before terminating. The LineStatus window is shown until all calls have been completed. If KillChannels is true, VBVoice attempts to halt all the lines immediately, terminating any calls currently on the line. The method returns True if successfully shutdown, or False if the shutdown is not yet complete (there are still channels active).

If VBVoice is able to shut down all channels immediately, a ShutDown event occurs while processing the method, the LineStatus window is closed, and the method returns True. This will only occur if all lines are idle when the method is called.

If some lines are active (including waiting for ring or in a pre-call delay state) when the method is called, the following occurs:

The OffHookIdle INI setting controls whether the lines are left onhook (default) or offhook after shutdown. This is useful in systems spread across more than one machine, when using a hunt group to distribute calls. As one system shuts down, the lines are made busy and the calls forward to the second machine. See OffHookIdle.

SystemStarted

SystemStarted as Boolean

A Boolean which returns True if the system is already started or False otherwise. This method has no parameters.

EXAMPLE

To start the system:

If Not VBVFrame1.SystemStarted Then
VBVFrame1.StartSystem True
End If

To stop the system:

If VBVFrame1.SystemStarted Then
VBVFrame1.StartSystem False
End If

Read more about VBVFrame control.