SmartKey Driver Installation

  • Main Page
  • Files
  • File List
  • Globals

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.

Defines

#define | SKEYINST_LINK __declspec(dllimport)
#define | SKEYINST_CALL __stdcall
Error
Error codes returned.

#define | SKEYINST_ERROR_ADMIN -4
You don't have Administrator rights.
#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.

Functions

DWORD | SkeyInstallUSB (void)
Installation of the USB driver.
DWORD | SkeyInstallPar (void)
Installation of the Parallel driver.
DWORD | SkeyInstallGSS2 (void)
Installation of the GSS2 driver.
DWORD | SkeyInstallVDD (void)
Installation of the VDD driver.
DWORD | SkeyUnInstallUSB (void)
Uninstallation of the USB driver.
DWORD | SkeyUnInstallPar (void)
Uninstallation of the Parallel driver.
DWORD | SkeyUnInstallGSS2 (void)
Uninstallation of the GSS2 driver.
DWORD | SkeyUnInstallVDD (void)
Uninstallation of the VDD 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 GSS2 driver.
DWORD | SkeyForceUnInstallVDD (void)
Forced uninstallation of the VDD driver.
DWORD | SkeyGetLastError (void)
Get the last Windows error code.
DWORD | SkeyLogFile (const char *Path)
Select the log file to use.
DWORD | SkeyCAInstallAll (MSIHANDLE hInstall)
Install all the SmartKey drivers.
DWORD | SkeyCAUninstallAll (MSIHANDLE hInstall)
Uninstall all the SmartKey drivers.
DWORD | SkeyCAInstallUSB (MSIHANDLE hInstall)
Installation of the USB driver.
DWORD | SkeyCAUninstallUSB (MSIHANDLE hInstall)
Uninstallation of the USB driver.
DWORD | SkeyCAInstallPar (MSIHANDLE hInstall)
Installation of the Parallel driver.
DWORD | SkeyCAUninstallPar (MSIHANDLE hInstall)
Uninstallation of the Parallel drive.
DWORD | SkeyCAInstallGSS2 (MSIHANDLE hInstall)
Installation of the GSS2 driver.
DWORD | SkeyCAUninstallGSS2 (MSIHANDLE hInstall)
Uninstallation of the GSS2 driver.
DWORD | SkeyCAInstallVDD (MSIHANDLE hInstall)
Installation of the VDD driver.
DWORD | SkeyCAUninstallVDD (MSIHANDLE hInstall)
Uninstallation of the VDD driver.

Detailed Description

SmartKey Driver Installation.

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

If a function fails with the error code SKEYINST_ERROR_WAIT you need to ask at the user to close any other installation process and retry. If a function fails with the error code SKEYINST_ERROR_ADMIN 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.

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_ADMIN -4

You don't have Administrator rights.

To install drivers you must be an Administrator of the system.

#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.

#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 behavior 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_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.

The insertion is required to install the driver for the token. At the time of the insertion you must have Administrator rights.

#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 SkeyCAInstallAll ( MSIHANDLE hInstall )

Install all the SmartKey drivers.

Like a sequence call of SkeyInstallUSB(), SkeyInstallPar(), SkeyInstallGSS2() and SkeyInstallVDD().

Note:
This function is to be used from inside an MSI installation via a custom action calls.
Parameters:
hInstall The MSI database handle.
Returns:
ERROR_SUCCESS on success or another error code.

DWORD SkeyCAInstallGSS2 ( MSIHANDLE hInstall )

Installation of the GSS2 driver.

Like SkeyInstallGSS2().

Note:
This function is to be used from inside an MSI installation via a custom action calls.
Parameters:
hInstall The MSI database handle.
Returns:
ERROR_SUCCESS on success or another error code.

DWORD SkeyCAInstallPar ( MSIHANDLE hInstall )

Installation of the Parallel driver.

Like SkeyInstallPar().

Note:
This function is to be used from inside an MSI installation via a custom action calls.
Parameters:
hInstall The MSI database handle.
Returns:
ERROR_SUCCESS on success or another error code.

DWORD SkeyCAInstallUSB ( MSIHANDLE hInstall )

Installation of the USB driver.

Like SkeyInstallUSB().

Note:
This function is to be used from inside an MSI installation via a custom action calls.
Parameters:
hInstall The MSI database handle.
Returns:
ERROR_SUCCESS on success or another error code.

DWORD SkeyCAInstallVDD ( MSIHANDLE hInstall )

Installation of the VDD driver.

Like SkeyInstallVDD().

Note:
This function is to be used from inside an MSI installation via a custom action calls.
Parameters:
hInstall The MSI database handle.
Returns:
ERROR_SUCCESS on success or another error code.

DWORD SkeyCAUninstallAll ( MSIHANDLE hInstall )

Uninstall all the SmartKey drivers.

Like a sequence call of SkeyUnInstallUSB(), SkeyUnInstallPar(), SkeyUnInstallGSS2() and SkeyUnInstallVDD().

Note:
This function is to be used from inside an MSI installation via a custom action calls.
Parameters:
hInstall The MSI database handle.
Returns:
ERROR_SUCCESS on success or another error code.

DWORD SkeyCAUninstallGSS2 ( MSIHANDLE hInstall )

Uninstallation of the GSS2 driver.

Like SkeyUnInstallGSS2().

Note:
This function is to be used from inside an MSI installation via a custom action calls.
Parameters:
hInstall The MSI database handle.
Returns:
ERROR_SUCCESS on success or another error code.

DWORD SkeyCAUninstallPar ( MSIHANDLE hInstall )

Uninstallation of the Parallel drive.

Like SkeyUnInstallParallel().

Note:
This function is to be used from inside an MSI installation via a custom action calls.
Parameters:
hInstall The MSI database handle.
Returns:
ERROR_SUCCESS on success or another error code.

DWORD SkeyCAUninstallUSB ( MSIHANDLE hInstall )

Uninstallation of the USB driver.

Like SkeyUnInstallUSB().

Note:
This function is to be used from inside an MSI installation via a custom action calls.
Parameters:
hInstall The MSI database handle.
Returns:
ERROR_SUCCESS on success or another error code.

DWORD SkeyCAUninstallVDD ( MSIHANDLE hInstall )

Uninstallation of the VDD driver.

Like SkeyUnInstallVDD().

Note:
This function is to be used from inside an MSI installation via a custom action calls.
Parameters:
hInstall The MSI database handle.
Returns:
ERROR_SUCCESS on success or another error code.

DWORD SkeyForceUnInstallGSS2 ( void )

Forced uninstallation of the GSS2 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 SkeyForceUnInstallVDD ( void )

Forced uninstallation of the VDD 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 standard Windows GetLastError() function.

DWORD SkeyInstallGSS2 ( void )

Installation of the GSS2 driver.

All the required drivers for the GSS2 SmartKey are installed. If in the current operating system the driver isn't 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 system the driver isn't needed, nothing is done and the function returns with success.

Note:
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.

The files eusk2par*.sys and and euinst*.exe 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.

Note:
The files skeyusb*.sys, skeyusb*.inf, eusk3usb*.sys, eusk3usb*.inf, eusk3usb*.cat and euinst*.exe must reside in the same directory of the DLL.
Returns:
A SKEYINST_* code.

DWORD SkeyInstallVDD ( void )

Installation of the VDD driver.

All the required drivers for 16 bits applications are installed. In Windows Vista the VDD driver must be installed in the Windows System directory. It cannot resides in the same directory of the executable. If in the current operating system the driver isn't needed, nothing is done and the function returns with success.

Note:
The file skeyvdd.dll 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 SkeyUnInstallGSS2 ( void )

Uninstallation of the GSS2 driver.

Returns:
A SKEYINST_* code.

DWORD SkeyUnInstallPar ( void )

Uninstallation of the Parallel driver.

The 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 installed USB drivers are uninstalled. If no driver is installed nothing is done and the function returns with success.

Returns:
A SKEYINST_* code.

DWORD SkeyUnInstallVDD ( void )

Uninstallation of the VDD driver.

Returns:
A SKEYINST_* code.


  • Globals
  • All
  • Functions
  • Defines
  • s
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- s -

  • SkeyCAInstallAll() : skeyinst.h
  • SkeyCAInstallGSS2() : skeyinst.h
  • SkeyCAInstallPar() : skeyinst.h
  • SkeyCAInstallUSB() : skeyinst.h
  • SkeyCAInstallVDD() : skeyinst.h
  • SkeyCAUninstallAll() : skeyinst.h
  • SkeyCAUninstallGSS2() : skeyinst.h
  • SkeyCAUninstallPar() : skeyinst.h
  • SkeyCAUninstallUSB() : skeyinst.h
  • SkeyCAUninstallVDD() : skeyinst.h
  • SkeyForceUnInstallGSS2() : skeyinst.h
  • SkeyForceUnInstallPar() : skeyinst.h
  • SkeyForceUnInstallUSB() : skeyinst.h
  • SkeyForceUnInstallVDD() : skeyinst.h
  • SkeyGetLastError() : skeyinst.h
  • SKEYINST_ERROR_ADMIN : skeyinst.h
  • SKEYINST_ERROR_FAIL : skeyinst.h
  • SKEYINST_ERROR_UNSUPPORTED : skeyinst.h
  • SKEYINST_ERROR_WAIT : skeyinst.h
  • SKEYINST_OK : skeyinst.h
  • SKEYINST_WARNING_MUST_INSERT : skeyinst.h
  • SKEYINST_WARNING_MUST_REBOOT : skeyinst.h
  • SkeyInstallGSS2() : skeyinst.h
  • SkeyInstallPar() : skeyinst.h
  • SkeyInstallUSB() : skeyinst.h
  • SkeyInstallVDD() : skeyinst.h
  • SkeyLogFile() : skeyinst.h
  • SkeyUnInstallGSS2() : skeyinst.h
  • SkeyUnInstallPar() : skeyinst.h
  • SkeyUnInstallUSB() : skeyinst.h
  • SkeyUnInstallVDD() : skeyinst.h


  • All
  • Functions
  • Defines

  • SKEYINST_ERROR_ADMIN : skeyinst.h
  • SKEYINST_ERROR_FAIL : skeyinst.h
  • SKEYINST_ERROR_UNSUPPORTED : skeyinst.h
  • SKEYINST_ERROR_WAIT : skeyinst.h
  • SKEYINST_OK : skeyinst.h
  • SKEYINST_WARNING_MUST_INSERT : skeyinst.h
  • SKEYINST_WARNING_MUST_REBOOT : skeyinst.h


  • All
  • Functions
  • Defines

  • SkeyCAInstallAll() : skeyinst.h
  • SkeyCAInstallGSS2() : skeyinst.h
  • SkeyCAInstallPar() : skeyinst.h
  • SkeyCAInstallUSB() : skeyinst.h
  • SkeyCAInstallVDD() : skeyinst.h
  • SkeyCAUninstallAll() : skeyinst.h
  • SkeyCAUninstallGSS2() : skeyinst.h
  • SkeyCAUninstallPar() : skeyinst.h
  • SkeyCAUninstallUSB() : skeyinst.h
  • SkeyCAUninstallVDD() : skeyinst.h
  • SkeyForceUnInstallGSS2() : skeyinst.h
  • SkeyForceUnInstallPar() : skeyinst.h
  • SkeyForceUnInstallUSB() : skeyinst.h
  • SkeyForceUnInstallVDD() : skeyinst.h
  • SkeyGetLastError() : skeyinst.h
  • SkeyInstallGSS2() : skeyinst.h
  • SkeyInstallPar() : skeyinst.h
  • SkeyInstallUSB() : skeyinst.h
  • SkeyInstallVDD() : skeyinst.h
  • SkeyLogFile() : skeyinst.h
  • SkeyUnInstallGSS2() : skeyinst.h
  • SkeyUnInstallPar() : skeyinst.h
  • SkeyUnInstallUSB() : skeyinst.h
  • SkeyUnInstallVDD() : skeyinst.h


SmartKey Driver Installation Documentation


skeyinst.h

Go to the documentation of this file.
00001
00027 #ifndef __SKEYINST_H
00028 #define __SKEYINST_H
00029
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033
00034 /* Only for internal use */
00035 #ifdef SKEYINST_EXPORTS
00036 #define SKEYINST_LINK
00037 #else
00038 #define SKEYINST_LINK __declspec(dllimport)
00039 #endif
00040 #define SKEYINST_CALL __stdcall
00041
00049 SKEYINST_LINK DWORD SKEYINST_CALL SkeyInstallUSB(void);
00050
00062 SKEYINST_LINK DWORD SKEYINST_CALL SkeyInstallPar(void);
00063
00072 SKEYINST_LINK DWORD SKEYINST_CALL SkeyInstallGSS2(void);
00073
00084 SKEYINST_LINK DWORD SKEYINST_CALL SkeyInstallVDD(void);
00085
00092 SKEYINST_LINK DWORD SKEYINST_CALL SkeyUnInstallUSB(void);
00093
00100 SKEYINST_LINK DWORD SKEYINST_CALL SkeyUnInstallPar(void);
00101
00106 SKEYINST_LINK DWORD SKEYINST_CALL SkeyUnInstallGSS2(void);
00107
00112 SKEYINST_LINK DWORD SKEYINST_CALL SkeyUnInstallVDD(void);
00113
00121 SKEYINST_LINK DWORD SKEYINST_CALL SkeyForceUnInstallUSB(void);
00122
00130 SKEYINST_LINK DWORD SKEYINST_CALL SkeyForceUnInstallPar(void);
00131
00139 SKEYINST_LINK DWORD SKEYINST_CALL SkeyForceUnInstallGSS2(void);
00140
00148 SKEYINST_LINK DWORD SKEYINST_CALL SkeyForceUnInstallVDD(void);
00149
00154 SKEYINST_LINK DWORD SKEYINST_CALL SkeyGetLastError(void);
00155
00164 SKEYINST_LINK DWORD SKEYINST_CALL SkeyLogFile(const char* Path);
00165
00166 #ifdef SKEYINST_MSI
00167
00175 SKEYINST_LINK DWORD SKEYINST_CALL SkeyCAInstallAll(MSIHANDLE hInstall);
00176
00184 SKEYINST_LINK DWORD SKEYINST_CALL SkeyCAUninstallAll(MSIHANDLE hInstall);
00185
00193 SKEYINST_LINK DWORD SKEYINST_CALL SkeyCAInstallUSB(MSIHANDLE hInstall);
00194
00202 SKEYINST_LINK DWORD SKEYINST_CALL SkeyCAUninstallUSB(MSIHANDLE hInstall);
00203
00211 SKEYINST_LINK DWORD SKEYINST_CALL SkeyCAInstallPar(MSIHANDLE hInstall);
00212
00220 SKEYINST_LINK DWORD SKEYINST_CALL SkeyCAUninstallPar(MSIHANDLE hInstall);
00221
00229 SKEYINST_LINK DWORD SKEYINST_CALL SkeyCAInstallGSS2(MSIHANDLE hInstall);
00230
00238 SKEYINST_LINK DWORD SKEYINST_CALL SkeyCAUninstallGSS2(MSIHANDLE hInstall);
00239
00247 SKEYINST_LINK DWORD SKEYINST_CALL SkeyCAInstallVDD(MSIHANDLE hInstall);
00248
00256 SKEYINST_LINK DWORD SKEYINST_CALL SkeyCAUninstallVDD(MSIHANDLE hInstall);
00257 #endif
00258
00263
00269 #define SKEYINST_ERROR_ADMIN -4
00270
00285 #define SKEYINST_ERROR_WAIT -3
00286
00292 #define SKEYINST_ERROR_UNSUPPORTED -2
00293
00300 #define SKEYINST_ERROR_FAIL -1
00301
00305 #define SKEYINST_OK 0
00306
00311 #define SKEYINST_WARNING_MUST_REBOOT 1
00312
00320 #define SKEYINST_WARNING_MUST_INSERT 2
00321
00324 #ifdef __cplusplus
00325 }
00326 #endif
00327
00328 #endif