
                       -----------------------------------------------
                                   SoftDog Device Drivers
                Installing Guide for Windows 9x/ME/NT/2K/XP/WS2003/Vista/XP64/WS2003x64/Vista64
                       -------------------------------------------------
                           Copyright (c) 2007, SafeNet China Ltd.


SoftDog's device driver for Windows 9x/ME should be installed if your protected application 
with SoftDog is running at Windows 9x/ME system. 

SoftDog's device driver for Windows NT/2K/XP/2003/Vista/XP64/WS2003x64/Vista64 must be installed 
if your protected application with SoftDog is running at Windows NT/2K/XP/2003/Vista/XP64
/WS2003x64/Vista64 system.

This version SoftDogInstdrv.exe will call DriverDialog of SoftDogSetup.dll to display the 
interface of installing and uninstalling driver. User can use SoftDogInstdrv.exe to install and 
uninstall drivers or make the interface by yourself.  

Run installing program SoftDogInstdrv.exe to install the device drivers and SoftDogInstdrv.exe
can discern the type of your system, and install corresponding device driver to the system. 
Please follow the prompts to compelete the installing process. Note: On Windows Vista, right 
click on the installing program and on the popup menu select "Run as administrator" to run the 
program.

You,the software developer,should not only install the device driver in your system, but also
install the driver in your end user's system. Therefore you should include SoftDogInstdrv.exe and 
SoftDogSetup.dll in your release version and execute installing device driver in your application's 
SETUP process by using SoftDogInstdrv.exe directly or refer to the following Appendix A.

If you want to uninstall the drivers of SoftDog, you can also run SoftDogInstdrv.exe and click 
the "Uninstall" button to uninstall the drivers of SoftDog.

The program of SoftDogInstdrv.exe supports the command line parameter,the parameters as follow:
Command line parameter:(Not distinguish capital or lowercase.)
/?display command line help
/i Not display the installation interface
/r Not display uninstall interface
/s Not display any installation or uninstall information 
/a Install ParallelDog driver and USBDog driver(this is default)
/p Install ParallelDog driver only
/u Install USBDog driver only
For example: SoftDogInstdrv.exe /i/s Not display any information in the process of installation.

-----------
FileList:
-----------
readme-eng.txt			this document
SoftDogInstdrv.exe		The program of driver's installation or uninstallation
SoftDogSetup.dll		The dynamic link library of driver's installation
delphi			<dir>	The sample of calling SoftDogSetup.dll with Delphi
installshield		<dir>	The sample of calling SoftDogSetup.dll with Installshield
vb			<dir>	The sample of calling SoftDogSetup.dll with Visual Basic
vc			<dir>	The sample of calling SoftDogSetup.dll with Visual C++
pb			<dir>	The sample of calling SoftDogSetup.dll with Power Builder



-----------
Appendix A:
-----------

DOGSETUP.DLL is a 32-bit Windows DLL, you may use it to develop your own SETUP program in
your application's SETUP process. 

If you want to display the imformation of dog's driver, you can call the function GetDogDriverInfo in the Dll.
  int PASCAL GetDogDriverInfo();
  Parameter:none
  Return value:
  	0 No Driver is installed
  	1 The drivers(Parallel and Usb) with same version have already been installed.
  	2 The USB drivers with same version have already been installed.
  	3 The Parallel drivers with same version have already been installed.
  	4 The driver that you will install is an newer version than the one you are presently using.
  	5 The USB driver that you will install is an newer version than the one you are presently using.
  	6 The Parallel driver that you will install is an newer version than the one you are presently using.
  	7 The driver that you will install is a older version than the one you are presently using.
  	8 The USB driver that you will install is a older version than the one you are presently using.
  	9 The Parallel driver that you will install is a older version than the one you are presently using.
        3008 Not administrator

If you want to install the dog's driver, you can call the function InstDriver in the DLL.

  int PASCAL InstDriver(int iFlag);
  Parameter:
  		1 Install USB dog driver
  		2 Install Parallel dog driver
  		3 Install USB and Parallel dog driver
  Return value should be 0 if success, other return values are error codes.


If you want to uninstall the dog's driver,you can call the function UninstallDriver in the Dll.
  int PASCAL UninstallDriver(int iFlag);
  Parameter
  		1 Uninstall USB dog driver
  		2 Uninstall Parallel dog driver
  		3 Uninstall USB and Parallel dog driver
  Return value should be 0 if success, other return values are error codes.
  
  
If you want to display the interface of driver installing and uninstalling, you can call the function DriverDialog in Dll.   
  void PASCAL DriverDialog();
  Parameter:none
  Return value:none

There are demo programs in the subdirectory of delphi/insallshield/vb/vc/pb, which show how to 
call SoftDogSetup.dll to install device drivers. You may refer the samples to write your own 
installing program.  

		
----------------------------------------
Appendix B: Error code for SoftDogSetup.dll
----------------------------------------
	
 3001	Open driver service failed
 3002	Start driver service failed
 3003   Copy file failed
 3004   Operate registery failed
 3005	Unknown the operating system
 3006   Stop driver failed
 3007   Uninstall driver failed, none of this type driver is installed
 3008	You are not administrator
 3009	Invalid service
 3010   Error in mapping system library function
 3011	Error in loading system library
 3012	No USB dog device is found
 3013	Update USB dog driver failed 
 3014   Remove file failed 
 3015	Another driver installing process is running
 3016	Another driver uninstalling process is running 
 3017   There is no Parallel Port or Parallel Port is disabled
