Sensoray 711 User Manual
Page 19

20
Sensoray Model 711 Instruction Manual
Functions
X11_InitSystem
__declspec(dllimport) ECODE __stdcall X11_InitSystem (pPCIdata)
PCI * pPCIdata;
/* address of the PCI structure */
The X11_InitSystem function performs the system initialization. It identifies the supported
boards present in the system, and initializes internal data structures.
Parameter Description
pPCIdata
Points to the variable of PCI type.
Returns
The function returns 0 in case of successful initialization, or an error code. It also modifies
the PCI type structure: boards contains the number of supported boards identified and
initialized, PCIslot array contains the slot numbers of identified boards.
In case the system was already initialized by another process, a warning code
(WNG_INITIALIZED) is returned, and the boards are not reset. All the data structures still
are modified after the call to reflect the actual system.
The frame grabber handles for each board can be obtained with the help of X11_GetHFG
function.
Example
PCI pci;
ECODE ecode;
int i;
ecode = X11_InitSystem (&pci);
if (ecode && (ecode < WNG_INITIALIZED)) {
return ecode;
} else {
printf ("Boards %d\n", pci.boards);
for (i = 0; i < pci.boards; i++) {
printf ("Slot %04X\n", pci.PCIslot[i]);
}
if (ecode) {
printf ("Initialized by other process\n");
}
}
X11_CloseSystem
__declspec(dllimport) void __stdcall X11_InitSystem (void)
The X11_CloseSystem function frees any allocated system resources. It has to be called
before terminating the application.
Example
PCI pci;