From b5c63ed4918eac5dbb2a412c892df9897684ab66 Mon Sep 17 00:00:00 2001
From: Mike McCormack <mike@codeweavers.com>
Date: Mon, 16 May 2005 19:42:47 +0000
Subject: [PATCH] Initial mostly stub implementation of ODBC control panel.

---
 configure                   |   3 +-
 configure.ac                |   1 +
 dlls/Makefile.in            |  10 +
 dlls/odbccp32/.cvsignore    |   3 +
 dlls/odbccp32/Makefile.in   |  15 ++
 dlls/odbccp32/odbccp32.c    | 498 ++++++++++++++++++++++++++++++++++++
 dlls/odbccp32/odbccp32.spec |  57 +++++
 7 files changed, 586 insertions(+), 1 deletion(-)
 create mode 100644 dlls/odbccp32/.cvsignore
 create mode 100644 dlls/odbccp32/Makefile.in
 create mode 100644 dlls/odbccp32/odbccp32.c
 create mode 100644 dlls/odbccp32/odbccp32.spec

diff --git a/configure b/configure
index 08fe98585ab..ac49260a53d 100755
--- a/configure
+++ b/configure
@@ -19959,7 +19959,7 @@ MAKE_LIB_RULES=libs/Makelib.rules
 MAKE_PROG_RULES=programs/Makeprog.rules
 
 
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules dlls/Maketest.rules libs/Makelib.rules programs/Makeprog.rules Makefile dlls/Makefile dlls/advapi32/Makefile dlls/advapi32/tests/Makefile dlls/advpack/Makefile dlls/advpack/tests/Makefile dlls/amstream/Makefile dlls/atl/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/cabinet/Makefile dlls/capi2032/Makefile dlls/cards/Makefile dlls/cfgmgr32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/comctl32/tests/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/cryptdll/Makefile dlls/ctl3d/Makefile dlls/d3d8/Makefile dlls/d3d9/Makefile dlls/d3dim/Makefile dlls/d3drm/Makefile dlls/d3dx8/Makefile dlls/d3dxof/Makefile dlls/dbghelp/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/ddraw/tests/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput/tests/Makefile dlls/dinput8/Makefile dlls/dmband/Makefile dlls/dmcompos/Makefile dlls/dmime/Makefile dlls/dmloader/Makefile dlls/dmscript/Makefile dlls/dmstyle/Makefile dlls/dmsynth/Makefile dlls/dmusic/Makefile dlls/dmusic32/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dpnet/Makefile dlls/dpnhpast/Makefile dlls/dsound/Makefile dlls/dsound/tests/Makefile dlls/dswave/Makefile dlls/dxdiagn/Makefile dlls/dxerr8/Makefile dlls/dxerr9/Makefile dlls/dxguid/Makefile dlls/gdi/Makefile dlls/gdi/tests/Makefile dlls/glu32/Makefile dlls/glut32/Makefile dlls/hhctrl.ocx/Makefile dlls/iccvid/Makefile dlls/icmp/Makefile dlls/ifsmgr.vxd/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/iphlpapi/Makefile dlls/iphlpapi/tests/Makefile dlls/itss/Makefile dlls/kernel/Makefile dlls/kernel/tests/Makefile dlls/lzexpand/Makefile dlls/lzexpand/tests/Makefile dlls/mapi32/Makefile dlls/mapi32/tests/Makefile dlls/mlang/Makefile dlls/mlang/tests/Makefile dlls/mmdevldr.vxd/Makefile dlls/monodebg.vxd/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msacm/tests/Makefile dlls/mscms/Makefile dlls/mscms/tests/Makefile dlls/msdmo/Makefile dlls/mshtml/Makefile dlls/msi/Makefile dlls/msi/tests/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt/tests/Makefile dlls/msvcrt20/Makefile dlls/msvcrt40/Makefile dlls/msvcrtd/Makefile dlls/msvcrtd/tests/Makefile dlls/msvidc32/Makefile dlls/msvideo/Makefile dlls/mswsock/Makefile dlls/netapi32/Makefile dlls/netapi32/tests/Makefile dlls/newdev/Makefile dlls/ntdll/Makefile dlls/ntdll/tests/Makefile dlls/odbc32/Makefile dlls/ole32/Makefile dlls/ole32/tests/Makefile dlls/oleacc/Makefile dlls/oleaut32/Makefile dlls/oleaut32/tests/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/powrprof/Makefile dlls/psapi/Makefile dlls/psapi/tests/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/quartz/tests/Makefile dlls/rasapi32/Makefile dlls/riched20/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/rpcrt4/tests/Makefile dlls/rsabase/Makefile dlls/rsabase/tests/Makefile dlls/rsaenh/Makefile dlls/rsaenh/tests/Makefile dlls/secur32/Makefile dlls/sensapi/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shell32/tests/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/shlwapi/tests/Makefile dlls/snmpapi/Makefile dlls/stdole32.tlb/Makefile dlls/sti/Makefile dlls/strmiids/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/unicows/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/urlmon/tests/Makefile dlls/user/Makefile dlls/user/tests/Makefile dlls/uuid/Makefile dlls/uxtheme/Makefile dlls/vdhcp.vxd/Makefile dlls/vdmdbg/Makefile dlls/version/Makefile dlls/version/tests/Makefile dlls/vmm.vxd/Makefile dlls/vnbt.vxd/Makefile dlls/vnetbios.vxd/Makefile dlls/vtdapi.vxd/Makefile dlls/vwin32.vxd/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/wined3d/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/wininet/tests/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/tests/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winealsa/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineaudioio/Makefile dlls/winmm/winejack/Makefile dlls/winmm/winenas/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winsock/tests/Makefile dlls/winspool/Makefile dlls/winspool/tests/Makefile dlls/wintab32/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/wtsapi32/Makefile dlls/x11drv/Makefile documentation/Makefile fonts/Makefile include/Makefile libs/Makefile libs/port/Makefile libs/unicode/Makefile libs/wine/Makefile libs/wpp/Makefile loader/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/msiexec/Makefile programs/notepad/Makefile programs/progman/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/rpcss/Makefile programs/rundll32/Makefile programs/start/Makefile programs/taskmgr/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineboot/Makefile programs/winebrowser/Makefile programs/winecfg/Makefile programs/wineconsole/Makefile programs/winedbg/Makefile programs/winefile/Makefile programs/winemenubuilder/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winevdm/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/widl/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/winegcc/Makefile tools/wmc/Makefile tools/wrc/Makefile"
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules dlls/Maketest.rules libs/Makelib.rules programs/Makeprog.rules Makefile dlls/Makefile dlls/advapi32/Makefile dlls/advapi32/tests/Makefile dlls/advpack/Makefile dlls/advpack/tests/Makefile dlls/amstream/Makefile dlls/atl/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/cabinet/Makefile dlls/capi2032/Makefile dlls/cards/Makefile dlls/cfgmgr32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/comctl32/tests/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/cryptdll/Makefile dlls/ctl3d/Makefile dlls/d3d8/Makefile dlls/d3d9/Makefile dlls/d3dim/Makefile dlls/d3drm/Makefile dlls/d3dx8/Makefile dlls/d3dxof/Makefile dlls/dbghelp/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/ddraw/tests/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput/tests/Makefile dlls/dinput8/Makefile dlls/dmband/Makefile dlls/dmcompos/Makefile dlls/dmime/Makefile dlls/dmloader/Makefile dlls/dmscript/Makefile dlls/dmstyle/Makefile dlls/dmsynth/Makefile dlls/dmusic/Makefile dlls/dmusic32/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dpnet/Makefile dlls/dpnhpast/Makefile dlls/dsound/Makefile dlls/dsound/tests/Makefile dlls/dswave/Makefile dlls/dxdiagn/Makefile dlls/dxerr8/Makefile dlls/dxerr9/Makefile dlls/dxguid/Makefile dlls/gdi/Makefile dlls/gdi/tests/Makefile dlls/glu32/Makefile dlls/glut32/Makefile dlls/hhctrl.ocx/Makefile dlls/iccvid/Makefile dlls/icmp/Makefile dlls/ifsmgr.vxd/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/iphlpapi/Makefile dlls/iphlpapi/tests/Makefile dlls/itss/Makefile dlls/kernel/Makefile dlls/kernel/tests/Makefile dlls/lzexpand/Makefile dlls/lzexpand/tests/Makefile dlls/mapi32/Makefile dlls/mapi32/tests/Makefile dlls/mlang/Makefile dlls/mlang/tests/Makefile dlls/mmdevldr.vxd/Makefile dlls/monodebg.vxd/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msacm/tests/Makefile dlls/mscms/Makefile dlls/mscms/tests/Makefile dlls/msdmo/Makefile dlls/mshtml/Makefile dlls/msi/Makefile dlls/msi/tests/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt/tests/Makefile dlls/msvcrt20/Makefile dlls/msvcrt40/Makefile dlls/msvcrtd/Makefile dlls/msvcrtd/tests/Makefile dlls/msvidc32/Makefile dlls/msvideo/Makefile dlls/mswsock/Makefile dlls/netapi32/Makefile dlls/netapi32/tests/Makefile dlls/newdev/Makefile dlls/ntdll/Makefile dlls/ntdll/tests/Makefile dlls/odbc32/Makefile dlls/odbccp32/Makefile dlls/ole32/Makefile dlls/ole32/tests/Makefile dlls/oleacc/Makefile dlls/oleaut32/Makefile dlls/oleaut32/tests/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/powrprof/Makefile dlls/psapi/Makefile dlls/psapi/tests/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/quartz/tests/Makefile dlls/rasapi32/Makefile dlls/riched20/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/rpcrt4/tests/Makefile dlls/rsabase/Makefile dlls/rsabase/tests/Makefile dlls/rsaenh/Makefile dlls/rsaenh/tests/Makefile dlls/secur32/Makefile dlls/sensapi/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shell32/tests/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/shlwapi/tests/Makefile dlls/snmpapi/Makefile dlls/stdole32.tlb/Makefile dlls/sti/Makefile dlls/strmiids/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/unicows/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/urlmon/tests/Makefile dlls/user/Makefile dlls/user/tests/Makefile dlls/uuid/Makefile dlls/uxtheme/Makefile dlls/vdhcp.vxd/Makefile dlls/vdmdbg/Makefile dlls/version/Makefile dlls/version/tests/Makefile dlls/vmm.vxd/Makefile dlls/vnbt.vxd/Makefile dlls/vnetbios.vxd/Makefile dlls/vtdapi.vxd/Makefile dlls/vwin32.vxd/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/wined3d/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/wininet/tests/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/tests/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winealsa/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineaudioio/Makefile dlls/winmm/winejack/Makefile dlls/winmm/winenas/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winsock/tests/Makefile dlls/winspool/Makefile dlls/winspool/tests/Makefile dlls/wintab32/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/wtsapi32/Makefile dlls/x11drv/Makefile documentation/Makefile fonts/Makefile include/Makefile libs/Makefile libs/port/Makefile libs/unicode/Makefile libs/wine/Makefile libs/wpp/Makefile loader/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/msiexec/Makefile programs/notepad/Makefile programs/progman/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/rpcss/Makefile programs/rundll32/Makefile programs/start/Makefile programs/taskmgr/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineboot/Makefile programs/winebrowser/Makefile programs/winecfg/Makefile programs/wineconsole/Makefile programs/winedbg/Makefile programs/winefile/Makefile programs/winemenubuilder/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winevdm/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/widl/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/winegcc/Makefile tools/wmc/Makefile tools/wrc/Makefile"
 
 
 cat >confcache <<\_ACEOF
@@ -20606,6 +20606,7 @@ do
   "dlls/ntdll/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/ntdll/Makefile" ;;
   "dlls/ntdll/tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/ntdll/tests/Makefile" ;;
   "dlls/odbc32/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/odbc32/Makefile" ;;
+  "dlls/odbccp32/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/odbccp32/Makefile" ;;
   "dlls/ole32/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/ole32/Makefile" ;;
   "dlls/ole32/tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/ole32/tests/Makefile" ;;
   "dlls/oleacc/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/oleacc/Makefile" ;;
diff --git a/configure.ac b/configure.ac
index a5f207df03d..d60ebe1f3db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1627,6 +1627,7 @@ dlls/newdev/Makefile
 dlls/ntdll/Makefile
 dlls/ntdll/tests/Makefile
 dlls/odbc32/Makefile
+dlls/odbccp32/Makefile
 dlls/ole32/Makefile
 dlls/ole32/tests/Makefile
 dlls/oleacc/Makefile
diff --git a/dlls/Makefile.in b/dlls/Makefile.in
index 91ce3bf51dd..b4481fec480 100644
--- a/dlls/Makefile.in
+++ b/dlls/Makefile.in
@@ -97,6 +97,7 @@ BASEDIRS = \
 	newdev \
 	ntdll \
 	odbc32 \
+	odbccp32 \
 	ole32 \
 	oleacc \
 	oleaut32 \
@@ -342,6 +343,7 @@ SYMLINKS_SO = \
 	newdev.dll.so \
 	ntdll.dll.so \
 	odbc32.dll.so \
+	odbccp32.dll.so \
 	ole32.dll.so \
 	oleacc.dll.so \
 	oleaut32.dll.so \
@@ -735,6 +737,9 @@ ntdll.dll.so: ntdll/ntdll.dll.so
 odbc32.dll.so: odbc32/odbc32.dll.so
 	$(RM) $@ && $(LN_S) odbc32/odbc32.dll.so $@
 
+odbccp32.dll.so: odbccp32/odbccp32.dll.so
+	$(RM) $@ && $(LN_S) odbccp32/odbccp32.dll.so $@
+
 ole32.dll.so: ole32/ole32.dll.so
 	$(RM) $@ && $(LN_S) ole32/ole32.dll.so $@
 
@@ -1121,6 +1126,7 @@ IMPORT_LIBS = \
 	newdev/libnewdev.$(IMPLIBEXT) \
 	ntdll/libntdll.$(IMPLIBEXT) \
 	odbc32/libodbc32.$(IMPLIBEXT) \
+	odbccp32/libodbccp32.$(IMPLIBEXT) \
 	ole32/libole32.$(IMPLIBEXT) \
 	oleacc/liboleacc.$(IMPLIBEXT) \
 	oleaut32/liboleaut32.$(IMPLIBEXT) \
@@ -1412,6 +1418,9 @@ ntdll/libntdll.$(IMPLIBEXT): ntdll/ntdll.spec $(WINEBUILD)
 odbc32/libodbc32.$(IMPLIBEXT): odbc32/odbc32.spec $(WINEBUILD)
 	@cd odbc32 && $(MAKE) libodbc32.$(IMPLIBEXT)
 
+odbccp32/libodbccp32.$(IMPLIBEXT): odbccp32/odbccp32.spec $(WINEBUILD)
+	@cd odbccp32 && $(MAKE) libodbccp32.$(IMPLIBEXT)
+
 ole32/libole32.$(IMPLIBEXT): ole32/ole32.spec $(WINEBUILD)
 	@cd ole32 && $(MAKE) libole32.$(IMPLIBEXT)
 
@@ -1715,6 +1724,7 @@ netapi32/netapi32.dll.so: netapi32
 newdev/newdev.dll.so: newdev
 ntdll/ntdll.dll.so: ntdll
 odbc32/odbc32.dll.so: odbc32
+odbccp32/odbccp32.dll.so: odbccp32
 ole32/ole32.dll.so: ole32
 oleacc/oleacc.dll.so: oleacc
 oleaut32/oleaut32.dll.so: oleaut32
diff --git a/dlls/odbccp32/.cvsignore b/dlls/odbccp32/.cvsignore
new file mode 100644
index 00000000000..c8b30fe5edf
--- /dev/null
+++ b/dlls/odbccp32/.cvsignore
@@ -0,0 +1,3 @@
+Makefile
+libodbccp32.def
+odbccp32.dll.dbg.c
diff --git a/dlls/odbccp32/Makefile.in b/dlls/odbccp32/Makefile.in
new file mode 100644
index 00000000000..f7713271e4e
--- /dev/null
+++ b/dlls/odbccp32/Makefile.in
@@ -0,0 +1,15 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+MODULE    = odbccp32.dll
+IMPORTLIB = libodbccp32.$(IMPLIBEXT)
+IMPORTS   = ole32 advapi32 kernel32
+EXTRALIBS = -luuid $(LIBUNICODE)
+
+C_SRCS = \
+	odbccp32.c
+
+@MAKE_DLL_RULES@
+
+### Dependencies:
diff --git a/dlls/odbccp32/odbccp32.c b/dlls/odbccp32/odbccp32.c
new file mode 100644
index 00000000000..604cb0e2e98
--- /dev/null
+++ b/dlls/odbccp32/odbccp32.c
@@ -0,0 +1,498 @@
+/*
+ * Implementation of the ODBC driver installer
+ *
+ * Copyright 2005 Mike McCormack for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <stdarg.h>
+
+#define COBJMACROS
+#define NONAMELESSUNION
+
+#include "windef.h"
+#include "winbase.h"
+#include "winreg.h"
+#include "winnls.h"
+#include "wine/debug.h"
+
+#include "odbcinst.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(odbc);
+
+static LPWSTR SQLInstall_strdup_multi(LPCSTR str)
+{
+    LPCSTR p;
+    LPWSTR ret = NULL;
+    DWORD len;
+
+    if (!str)
+        return ret;
+
+    for (p = str; *p; p += lstrlenA(p) + 1)
+        ;
+
+    len = MultiByteToWideChar(CP_ACP, 0, str, p - str, NULL, 0 );
+    ret = HeapAlloc(GetProcessHeap(), 0, (len+1)*sizeof(WCHAR));
+    MultiByteToWideChar(CP_ACP, 0, str, p - str, ret, len );
+    ret[len] = 0;
+
+    return ret;
+}
+
+static LPWSTR SQLInstall_strdup(LPCSTR str)
+{
+    DWORD len;
+    LPWSTR ret = NULL;
+
+    if (!str)
+        return ret;
+
+    len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0 );
+    ret = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR));
+    MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len );
+
+    return ret;
+}
+
+BOOL WINAPI SQLConfigDataSourceW(HWND hwndParent, WORD fRequest,
+               LPCWSTR lpszDriver, LPCWSTR lpszAttributes)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLConfigDataSource(HWND hwndParent, WORD fRequest,
+               LPCSTR lpszDriver, LPCSTR lpszAttributes)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLConfigDriverW(HWND hwndParent, WORD fRequest, LPCWSTR lpszDriver,
+               LPCWSTR lpszArgs, LPWSTR lpszMsg, WORD cbMsgMax, WORD *pcbMsgOut)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLConfigDriver(HWND hwndParent, WORD fRequest, LPCSTR lpszDriver,
+               LPCSTR lpszArgs, LPSTR lpszMsg, WORD cbMsgMax, WORD *pcbMsgOut)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLCreateDataSourceW(HWND hwnd, LPWSTR lpszDS)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLCreateDataSource(HWND hwnd, LPSTR lpszDS)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLGetAvailableDriversW(LPCWSTR lpszInfFile, LPWSTR lpszBuf,
+               WORD cbBufMax, WORD *pcbBufOut)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLGetAvailableDrivers(LPCSTR lpszInfFile, LPSTR lpszBuf,
+               WORD cbBufMax, WORD *pcbBufOut)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLGetConfigMode(UWORD *pwConfigMode)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLGetInstalledDriversW(LPWSTR lpszBuf, WORD cbBufMax,
+               WORD *pcbBufOut)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLGetInstalledDrivers(LPSTR lpszBuf, WORD cbBufMax,
+               WORD *pcbBufOut)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+int WINAPI SQLGetPrivateProfileStringW(LPCWSTR lpszSection, LPCWSTR lpszEntry,
+               LPCWSTR lpszDefault, LPCWSTR RetBuffer, INT cbRetBuffer,
+               LPCWSTR lpszFilename)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+int WINAPI SQLGetPrivateProfileString(LPCSTR lpszSection, LPCSTR lpszEntry,
+               LPCSTR lpszDefault, LPCSTR RetBuffer, INT cbRetBuffer,
+               LPCSTR lpszFilename)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLGetTranslatorW(HWND hwndParent, LPWSTR lpszName, WORD cbNameMax,
+               WORD *pcbNameOut, LPWSTR lpszPath, WORD cbPathMax,
+               WORD *pcbPathOut, DWORD *pvOption)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLGetTranslator(HWND hwndParent, LPSTR lpszName, WORD cbNameMax,
+               WORD *pcbNameOut, LPSTR lpszPath, WORD cbPathMax,
+               WORD *pcbPathOut, DWORD *pvOption)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLInstallDriverW(LPCWSTR lpszInfFile, LPCWSTR lpszDriver,
+               LPWSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut)
+{
+    FIXME("%s %s %p %d %p\n", debugstr_w(lpszInfFile),
+          debugstr_w(lpszDriver), lpszPath, cbPathMax, pcbPathOut);
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLInstallDriver(LPCSTR lpszInfFile, LPCSTR lpszDriver,
+               LPSTR lpszPath, WORD cbPathMax, WORD * pcbPathOut)
+{
+    FIXME("%s %s %p %d %p\n", debugstr_a(lpszInfFile),
+          debugstr_a(lpszDriver), lpszPath, cbPathMax, pcbPathOut);
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLInstallDriverExW(LPCWSTR lpszDriver, LPCWSTR lpszPathIn,
+               LPWSTR lpszPathOut, WORD cbPathOutMax, WORD *pcbPathOut,
+               WORD fRequest, LPDWORD lpdwUsageCount)
+{
+    LPCWSTR p;
+
+    FIXME("%s %s %p %d %p %d %p\n", debugstr_w(lpszDriver), debugstr_w(lpszPathIn),
+          lpszPathOut, cbPathOutMax, pcbPathOut, fRequest, lpdwUsageCount);
+
+    for (p = lpszDriver; *p; p += lstrlenW(p) + 1)
+        FIXME("%s\n", debugstr_w(p));
+
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLInstallDriverEx(LPCSTR lpszDriver, LPCSTR lpszPathIn,
+               LPSTR lpszPathOut, WORD cbPathOutMax, WORD *pcbPathOut,
+               WORD fRequest, LPDWORD lpdwUsageCount)
+{
+    LPWSTR driver, pathin;
+    WCHAR pathout[MAX_PATH];
+    BOOL r;
+    WORD cbOut = 0;
+
+    TRACE("%s %s %p %d %p %d %p\n", debugstr_a(lpszDriver), debugstr_a(lpszPathIn),
+          lpszPathOut, cbPathOutMax, pcbPathOut, fRequest, lpdwUsageCount);
+
+    driver = SQLInstall_strdup_multi(lpszDriver);
+    pathin = SQLInstall_strdup(lpszPathIn);
+
+    r = SQLInstallDriverExW( driver, pathin, pathout, MAX_PATH,
+                             &cbOut, fRequest, lpdwUsageCount );
+    if (r)
+    {
+        *pcbPathOut = WideCharToMultiByte(CP_ACP, 0, pathout, -1,
+                         lpszPathOut, cbPathOutMax, NULL, NULL );
+    }
+
+    return r;
+}
+
+BOOL WINAPI SQLInstallDriverManagerW(LPWSTR lpszPath, WORD cbPathMax,
+               WORD *pcbPathOut)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLInstallDriverManager(LPSTR lpszPath, WORD cbPathMax,
+               WORD *pcbPathOut)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLInstallODBCW(HWND hwndParent, LPCWSTR lpszInfFile,
+               LPCWSTR lpszSrcPath, LPCWSTR lpszDrivers)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLInstallODBC(HWND hwndParent, LPCSTR lpszInfFile,
+               LPCSTR lpszSrcPath, LPCSTR lpszDrivers)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+RETCODE WINAPI SQLInstallerErrorW(WORD iError, DWORD *pfErrorCode,
+               LPWSTR lpszErrorMsg, WORD cbErrorMsgMax, WORD *pcbErrorMsg)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+RETCODE WINAPI SQLInstallerError(WORD iError, DWORD *pfErrorCode,
+               LPSTR lpszErrorMsg, WORD cbErrorMsgMax, WORD *pcbErrorMsg)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLInstallTranslatorExW(LPCWSTR lpszTranslator, LPCWSTR lpszPathIn,
+               LPWSTR lpszPathOut, WORD cbPathOutMax, WORD *pcbPathOut,
+               WORD fRequest, LPDWORD lpdwUsageCount)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLInstallTranslatorEx(LPCSTR lpszTranslator, LPCSTR lpszPathIn,
+               LPSTR lpszPathOut, WORD cbPathOutMax, WORD *pcbPathOut,
+               WORD fRequest, LPDWORD lpdwUsageCount)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLInstallTranslator(LPCSTR lpszInfFile, LPCSTR lpszTranslator,
+               LPCSTR lpszPathIn, LPSTR lpszPathOut, WORD cbPathOutMax,
+               WORD *pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLInstallTranslatorW(LPCWSTR lpszInfFile, LPCWSTR lpszTranslator,
+              LPCWSTR lpszPathIn, LPWSTR lpszPathOut, WORD cbPathOutMax,
+              WORD *pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLManageDataSources(HWND hwnd)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+RETCODE WINAPI SQLPostInstallerErrorW(DWORD fErrorCode, LPWSTR szErrorMsg)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+RETCODE WINAPI SQLPostInstallerError(DWORD fErrorCode, LPSTR szErrorMsg)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLReadFileDSNW(LPCWSTR lpszFileName, LPCWSTR lpszAppName,
+               LPCWSTR lpszKeyName, LPWSTR lpszString, WORD cbString,
+               WORD *pcbString)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLReadFileDSN(LPCSTR lpszFileName, LPCSTR lpszAppName,
+               LPCSTR lpszKeyName, LPSTR lpszString, WORD cbString,
+               WORD *pcbString)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLRemoveDefaultDataSource(void)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLRemoveDriverW(LPCWSTR lpszDriver, BOOL fRemoveDSN,
+               LPDWORD lpdwUsageCount)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLRemoveDriver(LPCSTR lpszDriver, BOOL fRemoveDSN,
+               LPDWORD lpdwUsageCount)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLRemoveDriverManager(LPDWORD pdwUsageCount)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLRemoveDSNFromIniW(LPCWSTR lpszDSN)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLRemoveDSNFromIni(LPCSTR lpszDSN)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLRemoveTranslatorW(LPCWSTR lpszTranslator, LPDWORD lpdwUsageCount)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLRemoveTranslator(LPCSTR lpszTranslator, LPDWORD lpdwUsageCount)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLSetConfigMode(UWORD wConfigMode)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLValidDSNW(LPCWSTR lpszDSN)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLValidDSN(LPCSTR lpszDSN)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLWriteDSNToIniW(LPCWSTR lpszDSN, LPCWSTR lpszDriver)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLWriteDSNToIni(LPCSTR lpszDSN, LPCSTR lpszDriver)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLWriteFileDSNW(LPCWSTR lpszFileName, LPCWSTR lpszAppName,
+               LPCWSTR lpszKeyName, LPCWSTR lpszString)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLWriteFileDSN(LPCSTR lpszFileName, LPCSTR lpszAppName,
+               LPCSTR lpszKeyName, LPCSTR lpszString)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLWritePrivateProfileStringW(LPCWSTR lpszSection, LPCWSTR lpszEntry,
+               LPCWSTR lpszString, LPCWSTR lpszFilename)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+BOOL WINAPI SQLWritePrivateProfileString(LPCSTR lpszSection, LPCSTR lpszEntry,
+               LPCSTR lpszString, LPCSTR lpszFilename)
+{
+    FIXME("\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
diff --git a/dlls/odbccp32/odbccp32.spec b/dlls/odbccp32/odbccp32.spec
new file mode 100644
index 00000000000..7285a717f23
--- /dev/null
+++ b/dlls/odbccp32/odbccp32.spec
@@ -0,0 +1,57 @@
+@ stub ODBCCPlApplet
+@ stdcall SQLConfigDataSource(ptr long wstr wstr)
+@ stdcall SQLConfigDataSourceW(ptr long str str)
+@ stdcall SQLConfigDriver(ptr long str str ptr long ptr)
+@ stdcall SQLConfigDriverW(ptr long wstr wstr ptr long ptr)
+@ stdcall SQLCreateDataSource(ptr str)
+@ stub SQLCreateDataSourceEx
+@ stub SQLCreateDataSourceExW
+@ stdcall SQLCreateDataSourceW(ptr wstr)
+@ stdcall SQLGetAvailableDrivers(str ptr long ptr)
+@ stdcall SQLGetAvailableDriversW(wstr ptr long ptr)
+@ stdcall SQLGetConfigMode(ptr)
+@ stdcall SQLGetInstalledDrivers(str long ptr)
+@ stdcall SQLGetInstalledDriversW(wstr long ptr)
+@ stdcall SQLGetPrivateProfileString(str str str str long str)
+@ stdcall SQLGetPrivateProfileStringW(wstr wstr wstr wstr long wstr)
+@ stdcall SQLGetTranslator(ptr str long ptr ptr long ptr ptr)
+@ stdcall SQLGetTranslatorW(ptr wstr long ptr ptr long ptr ptr)
+@ stdcall SQLInstallDriver(str str str long ptr long ptr)
+@ stdcall SQLInstallDriverEx(str str str long ptr)
+@ stdcall SQLInstallDriverExW(wstr wstr wstr long ptr long ptr)
+@ stdcall SQLInstallDriverManager(ptr long ptr)
+@ stdcall SQLInstallDriverManagerW(ptr long ptr)
+@ stdcall SQLInstallDriverW(wstr wstr wstr long ptr)
+@ stdcall SQLInstallODBC(ptr str str str)
+@ stdcall SQLInstallODBCW(ptr wstr wstr wstr)
+@ stdcall SQLInstallTranslator(str str str ptr long ptr long ptr)
+@ stdcall SQLInstallTranslatorEx(str str ptr long ptr long ptr)
+@ stdcall SQLInstallTranslatorExW(wstr wstr ptr long ptr long ptr)
+@ stdcall SQLInstallTranslatorW(wstr wstr wstr ptr long ptr long ptr)
+@ stdcall SQLInstallerError(long ptr ptr long ptr)
+@ stdcall SQLInstallerErrorW(long ptr ptr long ptr)
+@ stub SQLLoadDataSourcesListBox
+@ stub SQLLoadDriverListBox
+@ stdcall SQLManageDataSources(ptr)
+@ stdcall SQLPostInstallerError(long ptr)
+@ stdcall SQLPostInstallerErrorW(long ptr)
+@ stdcall SQLReadFileDSN(str str str ptr long ptr)
+@ stdcall SQLReadFileDSNW(wstr wstr wstr ptr long ptr)
+@ stdcall SQLRemoveDSNFromIni(str)
+@ stdcall SQLRemoveDSNFromIniW(wstr)
+@ stdcall SQLRemoveDefaultDataSource()
+@ stdcall SQLRemoveDriver(str long ptr)
+@ stdcall SQLRemoveDriverManager(ptr)
+@ stdcall SQLRemoveDriverW(wstr long ptr)
+@ stdcall SQLRemoveTranslator(str ptr)
+@ stdcall SQLRemoveTranslatorW(wstr ptr)
+@ stdcall SQLSetConfigMode(long)
+@ stdcall SQLValidDSN(str)
+@ stdcall SQLValidDSNW(wstr)
+@ stdcall SQLWriteDSNToIni(str str)
+@ stdcall SQLWriteDSNToIniW(wstr wstr)
+@ stdcall SQLWriteFileDSN(str str str str)
+@ stdcall SQLWriteFileDSNW(wstr wstr wstr wstr)
+@ stdcall SQLWritePrivateProfileString(str str str str)
+@ stdcall SQLWritePrivateProfileStringW(wstr wstr wstr wstr)
+@ stub SelectTransDlg
-- 
GitLab