Before using any of the functions of RapidPci, the driver must be initialized with the help of the function OpenRapidPci . It must be done once after starting the application. Also resources used by the driver should be cleaned up(driver closed) before the application is closed.
Schematic session of using RapidPci:
| // initialize(open) the driver
|
| // Check if the driver initialized successfully
|
| //////////////////////////////////////
|
| ///////// RapidPci session //////////
|
| ///////// ................ //////////
|
| //////////////////////////////////////
|
| // Free resources used by the driver (close the driver)
|
| // An error happened while opening the driver
|
| MessageBox("Cannot open the driver","Attention!", MB_OK | MB_ICONWARNING);
|
Driver can be initialized by many applications simultaneously, once for each PCI board. The parameter of OpenRapidPci() can be used to select
a device supported by RapidPci driver.
|