TVicHW32 Common Properties And Methods
Previous  Top  Next


Before using any of the functions of TVicHW32, the driver must be opened and initialized with the help of the OpenDriver method 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, see CloseDriver method.

Attention! - do not open and close the driver multiple times while application is running!

Scematic session of using TVicHW32, assuming HW32 is name of TVicHW32 component instance:

// initialize (open)the driver  
HW32.OpenDriver;   
 
// Check if the driver initialized successfully  
if HW32.GetActiveHW then   
begin  
 
     ...  TVcHW32 session...  
 
     // Free resources used by the driver (close the driver)  
                   
     HW32.CloseDriver;   
end  
else  // An error happened while starting the driver  
  ShowMessage("Cannot open the driver");     


The possible reasons if the driver was not opened are following:

- no "tvichw" device special file was created

- the tvichw32.o driver was not installed