adddsn.c File Reference

DSN creation utility for Win32. More...

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

Functions

static BOOL ProcessErrorMessages (char *name)
 Handler for ODBC installation error messages.
 
int APIENTRY WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)
 Main function of DSN utility.
 

Detailed Description

DSN creation utility for Win32.

Id
adddsn.c,v 1.8 2013/01/11 12:19:55 chw Exp chw

Copyright (c) 2003-2013 Christian Werner chw@c.nosp@m.h-we.nosp@m.rner..nosp@m.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 adddsn.c.

Function Documentation

◆ ProcessErrorMessages()

static BOOL ProcessErrorMessages ( char * name)
static

Handler for ODBC installation error messages.

Parameters
namename of API function for which to show error messages

Definition at line 32 of file adddsn.c.

Referenced by WinMain().

◆ WinMain()

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

Main function of DSN utility.

This is the Win32 GUI main entry point. It (un)installs a DSN.

Example usage:

add[sys]dsn "SQLite ODBC Driver" DSN=foobar;Database=C:/FOOBAR rem[sys]dsn "SQLite ODBC Driver" DSN=foobar

Definition at line 66 of file adddsn.c.

References ProcessErrorMessages().


Generated on Sun Nov 26 2023 by doxygen.
Contact: chw@ch-werner.de