Main Page | File List | Globals

SmartKey Driver Installation Documentation


SmartKey Driver Installation File List

Here is a list of all documented files with brief descriptions:
skeyinst.h [code] SmartKey Driver Installation


skeyinst.h File Reference

SmartKey Driver Installation. More...

Go to the source code of this file.

Probing

Probing codes used with the SkeyProbe function.
  • #define SKEYINST_PROBE_USB_INSTALLED 1
    Check if the USB driver is installed.

  • #define SKEYINST_PROBE_USB_RUNNING 2
    Check if the USB driver is active.

  • #define SKEYINST_PROBE_USB_VERSION 13
    Return the version of the installed USB driver.

  • #define SKEYINST_PROBE_USB_AVAILABLE 16
    Check if the USB driver is available for installing.

  • #define SKEYINST_PROBE_PARALLEL_INSTALLED 3
    Check if the Parallel driver is installed.

  • #define SKEYINST_PROBE_PARALLEL_RUNNING 4
    Check if the Parallel driver is active.

  • #define SKEYINST_PROBE_PARALLEL_VERSION 14
    Return the version of the installed Parallel driver.

  • #define SKEYINST_PROBE_PARALLEL_AVAILABLE 17
    Check if the Parallel driver is available for installing.

  • #define SKEYINST_PROBE_GSS2_INSTALLED 11
    Check if the GSS 2 driver is installed.

  • #define SKEYINST_PROBE_GSS2_RUNNING 12
    Check if the GSS 2 driver is active.

  • #define SKEYINST_PROBE_GSS2_VERSION 15
    Return the version of the installed GSS 2 driver.

  • #define SKEYINST_PROBE_GSS2_AVAILABLE 18
    Check if the GSS 2 driver is available for installing.

  • #define SKEYINST_PROBE_INSTALL_BUSY 9
    Check if the Windows Installer is busy.

  • #define SKEYINST_PROBE_ADMINISTRATOR_PERMISSION 10
    Check if the current user has the Administrator permission.

Error

Error codes returned.
  • #define SKEYINST_ERROR_WAIT -3
    Another installation is in progress.

  • #define SKEYINST_ERROR_UNSUPPORTED -2
    This operation is unsupported in this operating system.

  • #define SKEYINST_ERROR_FAIL -1
    Generic failure.

  • #define SKEYINST_OK 0
    Operation completed successfully.

  • #define SKEYINST_WARNING_MUST_REBOOT 1
    Operation completed successfully, but you must reboot to complete the operation.

  • #define SKEYINST_WARNING_MUST_INSERT 2
    Operation completed successfully, but you must insert the token to complete the operation.

Defines

  • #define SKEYINST_LINK __declspec(dllimport)
  • #define SKEYINST_CALL __stdcall

Functions

  • DWORD SkeyInstallUSB (void)
    Installation of the USB driver.

  • DWORD SkeyInstallPar (void)
    Installation of the Parallel driver.

  • DWORD SkeyInstallGSS2 (void)
    Installation of the GSS 2 (eugss*.sys) driver.

  • DWORD SkeyUnInstallUSB (void)
    Uninstallation of the USB driver.

  • DWORD SkeyUnInstallPar (void)
    Uninstallation of the Parallel driver.

  • DWORD SkeyUnInstallGSS2 (void)
    Uninstallation of the GSS 2 (eugss*.sys) driver.

  • DWORD SkeyForceUnInstallUSB (void)
    Forced uninstallation of the USB driver.

  • DWORD SkeyForceUnInstallPar (void)
    Forced uninstallation of the Parallel driver.

  • DWORD SkeyForceUnInstallGSS2 (void)
    Forced uninstallation of the GSS 2 (eugss*.sys) driver.

  • DWORD SkeyGetLastError (void)
    Get the last Windows error code.

  • DWORD SkeyProbe (DWORD Code, DWORD *Found)
    Probe for a driver status information.

  • DWORD SkeyLogFile (const char *Path)
    Select the log file to use.

Detailed Description

SmartKey Driver Installation.

To suggested way to install the SmartKey drivers is to simply call only the required SkeyInstallPar(), SkeyInstallUSB() and SkeyInstallGSS2() functions.

If a function fails with the error code SKEYINST_PROBE_INSTALL_BUSY you need to ask at the user to close any other installation process and retry. If a function fails with the error code SKEYINST_PROBE_FAIL and with GetLastError() equal at ERROR_ACCESS_DENIED (5) you need to ask at the user to became Administrator and restart the installation. If a function fails with any other error code the installation is failed.

If a function returns with the code SKEYINST_OK, the operation is completed with success. If a function returns with the code SKEYINST_WARNING_MUST_REBOOT, you must reboot the system to complete the operation. If a function returns with the code SKEYINST_WARNING_MUST_INSERT, you need to ask at the used to insert the SmartKey to complete the process.

You can eventually use the SkeyProbe() function to check the Not Administrator and Busy conditions in advance.

Please note that you don't need to check if a driver is already installed before calling the Install() functions. If the driver is already installed and updated these functions do nothing.

Define Documentation

#define SKEYINST_ERROR_FAIL -1

Generic failure.

The operation is failed for a generic error. You can call the SkeyGetLastError() function to get the Windows error code. If an install operation is done without the Administrator rights the SkeyGetLastError() function returns the value 5 (ERROR_ACCESS_DENIED).

#define SKEYINST_ERROR_UNSUPPORTED -2

This operation is unsupported in this operating system.

You can't call the function in this operation system.

#define SKEYINST_ERROR_WAIT -3

Another installation is in progress.

You must ask at the user to complete any installation process in progress and then retry.

A good behaviours is:

  • Try the first time
  • Wait 5 seconds and retry
  • Ask the user to complete and to close any installation window and retry
  • Repeat the last step

Note that the Windows XP tooltip, shown on the lower right corner of the screen after an hardware installation, must be closed because is part of the installation process.

#define SKEYINST_OK 0

Operation completed successfully.

#define SKEYINST_PROBE_ADMINISTRATOR_PERMISSION 10

Check if the current user has the Administrator permission.

In Windows 9x it always returns TRUE.

#define SKEYINST_PROBE_GSS2_AVAILABLE 18

Check if the GSS 2 driver is available for installing.

#define SKEYINST_PROBE_GSS2_INSTALLED 11

Check if the GSS 2 driver is installed.

#define SKEYINST_PROBE_GSS2_RUNNING 12

Check if the GSS 2 driver is active.

#define SKEYINST_PROBE_GSS2_VERSION 15

Return the version of the installed GSS 2 driver.

The version number is a 4 byte code packed in a DWORD value.

#define SKEYINST_PROBE_INSTALL_BUSY 9

Check if the Windows Installer is busy.

Until the Windows Installer is busy you cannot call any other function.

#define SKEYINST_PROBE_PARALLEL_AVAILABLE 17

Check if the Parallel driver is available for installing.

#define SKEYINST_PROBE_PARALLEL_INSTALLED 3

Check if the Parallel driver is installed.

#define SKEYINST_PROBE_PARALLEL_RUNNING 4

Check if the Parallel driver is active.

#define SKEYINST_PROBE_PARALLEL_VERSION 14

Return the version of the installed Parallel driver.

The version number is a 4 byte code packed in a DWORD value.

#define SKEYINST_PROBE_USB_AVAILABLE 16

Check if the USB driver is available for installing.

#define SKEYINST_PROBE_USB_INSTALLED 1

Check if the USB driver is installed.

This command doesn't check if the correct driver is installed, but only if a generic driver connected at the token is installed. If the user install manually the "Windows Null Driver", this function reports that a driver is installed.

#define SKEYINST_PROBE_USB_RUNNING 2

Check if the USB driver is active.

#define SKEYINST_PROBE_USB_VERSION 13

Return the version of the installed USB driver.

The version number is a 4 byte code packed in a DWORD value.

#define SKEYINST_WARNING_MUST_INSERT 2

Operation completed successfully, but you must insert the token to complete the operation.

This code is generally returned after the installation of the USB Driver on Windows 9x/Me/2000/XP.

#define SKEYINST_WARNING_MUST_REBOOT 1

Operation completed successfully, but you must reboot to complete the operation.

This code is generally returned after the forced uninstallation.

Function Documentation

DWORD SkeyForceUnInstallGSS2 ( void )

Forced uninstallation of the GSS 2 (eugss*.sys) driver.

The driver is uninstalled with force removing any reference on the filesystem and registry.

Note:
Use only in extreme cases to recover from wrong installation.

After a forced uninstallation you MUST always reboot.

Returns:
A SKEYINST_* code.

DWORD SkeyForceUnInstallPar ( void )

Forced uninstallation of the Parallel driver.

The driver is uninstalled with force removing any reference on the filesystem and registry.

Note:
Use only in extreme cases to recover from wrong installation.

After a forced uninstallation you MUST always reboot.

Returns:
A SKEYINST_* code.

DWORD SkeyForceUnInstallUSB ( void )

Forced uninstallation of the USB driver.

The driver is uninstalled with force removing any reference on the filesystem and registry.

Note:
Use only in extreme cases to recover from wrong installation.

After a forced uninstallation you MUST always reboot.

Returns:
A SKEYINST_* code.

DWORD SkeyGetLastError ( void )

Get the last Windows error code.

Returns:
the last Windows error code like the GetLastError() function.

DWORD SkeyInstallGSS2 ( void )

Installation of the GSS 2 (eugss*.sys) driver.

All the required drivers for the GSS2 SmartKey are installed. If in the current operating systen no driver is needed, nothing is done and the function returns with success.

Note:
The files eugss*.sys and psapi.dll must reside in the same directory of the DLL.
Returns:
A SKEYINST_* code.

DWORD SkeyInstallPar ( void )

Installation of the Parallel driver.

All the required drivers for the Parallel SmartKey are installed. If in the current operating systen no driver is needed, nothing is done and the function returns with success. The driver is started as "Automatic". If you need to use the SmartKey in a Windows Service, you must add a dependency on the eusk2par driver, to prevent the service to start before the SmartKey driver.

Note:
The file eusk2par.sys must reside in the same directory of the DLL.
Returns:
A SKEYINST_* code.

DWORD SkeyInstallUSB ( void )

Installation of the USB driver.

All the required drivers for the USB SmartKey are installed. On Windows NT the USB Phoenix stack is also installed.

Note:
The files skeyusb.inf, skeyusbnt.inf, skeyusb.sys, skeyusbnt.sys and usbdrv.sys must reside in the same directory of the DLL.
Returns:
A SKEYINST_* code.

DWORD SkeyLogFile ( const char * Path )

Select the log file to use.

If you specify a log file, when you call one of the install or uninstall functions a very detailed report of all the operations is generated. This report can be used to debug problematic installation cases.

Parameters:
Path Complete path of the log file. Use NULL to disable it.
Returns:
A SKEYINST_* code.

DWORD SkeyProbe | ( | DWORD | Code,
 |  | DWORD * | Found
 | ) |

Probe for a driver status information.

Parameters:
Code | A SKEYINST_PROBE_* code.
Found | Output variable. This variable is set only if SKEYINST_OK is returned.
Returns:
A SKEYINST_* code.

DWORD SkeyUnInstallGSS2 ( void )

Uninstallation of the GSS 2 (eugss*.sys) driver.

Returns:
A SKEYINST_* code.

DWORD SkeyUnInstallPar ( void )

Uninstallation of the Parallel driver.

The previous installed Parallel drivers are uninstalled. If no driver is installed nothing is done and the function returns with success.

Returns:
A SKEYINST_* code.

DWORD SkeyUnInstallUSB ( void )

Uninstallation of the USB driver.

The previous installed USB drivers are uninstalled. If no driver is installed nothing is done and the function returns with success.

Returns:
A SKEYINST_* code.


s

Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- s -

  • SkeyForceUnInstallGSS2() : skeyinst.h
  • SkeyForceUnInstallPar() : skeyinst.h
  • SkeyForceUnInstallUSB() : skeyinst.h
  • SkeyGetLastError() : skeyinst.h
  • SKEYINST_ERROR_FAIL : skeyinst.h
  • SKEYINST_ERROR_UNSUPPORTED : skeyinst.h
  • SKEYINST_ERROR_WAIT : skeyinst.h
  • SKEYINST_OK : skeyinst.h
  • SKEYINST_PROBE_ADMINISTRATOR_PERMISSION : skeyinst.h
  • SKEYINST_PROBE_GSS2_AVAILABLE : skeyinst.h
  • SKEYINST_PROBE_GSS2_INSTALLED : skeyinst.h
  • SKEYINST_PROBE_GSS2_RUNNING : skeyinst.h
  • SKEYINST_PROBE_GSS2_VERSION : skeyinst.h
  • SKEYINST_PROBE_INSTALL_BUSY : skeyinst.h
  • SKEYINST_PROBE_PARALLEL_AVAILABLE : skeyinst.h
  • SKEYINST_PROBE_PARALLEL_INSTALLED : skeyinst.h
  • SKEYINST_PROBE_PARALLEL_RUNNING : skeyinst.h
  • SKEYINST_PROBE_PARALLEL_VERSION : skeyinst.h
  • SKEYINST_PROBE_USB_AVAILABLE : skeyinst.h
  • SKEYINST_PROBE_USB_INSTALLED : skeyinst.h
  • SKEYINST_PROBE_USB_RUNNING : skeyinst.h
  • SKEYINST_PROBE_USB_VERSION : skeyinst.h
  • SKEYINST_WARNING_MUST_INSERT : skeyinst.h
  • SKEYINST_WARNING_MUST_REBOOT : skeyinst.h
  • SkeyInstallGSS2() : skeyinst.h
  • SkeyInstallPar() : skeyinst.h
  • SkeyInstallUSB() : skeyinst.h
  • SkeyLogFile() : skeyinst.h
  • SkeyProbe() : skeyinst.h
  • SkeyUnInstallGSS2() : skeyinst.h
  • SkeyUnInstallPar() : skeyinst.h
  • SkeyUnInstallUSB() : skeyinst.h


  • SKEYINST_ERROR_FAIL : skeyinst.h
  • SKEYINST_ERROR_UNSUPPORTED : skeyinst.h
  • SKEYINST_ERROR_WAIT : skeyinst.h
  • SKEYINST_OK : skeyinst.h
  • SKEYINST_PROBE_ADMINISTRATOR_PERMISSION : skeyinst.h
  • SKEYINST_PROBE_GSS2_AVAILABLE : skeyinst.h
  • SKEYINST_PROBE_GSS2_INSTALLED : skeyinst.h
  • SKEYINST_PROBE_GSS2_RUNNING : skeyinst.h
  • SKEYINST_PROBE_GSS2_VERSION : skeyinst.h
  • SKEYINST_PROBE_INSTALL_BUSY : skeyinst.h
  • SKEYINST_PROBE_PARALLEL_AVAILABLE : skeyinst.h
  • SKEYINST_PROBE_PARALLEL_INSTALLED : skeyinst.h
  • SKEYINST_PROBE_PARALLEL_RUNNING : skeyinst.h
  • SKEYINST_PROBE_PARALLEL_VERSION : skeyinst.h
  • SKEYINST_PROBE_USB_AVAILABLE : skeyinst.h
  • SKEYINST_PROBE_USB_INSTALLED : skeyinst.h
  • SKEYINST_PROBE_USB_RUNNING : skeyinst.h
  • SKEYINST_PROBE_USB_VERSION : skeyinst.h
  • SKEYINST_WARNING_MUST_INSERT : skeyinst.h
  • SKEYINST_WARNING_MUST_REBOOT : skeyinst.h


  • SkeyForceUnInstallGSS2() : skeyinst.h
  • SkeyForceUnInstallPar() : skeyinst.h
  • SkeyForceUnInstallUSB() : skeyinst.h
  • SkeyGetLastError() : skeyinst.h
  • SkeyInstallGSS2() : skeyinst.h
  • SkeyInstallPar() : skeyinst.h
  • SkeyInstallUSB() : skeyinst.h
  • SkeyLogFile() : skeyinst.h
  • SkeyProbe() : skeyinst.h
  • SkeyUnInstallGSS2() : skeyinst.h
  • SkeyUnInstallPar() : skeyinst.h
  • SkeyUnInstallUSB() : skeyinst.h


skeyinst.h

Go to the documentation of this file.
00001
00030 #ifndef __SKEYINST_H
00031 #define __SKEYINST_H
00032
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036
00037 /* Only for internal use */
00038 #ifdef SKEYINST_EXPORTS
00039 #define SKEYINST_LINK
00040 #else
00041 #define SKEYINST_LINK __declspec(dllimport)
00042 #endif
00043 #define SKEYINST_CALL __stdcall
00044
00053 SKEYINST_LINK DWORD SKEYINST_CALL SkeyInstallUSB(void);
00054
00065 SKEYINST_LINK DWORD SKEYINST_CALL SkeyInstallPar(void);
00066
00075 SKEYINST_LINK DWORD SKEYINST_CALL SkeyInstallGSS2(void);
00076
00083 SKEYINST_LINK DWORD SKEYINST_CALL SkeyUnInstallUSB(void);
00084
00091 SKEYINST_LINK DWORD SKEYINST_CALL SkeyUnInstallPar(void);
00092
00097 SKEYINST_LINK DWORD SKEYINST_CALL SkeyUnInstallGSS2(void);
00098
00106 SKEYINST_LINK DWORD SKEYINST_CALL SkeyForceUnInstallUSB(void);
00107
00115 SKEYINST_LINK DWORD SKEYINST_CALL SkeyForceUnInstallPar(void);
00116
00124 SKEYINST_LINK DWORD SKEYINST_CALL SkeyForceUnInstallGSS2(void);
00125
00130 SKEYINST_LINK DWORD SKEYINST_CALL SkeyGetLastError(void);
00131
00142 #define SKEYINST_PROBE_USB_INSTALLED 1
00143
00147 #define SKEYINST_PROBE_USB_RUNNING 2
00148
00153 #define SKEYINST_PROBE_USB_VERSION 13
00154
00158 #define SKEYINST_PROBE_USB_AVAILABLE 16
00159
00163 #define SKEYINST_PROBE_PARALLEL_INSTALLED 3
00164
00168 #define SKEYINST_PROBE_PARALLEL_RUNNING 4
00169
00174 #define SKEYINST_PROBE_PARALLEL_VERSION 14
00175
00179 #define SKEYINST_PROBE_PARALLEL_AVAILABLE 17
00180
00184 #define SKEYINST_PROBE_GSS2_INSTALLED 11
00185
00189 #define SKEYINST_PROBE_GSS2_RUNNING 12
00190
00195 #define SKEYINST_PROBE_GSS2_VERSION 15
00196
00200 #define SKEYINST_PROBE_GSS2_AVAILABLE 18
00201
00206 #define SKEYINST_PROBE_INSTALL_BUSY 9
00207
00212 #define SKEYINST_PROBE_ADMINISTRATOR_PERMISSION 10
00213
00222 SKEYINST_LINK DWORD SKEYINST_CALL SkeyProbe(DWORD Code, DWORD* Found);
00223
00232 SKEYINST_LINK DWORD SKEYINST_CALL SkeyLogFile(const char* Path);
00233
00238
00253 #define SKEYINST_ERROR_WAIT -3
00254
00259 #define SKEYINST_ERROR_UNSUPPORTED -2
00260
00268 #define SKEYINST_ERROR_FAIL -1
00269
00273 #define SKEYINST_OK 0
00274
00279 #define SKEYINST_WARNING_MUST_REBOOT 1
00280
00285 #define SKEYINST_WARNING_MUST_INSERT 2
00286
00289 #ifdef __cplusplus
00290 }
00291 #endif
00292
00293 #endif