Sensoray 711 User Manual
Page 23

24
Sensoray Model 711 Instruction Manual
Returns
The function returns after the acquisition is complete, or timeout expires. The return value is
0 in case of success, or an error code. The function also sets the variable pointed to by
pStatus with the value of the status word corresponding to the end of the acquisition of the
last frame. Status bits are not reset automatically between the acquisition of the individual
frames. See X11_GetStatus for the description of the constants used to select individual
status bits.
Example
PCI pci;
ECODE ecode;
MODE mode = {DEF_MODE_NTSC};
BUFFER buffer;
DWORD frames = THAT_MANY;
HFG hfg;
float timeout = .5;
DWORD status;
if (!(ecode = X11_InitSystem (&pci))) {
/* assume we need the 1st frame grabber */
if (!(ecode = X11_GetHFG (&hfg, pci.PCIslot[0]))) {
if (!(ecode = X11_AllocBuffer (&mode, &buffer, frames)))
{
if (!(ecode = X11_Acquire (hfg, buffer.hbuf,
timeout, &status))) {
/* application code here */
} else {
return ecode;
}
} else {
return ecode;
}
} else {
return ecode;
}
} else {
return ecode;
}
X11_StartAcquire
__declspec(dllimport) ECODE __stdcall X11_SrartAcquire (hfg, hbuf, acqmode)
HFG hfg;
/* frame grabber handle */
HBUF hbuf;
/* image buffer handle */
DWORD acqmode;
/* acquisition mode */
The X11_StartAcquire function starts the acquisition of the number of frames
corresponding to that of the image buffer, and returns immediately.
Parameter Description
hfg
Frame grabber handle. Selects the frame grabber.
hbuf
Image buffer handle. Selects the image buffer. All frames of the