Sensoray 711 User Manual
Page 20
Sensoray Model 711 Instruction Manual
21
ECODE ecode;
if (!(ecode = X11_InitSystem (&pci))) {
/* *
* application code here*
* */
X11_CloseSystem;
return 0;
} else {
return ecode;
}
X11_AllocBuffer
__declspec(dllimport) ECODE __stdcall X11_AllocBuffer (pMode, pBuffer,
dwParameter)
MODE * pMode;
/* address of the MODE structure */
BUFFER * pBuffer;
/* address of the BUFFER structure */
DWORD dwParameter;
/* context dependent parameter */
The X11_AllocBuffer function allocates an image buffer.
Parameter Description
pMode
Points to the variable of MODE type. MODE has to be set up prior to
calling X11_AllocBuffer to define the buffer size and properties. In
case any changes are made to MODE settings affecting scaling, color
format, or storage type, the image buffer has to be re-allocated (see
MODE, MODE_ADVANCED, and X11_FreeBuffer).
pBuffer
Points to the variable of BUFFER type. The members of BUFFER
structure are set by X11_AllocBuffer, if the call is successful.
dwParameter
Parameter which depends on MODE.advanced.buffertype
setting.
buffertype dwParameter
BUF_MEM
Number of frames in the image buffer. Must be
between 1 and SYS_FRAMES.
BUF_EXT
A pointer to the external buffer.
BUF_VIDEO A handle of the image display window.
Returns
The function returns 0 in case of success, or an error code. It also modifies the BUFFER
type structure: hbuf contains the allocated image buffer handle, dwFrames - the number of
frames in the image buffer, and frame array - pointers to the the individual frames' data and
associated bitmap information.
Notes
The X11_AllocBuffer could be used to allocate buffers of three types: regular buffer,
external buffer, and video memory buffer. The type of the allocated buffer is controlled by
MODE.advanced.buffertype member.
Regular buffer is allocated in the PC memory when X11_AllocBuffer is called. This option is