32
Argus Encoder Family Version 2.6 API Developer’s Guide
Windows Registry Settings
Registry “Source Enabled” key is set to 1. Note that the
VTRDisconnect()
method
should not be called from your client’s finished-event of error-event handlers.
Similar to Filter Manager, the VTR component has a
Connect()
and a
Disconnect()
method. These methods allow the VTR component to assume or to relinquish
control of the encoder serial port attached to the tape deck. Before calling any of the
commands exposed through the VTR interface, you should first call the
Connect()
method. Before returning control of the serial port to the Filter Manager compo-
nent, you should call the
Disconnect()
method. Make certain not to attempt to
assume control of the tape deck while an encode is cueing or in progress.
Windows Registry Settings
The VTR component uses a single Windows Registry value to set the serial port
delay (the minimum amount of time, in milliseconds, to wait after sending a
command to the tape deck via the serial communications port). The Windows
Registry key used to define this setting is:
HKEY_LOCAL_MACHINE\SOFTWARE \Vela Research\Argus \SerPortDly.
If this Registry key is not defined, the VTR component uses a default value of 10
(translated as 10 milliseconds).
Creating an Instance of IVTRCenter
You can access the VTR COM component through a single custom interface,
IVTRCenter. To generate a Smart Pointer to this interface, first call (in the
StdAfx.h file):
#include <atlbase.h> // ATL Support
#import “VTR.tlb” no_namespace named_guids
In your class definition, you should define a Smart Pointer to the VTR interface:
IVTRCenterPtr m_IVtr;
In the initialization section of your application, create an instance of the interface:
m_IVtr.CreateInstance( CLSID_VTRCenter );
Immediately after creating an instance of the VTR component, you should set
and initialize the communications port, as follows:
m_IVtr->PutComPort(1);
long result = m_IVtr->Initialize();
If the value returned by
Initialize()
is 0, then the serial-port initialization was
successful and you’re ready to use the methods and properties exposed through
the IVTRCenter interface.