Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

inst.c File Reference


Detailed Description

SQLite ODBC Driver installer/uninstaller for WIN32.

Id:
inst.c,v 1.17 2012/01/24 07:40:58 chw Exp chw

Copyright (c) 2001-2012 Christian Werner <chw@ch-werner.de>

See the file "license.terms" for information on usage and redistribution of this file and for a DISCLAIMER OF ALL WARRANTIES.

Definition in file inst.c.#include <windows.h>
#include <sql.h>
#include <sqlext.h>
#include <odbcinst.h>
#include <winver.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>

Go to the source code of this file.

Defines

#define SEEEXT   ""
#define SEESTR   ""
#define SEESTR2   ""
#define NUMDRVS   3

Functions

BOOL ProcessErrorMessages (char *name)
 Handler for ODBC installation error messages.

BOOL CopyOrDelModules (char *dllname, char *path, BOOL del)
 Copy or delete SQLite3 module DLLs.

BOOL InUn (int remove, char *drivername, char *dllname, char *dll2name, char *dsname)
 Driver installer/uninstaller.

int APIENTRY WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)
 Main function of installer/uninstaller.


Variables

char * DriverName [NUMDRVS]
char * DSName [NUMDRVS]
char * DriverDLL [NUMDRVS]
int quiet = 0
int nosys = 0


Define Documentation

#define NUMDRVS   3
 

Definition at line 49 of file inst.c.

Referenced by WinMain().

#define SEEEXT   ""
 

Definition at line 27 of file inst.c.

#define SEESTR   ""
 

Definition at line 28 of file inst.c.

#define SEESTR2   ""
 

Definition at line 29 of file inst.c.


Function Documentation

BOOL CopyOrDelModules char *    dllname,
char *    path,
BOOL    del
[static]
 

Copy or delete SQLite3 module DLLs.

Parameters:
dllname  file name of driver DLL
path  install directory for modules
del  flag, when true, delete DLLs in install directory

Definition at line 113 of file inst.c.

Referenced by InUn().

BOOL InUn int    remove,
char *    drivername,
char *    dllname,
char *    dll2name,
char *    dsname
[static]
 

Driver installer/uninstaller.

Parameters:
remove  true for uninstall
drivername  print name of driver
dllname  file name of driver DLL
dll2name  file name of additional DLL
dsname  name for data source

Definition at line 164 of file inst.c.

References CopyOrDelModules(), ProcessErrorMessages(), and quiet.

Referenced by WinMain().

BOOL ProcessErrorMessages char *    name [static]
 

Handler for ODBC installation error messages.

Parameters:
name  name of API function for which to show error messages

Definition at line 83 of file inst.c.

int APIENTRY WinMain HINSTANCE    hInstance,
HINSTANCE    hPrevInstance,
LPSTR    lpszCmdLine,
int    nCmdShow
 

Main function of installer/uninstaller.

This is the Win32 GUI main entry point. It (un)registers the ODBC driver(s) and deletes or copies the driver DLL(s) to the system folder.

Definition at line 306 of file inst.c.

References DriverDLL, DriverName, DSName, InUn(), nosys, NUMDRVS, and quiet.


Variable Documentation

char* DriverDLL[NUMDRVS] [static]
 

Initial value:

 {
    "sqliteodbc.dll",
    "sqliteodbcu.dll",
    "sqlite3odbc" SEEEXT ".dll"
}

Definition at line 60 of file inst.c.

Referenced by WinMain().

char* DriverName[NUMDRVS] [static]
 

Initial value:

 {
    "SQLite ODBC Driver",
    "SQLite ODBC (UTF-8) Driver",
    "SQLite3 ODBC Driver" SEESTR
}

Definition at line 50 of file inst.c.

Referenced by WinMain().

char* DSName[NUMDRVS] [static]
 

Initial value:

 {
    "SQLite Datasource",
    "SQLite UTF-8 Datasource",
    "SQLite3 " SEESTR2 "Datasource"
}

Definition at line 55 of file inst.c.

Referenced by WinMain().

int nosys = 0 [static]
 

Definition at line 75 of file inst.c.

Referenced by WinMain().

int quiet = 0 [static]
 

Definition at line 74 of file inst.c.

Referenced by InUn(), and WinMain().


Generated on 25 Jan 2012 by doxygen.
Contact: chw@ch-werner.de