AllocTarget Method (original) (raw)
Summary
Pre-allocates the capture target to the specified size.
Syntax
public virtual void AllocTarget(
int _size_
)
public:
virtual void AllocTarget(
int _size_
)
Parameters
size
Value containing the size of the target to be allocated, in megabytes.
Example
using Leadtools;
using Leadtools.Multimedia;
using LeadtoolsMultimediaExamples.Fixtures;
public bool _result = false;
public CaptureCtrlForm _form = new CaptureCtrlForm();
string outFile = Path.Combine(LEAD_VARS.MediaDir, "CaptureCtrl_AllocTargetExample.avi");
public void AllocTargetExample()
{
// reference the capture control
CaptureCtrl capturectrl = _form.CaptureCtrl;
try
{
// set the target output file
capturectrl.TargetFile = outFile;
// allocate a file
capturectrl.AllocTarget(1000);
_result = File.Exists(outFile);
}
catch (COMException)
{
_result = false;
}
catch (Exception)
{
_result = false;
}
}
static class LEAD_VARS
{
public const string MediaDir = @"C:\LEADTOOLS23\Media";
}