/*
              ----------------------------------------------------------------------
              Sample Using Installshield Calls SoftDogSetup.dll To Install Drivers
              ----------------------------------------------------------------------             
*/    
#include "ifx.h" 
 NUMBER      Parameter1;
 NUMBER      status;  
 NUMBER      DriverInfo;
//this is the interface declaration of DLL
prototype NUMBER SoftDogSetup.InstDriver(NUMBER);
prototype NUMBER SoftDogSetup.UninstallDriver(NUMBER);
prototype NUMBER SoftDogSetup.GetDogDriverInfo();
prototype SoftDogSetup.DriverDialog();

program
    
    status=UseDLL("c:\\softdog\\driver\\SoftDogSetUp.DLL");
   
    if(status!=0)  then
        UnUseDLL("SoftDogSetUp.DLL");
        abort;
    else
	DriverInfo = GetDogDriverInfo();
	//You can use the value of DriverInfo to get the version of dog's driver
	//DriverInfo = 0 means that Not find the dog's driver
	//DriverInfo = 1 means that find the same version USBDog and ParallelDog driver	
	//DriverInfo = 2 means that find the same version USBDog driver only
	//DriverInfo = 3 means that find the same version ParallelDog driver only	
	//DriverInfo = 4 means that find the older version USBDog and ParallelDog driver	
	//DriverInfo = 5 means that find the older version USBDog driver only	
	//DriverInfo = 6 means that find the older version ParallelDog driver only	
	//DriverInfo = 7 means that find the newer version USBDog and ParallelDog driver	
	//DriverInfo = 8 means that find the newer version USBDog driver only	
	//DriverInfo = 9 means that find the newer version ParallelDog driver only
	//DriverInfo =3008 means that the current user is not administrator

	//Parameter1:
	//1: uninstall USB dog driver 2: uninstall Parallel dog driver 3: uninstall both USB dog driver and Parallel dog driver
        status=UninstallDriver(Parameter1);

	//if (status != 0) means uninstall failed!

	//Display the Driver Install Interface
	DriverDialog();

	// Not dispaly the driver install interface
	//Parameter1: 1 install USB dog driver 2 install Parallel dog driver 3 install both USB dog driver and Parallel dog driver
        Parameter1=3;
        status=InstDriver(Parameter1);
	//if (status != 0) means install failed!

        UnUseDLL("SoftDogSetUp.DLL");   
    endif;
endprogram
