diff --git a/BuildAll.bat b/BuildAll.bat
deleted file mode 100755
index 8ee7739..0000000
--- a/BuildAll.bat
+++ /dev/null
@@ -1,11 +0,0 @@
-::
-::	Build all dlls of psqlodbc project
-::
-@echo off
-if "%1" == "/?" (
-	powershell Get-Help %~dp0\winbuild\BuildAll.ps1 -detailed
-) else if "%1" == "-?" (
-	powershell Get-Help %~dp0\winbuild\BuildAll.ps1 %2 %3 %4 %5 %6 %7 %8 %9
-) else (
-	powershell %~dp0\winbuild\BuildAll.ps1 %*
-)
diff --git a/docs/win32-compilation.html b/docs/win32-compilation.html
index f6aa30a..b9bd2b8 100644
--- a/docs/win32-compilation.html
+++ b/docs/win32-compilation.html
@@ -10,8 +10,8 @@
 <h1>Compiling psqlODBC on Windows</h1>
 
 <p>
-This page describes how to build the PostgreSQL ODBC Driver on Windows. There
-are three methods to build: from command line using nmake makefiles, from
+This page describes how to build the PostgreSQL ODBC Driver on Windows.  There
+are two methods to build: from command line using nmake makefiles, from
 command line using MSBuild files, and from Visual Studio IDE.
 </p>
 
@@ -38,155 +38,38 @@ The following 3rd party software are required for the build:
 </ul>
 </p>
 
-<p>
-For the MSBuild method, you will also need PowerShell.
-</p>
-
 </p>
 It's also possible to build without libpq and OpenSSL, but some authentication
 methods will be disabled.
 </p>
 
-<h2>Building with nmake.exe</h2>
-
-Use NMAKE.exe to build the driver for the currently active target:<br><br>
-
-    <code>C:\psqlodbc\&gt; nmake /f win64.mak &lt;options&gt;</code><br><br>
-
-<p>
-Despite the name, win64.mak is used to build both 32-bit and 64-bit binaries.
-With the Microsoft SDK scripts, you can switch between 32-bit and 64-bit
-target architectures with "setenv /x86" and "setenv /x64" commands.
-</p>
-
-<p>
-To build the .msi installer file:<br><br>
-
-    <code>C:\psqlodbc\&gt; nmake /f win64.mak installer</code><br><br>
-
-The resulting installer file goes to installer/x64 or installer/x86 directory.
-</p>
-
-<p>
-To build both 32-bit and 64-bit versions in one command:<br><br>
-
-    <code>C:\psqlodbc\&gt; nmake /f win64.mak world</code><br><br>
-</p>
-
-
-<p>
-The following build options may be used, either on the command line, or
-by creating a file called "windows-local.mak".
-</p>
-
-
-<p>
-<table cellspacing="0" cellpadding="3" width="780" border=1>
-
-  <tr>
-    <td>Valiable</td>
-    <td>Values</td>
-    </tr>
-  <tr>
-    <td>CFG</td>
-    <td>Release(default), or Debug</td>
-    </tr>
-  <tr>
-    <td>PG_INC</td>
-    <td>$(PROGRAMFILES)\PostgreSQL\9.3\include</td>
-    </tr>
-  <tr>
-    <td>PG_LIB</td>
-    <td>$(PROGRAMFILES)\PostgreSQL\9.3\lib</td>
-    </tr>
-  <tr>
-    <td>SSL_INC</td>
-    <td>C:\OpenSSL-Win32\include</td>
-    </tr>
-  <tr>
-   <td>SSL_LIB</td>
-   <td>C:\OpenSSL-Win32\lib</td>
-    </tr>
-  <tr>
-    <td>LINKMT</td>
-    <td>MT</td>
-  </tr>
-  <tr>
-    <td>ANSI_VERSION</td>
-    <td>no (If set to "yes", output dll name to psqlodbc30a.dll)</td>
-  </tr>
-  <tr>
-    <td>MSDTC</td>
-    <td>yes</td>
-  </tr>
-  <tr>
-    <td>USE_LIBPQ</td>
-    <td>yes (libpq is required) </td>
-  </tr>
-  <tr>
-    <td>USE_SSPI</td>
-    <td>yes (secur32 and crypt32 libraries are required) </td>
-  </tr>
-  <tr>
-    <td>USE_GSS</td>
-    <td>no (gssapi library is required) </td>
-  </tr>
-  </table></p>
-
-<ol>
-<li>UNICODE is the default (psqlodbc35w.dll), unless ANSI_VERSION is selected (psqlodbc30a.dll)</li>
-<li>libpq.dll is used supported.</li>
-<li>SSL and Kerberos are original equipment.</li>
-<li>ODBCVER becomes 0x351 when UNICODE is selected, or becomes 0x0300 with ANSI_VERSION == Yes.</li>
-<li>If MSDTC == Yes, "pgxalib.dll" is created.</li>
-<li>If MSDTC is enabled, ANSI_VERSION also creates "pgenlista.dll", or UNICODE creates "pgenlist.dll".</li>
-</ol>
-
 <h2>Building with MSBuild</h2>
 
-See winbuild/readme.txt in the source directory for details.
-
-<h2>IDE Method</h2>
+Use MSBuild.exe to build the driver for the currently active target:<br><br>
 
-<p>A Microsoft Visual Studio project file (and workspace) is included in the source tree.
-</p>
-
-<p><strong>psqlodbc.dsp</strong>
- can be used with Microsoft Visual C++ 6.0.
-</p>
-
-<p><strong>psqlodbc.proj</strong> and
-<strong>psqlodbc.sln</strong>
-can be used with Microsoft Visual C++ 2005 Edition (including the Express edition which can be downloaded free of charge from <a href="http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx">http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx</a>)
-</p>
+    <code>C:\psqlodbc\&gt; MSBuild</code><br><br>
 
 <p>
-     Preparation before the build:
+The default target performs a full build, which includes ANSI and Unicode
+drivers, both 32-bit and 64-bit versions, and also builds the installers.
+The resulting drivers can be found in the x86_ANSI_Release and
+x64_Unicode_Release directories, and the installers in x86_Release and
+x64_Release directories (or *_Debug instead of *_Release, when building in Debug configuration).
 </p>
-<ol>
-  <li>The Windows distribution of PostgreSQL will install the required headers and libraries into C:\Program Files\PostgreSQL\9.2
-  <li>OpenSSL should be installed into C:\OpenSSL (OpenSSL binaries can be downloaded from <a href="http://www.slproweb.com/products/Win32OpenSSL.html">http://www.slproweb.com/products/Win32OpenSSL.html</a>)
-</li></ol>
 
 <p>
-       If you want to change the installation arrangement, it
-is necessary to edit the project settings.
+Other targets are available for more fine-grained builds: BuildDriver,
+BuildDriverBoth, BuildInstaller. See winbuild.proj for details.
 </p>
 
 <p>
-        Note:
+By default, the drivers are built with libpq and SSPI support, and without
+GSSAPI support. This is also the configuration used for the official binaries.
+To build with other options, copy winbuild\configuration-defaults.props file
+into winbuild\configuration-local.props, and edit the settings. The
+configuration-local.props file can also be used to specify non-standard
+locations for PostgreSQL and OpenSSL headers and libraries.
 </p>
 
-<p>
-The default build settings will create the following driver:
-</p>
-
-<ol>
-<li>UNICODE support.
-<li>libpq and SSL equipped are supported.
-<li>Kerberos are supported peculiar by psqlODBC.
-<li>ODBCVER is 0x0351.
-<li>The driver filename is "psqlodbc35w.dll".</li></ol>
-
 </body>
 </html>
diff --git a/editConfiguration.bat b/editConfiguration.bat
deleted file mode 100755
index 1ec9013..0000000
--- a/editConfiguration.bat
+++ /dev/null
@@ -1,4 +0,0 @@
-::
-::	Start editConfiguration with a mimimized console window
-::
-powershell -Sta -WindowStyle Minimized %~dp0\winbuild\editConfiguration.ps1 %*
diff --git a/installer/Make.bat b/installer/Make.bat
deleted file mode 100755
index 0bb5366..0000000
--- a/installer/Make.bat
+++ /dev/null
@@ -1,87 +0,0 @@
-@echo off
-
-:: Values to change include VERSION and SUBLOC, both below.
-
-setlocal
-SET X86PROGRAMFILES=%ProgramFiles%
-
-if "%PROCESSOR_ARCHITECTURE%" == "x86" GOTO SET_LINKFILES
-SET X86PROGRAMFILES=%ProgramFiles(x86)%
-
-:SET_LINKFILES
-:: echo X86PROGRAMFILES=%X86PROGRAMFILES%
-::
-:: When you reference PG server's libpq related dlls, set the
-:: version to the variable PGVERSION (default 9.3) and call
-:: this batch file.
-::
-if "%PGVERSION%" == "" SET PGVERSION=9.3
-::
-:: When you placed libpq related dlls in the folder other than
-:: the default one, set the folder name to the variable LIBPQBINDIR
-:: and call this batch file.
-::
-if "%LIBPQBINDIR%" == "" (
-	SET LINKFILES="%X86PROGRAMFILES%\PostgreSQL\%PGVERSION%\bin"
- ) else (
-	SET LINKFILES="%LIBPQBINDIR%"
- )
-
-if NOT "%1"=="" (
-       SET VERSION="%1"
-       GOTO GOT_VERSION
-)
-
-::
-::	The ProductCode History
-::	    ProductCode must be changed in case of major upgrade
-::
-SET PRODUCTID["09.02.0100"]="838E187D-8B7A-473d-B93C-C8E970B15D2B"
-SET PRODUCTID["09.03.0100"]="D3527FA5-9C2B-4550-A59B-9534A78950F4"
-SET PRODUCTID["09.03.0200"]="D3527FA5-9C2B-4550-A59B-9534A78950F4"
-SET PRODUCTID["09.03.0210"]="D3527FA5-9C2B-4550-A59B-9534A78950F4"
-SET PRODUCTID["09.03.0300"]="D3527FA5-9C2B-4550-A59B-9534A78950F4"
-
-:: The full version number of the build in XXXX.XX.XX format
-SET VERSION="09.03.0300"
-echo.
-echo Version not specified - defaulting to %VERSION%
-echo.
-
-:GOT_VERSION
-
-:: The subdirectory to install into
-SET SUBLOC=%VERSION:~1,2%%VERSION:~4,2%
-
-CALL SET PRODUCTCODE=%%PRODUCTID[%VERSION%]%%
-echo PRODUCTCODE=%PRODUCTCODE%
-
-echo.
-echo Building psqlODBC/%SUBLOC% merge module...
-
-candle -nologo -dPlatform="x86" -dVERSION=%VERSION% -dSUBLOC=%SUBLOC% -dLIBPQBINDIR=%LINKFILES% -o psqlodbcm.wixobj psqlodbcm_cpu.wxs
-IF ERRORLEVEL 1 GOTO ERR_HANDLER
-
-light -nologo -out psqlodbc.msm psqlodbcm.wixobj
-IF ERRORLEVEL 1 GOTO ERR_HANDLER
-
-echo.
-echo Building psqlODBC installer database...
-
-candle -nologo -dPlatform="x86" -dVERSION=%VERSION% -dSUBLOC=%SUBLOC% -dPRODUCTCODE="%PRODUCTCODE%" -o psqlodbc.wixobj psqlodbc_cpu.wxs
-IF ERRORLEVEL 1 GOTO ERR_HANDLER
-
-light -nologo -ext WixUIExtension -cultures:en-us psqlodbc.wixobj
-IF ERRORLEVEL 1 GOTO ERR_HANDLER
-
-echo.
-echo Done!
-GOTO EXIT
-
-:ERR_HANDLER
-echo.
-echo Aborting build!
-GOTO EXIT
-
-:EXIT
-endlocal
diff --git a/installer/MakeX64.bat b/installer/MakeX64.bat
deleted file mode 100755
index 960b13d..0000000
--- a/installer/MakeX64.bat
+++ /dev/null
@@ -1,174 +0,0 @@
-@echo off
-setlocal
-
-rem
-rem	The 64bit installer
-rem
-set CPUTYPE=x64
-
-rem
-rem	Set yes when clean operations are needed
-rem
-set CLEANUP=no
-rem
-rem	Set yes so as to build dlls before making the installer
-rem
-set DLLBUILD=no
-
-:getparam
-set para=%1
-echo para="%para%"
-if /i "%para:~1%" == "Drivers" (
-	if "%para:~0,1%" == "+" set DLLBUILD=yes
-	shift
-	goto getparam
-) else if /i "%para%" == "clean" (
-	set CLEANUP=yes
-	shift
-	goto getparam
-)
-
-if "%CLEANUP%" == "yes" GOTO CLEAN
-
-rem
-rem	psqlodbc dlls build options
-rem
-if "%USE_LIBPQ%" == "" (
-	SET USE_LIBPQ=yes
-)
-if "%USE_GSS%" == "" (
-	SET USE_GSS=no
-)
-if "%USE_SSPI%" == "" (
-	SET USE_SSPI=yes
-)
-
-::
-::	Please specify the foler name where you placed libpq related dlls.
-::	Currently not used.
-::
-if "%PGVERSION%" == "" SET PGVERSION=9.3
-if "%USE_LIBPQ%" == "yes" (
-	if "%LIBPQBINDIR%" == "" (
-		if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
-			SET LIBPQBINDIR="%ProgramFiles%\PostgreSQL\%PGVERSION%\bin"
-		) else (
-			echo You are setting USE_LIBPQ=%USE_LIBPQ%
-			echo Please specify LIBPQBINDIR variable
-			echo Press any key to exit ...
-			pause > nul
-			exit
-		)
-	)
-	echo LIBPQBINDIR=%LIBPQBINDIR%
-)
-
-rem
-rem	Please specify the foler name where you placed GSSAPI related dlls.
-rem
-if "%USE_GSS%" == "yes" (
-	if "%GSSBINDIR%" == "" (
-		echo You are setting USE_GSS=%USE_GSS%
-		echo Please specify GSSBINDIR variable
-		echo Press any key to exit ...
-		pause > nul
-		exit
-	)
-	echo GSSBINDIR=%GSSBINDIR%
-)
-
-rem
-rem	Build binaries if necessary
-rem
-set origdir=%CD%
-if "%DLLBUILD%" == "yes" (
-cd ..
-nmake /f win64.mak USE_LIBPQ=%USE_LIBPQ% USE_SSPI=%USE_SSPI% USE_GSS=%USE_GSS%
-nmake /f win64.mak ANSI_VERSION=yes USE_LIBPQ=%USE_LIBPQ% USE_SSPI=%USE_SSPI% USE_GSS=%USE_GSS%
-)
-cd %origdir%
-
-set wix_dir="%WIX%bin"
-echo wix_dir=%wix_dir%
-
-rem Values to change include VERSION and SUBLOC, both below.
-
-if NOT "%1"=="" SET VERSION="%1"
-if NOT "%1"=="" GOTO GOT_VERSION
-GOTO NORMAL_EXEC
-
-:CLEAN
-echo.
-echo cleaning derived files
-echo.
-del %CPUTYPE%\psqlodbc*.wix* %CPUTYPE%\psqlodbc*.ms*
-if "%DLLBUILD%" == "yes" (
-cd ..
-nmake /f win64.mak clean
-nmake /f win64.mak ANSI_VERSION=yes clean
-)
-GOTO EXIT
-
-:NORMAL_EXEC
-REM The full version number of the build in XXXX.XX.XX format
-SET VERSION="09.03.0300"
-
-echo.
-echo Version not specified - defaulting to %VERSION%
-echo.
-
-:GOT_VERSION
-
-if not exist %CPUTYPE%\ mkdir %CPUTYPE%
-
-:: The subdirectory to install into
-SET SUBLOC=%VERSION:~1,2%%VERSION:~4,2%
-
-::
-::	ProductCode History
-::	    ProductCode must be changed in case of major upgrade
-::
-SET PRODUCTID["09.02.0100"]="3E42F836-9204-4c42-B3C3-8680A0434875"
-SET PRODUCTID["09.03.0100"]="1F896F2F-5756-4d22-B5A3-040796C9B485"
-SET PRODUCTID["09.03.0200"]="1F896F2F-5756-4d22-B5A3-040796C9B485"
-SET PRODUCTID["09.03.0210"]="1F896F2F-5756-4d22-B5A3-040796C9B485"
-SET PRODUCTID["09.03.0300"]="1F896F2F-5756-4d22-B5A3-040796C9B485"
-
-CALL SET PRODUCTCODE=%%PRODUCTID[%VERSION%]%%
-
-echo.
-echo Building psqlODBC/%SUBLOC% merge module...
-
-%wix_dir%\candle.exe -nologo -dPlatform="%CPUTYPE%" -dVERSION=%VERSION% -dSUBLOC=%SUBLOC% -dLIBPQBINDIR=%LIBPQBINDIR% -dGSSBINDIR=%GSSBINDIR% -o %CPUTYPE%\psqlodbcm.wixobj psqlodbcm_cpu.wxs
-IF ERRORLEVEL 1 GOTO ERR_HANDLER
-
-echo Linking psqlODBC merge module...
-%wix_dir%\light -nologo -o %CPUTYPE%\psqlodbc_%CPUTYPE%.msm %CPUTYPE%\psqlodbcm.wixobj
-IF ERRORLEVEL 1 GOTO ERR_HANDLER
-
-echo.
-echo Building psqlODBC installer database...
-
-%wix_dir%\candle.exe -nologo -dPlatform="%CPUTYPE%" -dVERSION=%VERSION% -dSUBLOC=%SUBLOC% -dPRODUCTCODE=%PRODUCTCODE% -o %CPUTYPE%\psqlodbc.wixobj psqlodbc_cpu.wxs
-IF ERRORLEVEL 1 GOTO ERR_HANDLER
-
-echo Linking psqlODBC installer database...
-%wix_dir%\light -nologo -ext WixUIExtension -cultures:en-us -o %CPUTYPE%\psqlodbc_%CPUTYPE%.msi %CPUTYPE%\psqlodbc.wixobj
-IF ERRORLEVEL 1 GOTO ERR_HANDLER
-
-echo.
-echo Modifying psqlODBC installer database...
-cscript modify_msi.vbs %CPUTYPE%\psqlodbc_%CPUTYPE%.msi
-IF ERRORLEVEL 1 GOTO ERR_HANDLER
-
-echo.
-echo Done!
-GOTO EXIT
-
-:ERR_HANDLER
-echo.
-echo Aborting build!
-GOTO EXIT
-
-:EXIT
-endlocal
diff --git a/installer/buildX64-installer.ps1 b/installer/buildX64-installer.ps1
deleted file mode 100755
index 1a325c1..0000000
--- a/installer/buildX64-installer.ps1
+++ /dev/null
@@ -1,100 +0,0 @@
-#	build 64bit installer
-Param(
-[string]$configPath
-)
-$scriptPath = (Split-Path $MyInvocation.MyCommand.Path)
-$configInfo = & "$scriptPath\..\winbuild\configuration.ps1" "$configPath"
-$VERSION = $configInfo.Configuration.version
-$x64info = $configInfo.Configuration.x64
-$USE_LIBPQ=$x64info.use_libpq
-$USE_GSS=$x64info.use_gss
-$USE_SSPI=$x64info.use_sspi
-$LIBPQVER=$x64info.libpq.version
-if ($LIBPQVER -eq "") {
-	$LIBPQVER=$LIBPQ_VERSION
-}
-if ($USE_LIBPQ -eq "yes")
-{
-	$LIBPQBINDIR=$x64info.libpq.bin
-	if ($LIBPQBINDIR -eq "default") {
-		if ($env:PROCESSOR_ARCHITECTURE -ne "x86") {
-			$pgmfs = "$env:ProgramFiles"
-			$LIBPQBINDIR = "$pgmfs\PostgreSQL\$LIBPQVER\bin"
-		}
-		elseif ("${env:ProgramW6432}" -ne "") {
-			$pgmfs = "$env:ProgramW6432"
-			$LIBPQBINDIR = "$pgmfs\PostgreSQL\$LIBPQVER\bin"
-		}
-	}
-}
-if ($USE_GSS -eq "yes")
-{
-	$GSSBINDIR=$x64info.gss.bin
-}
-
-Write-Host "VERSION    : $VERSION"
-Write-Host "USE LIBPQ  : $USE_LIBPQ ($LIBPQBINDIR)"
-Write-Host "USE GSS    : $USE_GSS ($GSSBINDIR)"
-Write-Host "USE SSPI   : $USE_SSPI"
-
-$CPUTYPE="x64"
-
-if ($env:WIX -ne "")
-{
-	$wix = "$env:WIX"
-	$env:Path += ";$WIX/bin"
-}
-# The subdirectory to install into
-$SUBLOC=$VERSION.substring(0, 2) + $VERSION.substring(3, 2)
-
-if (!(Test-Path -Path $CPUTYPE)) {
-    New-Item -ItemType directory -Path $CPUTYPE
-}
-
-<#
-	ProductCode History
-		ProductCode must be changed in case of major upgrade
-#>
-$PRODUCTID = @{}
-$PRODUCTID["09.02.0100"]="3E42F836-9204-4c42-B3C3-8680A0434875"
-$PRODUCTID["09.03.0100"]="1F896F2F-5756-4d22-B5A3-040796C9B485"
-$PRODUCTID["09.03.0200"]="1F896F2F-5756-4d22-B5A3-040796C9B485"
-$PRODUCTID["09.03.0210"]="1F896F2F-5756-4d22-B5A3-040796C9B485"
-$PRODUCTID["09.03.0300"]="1F896F2F-5756-4d22-B5A3-040796C9B485"
-
-$PRODUCTCODE=$PRODUCTID[$VERSION]
-if ("$PRODUCTCODE" -eq "") {
-	Write-Host "`nSpecify the ProductCode for the VERSION $VERSION"
-	return
-}
-Write-Host "PRODUCTCODE: $PRODUCTCODE"
-
-try {
-	pushd $scriptPath
-
-	Write-Host ".`nBuilding psqlODBC/$SUBLOC merge module..."
-
-	invoke-expression "candle -nologo -dPlatform=$CPUTYPE `"-dVERSION=$VERSION`" -dSUBLOC=$SUBLOC `"-dLIBPQBINDIR=$LIBPQBINDIR`" `"-dGSSBINDIR=$GSSBINDIR`" -o $CPUTYPE\psqlodbcm.wixobj psqlodbcm_cpu.wxs"
-
-	Write-Host ".`nLinking psqlODBC merge module..."
-	invoke-expression "light -nologo -o $CPUTYPE\psqlodbc_$CPUTYPE.msm $CPUTYPE\psqlodbcm.wixobj"
-
-	Write-Host ".`nBuilding psqlODBC installer database..."
-
-	invoke-expression "candle -nologo -dPlatform=$CPUTYPE `"-dVERSION=$VERSION`" -dSUBLOC=$SUBLOC `"-dPRODUCTCODE=$PRODUCTCODE`" -o $CPUTYPE\psqlodbc.wixobj psqlodbc_cpu.wxs"
-
-	Write-Host ".`nLinking psqlODBC installer database..."
-	invoke-expression "light -nologo -ext WixUIExtension -cultures:en-us -o $CPUTYPE\psqlodbc_$CPUTYPE.msi $CPUTYPE\psqlodbc.wixobj"
-
-	Write-Host ".`nModifying psqlODBC installer database..."
-	invoke-expression "cscript modify_msi.vbs $CPUTYPE\psqlodbc_$CPUTYPE.msi"
-
-	Write-Host ".`nDone!"
-}
-catch {
-	Write-Host ".`Aborting build!"
-	throw $error[0]
-}
-finally {
-	popd
-}
diff --git a/installer/buildX86-installer.ps1 b/installer/buildX86-installer.ps1
deleted file mode 100755
index 727c5e4..0000000
--- a/installer/buildX86-installer.ps1
+++ /dev/null
@@ -1,83 +0,0 @@
-#	build 32bit installer
-Param(
-[string]$configPath
-)
-$scriptPath = (Split-Path $MyInvocation.MyCommand.Path)
-$configInfo = & "$scriptPath\..\winbuild\configuration.ps1" "$configPath"
-$VERSION = $configInfo.Configuration.version
-$x86info = $configInfo.Configuration.x86
-$USE_LIBPQ=$x86info.use_libpq
-$USE_GSS=$x86info.use_gss
-$USE_SSPI=$x86info.use_sspi
-$LIBPQVER=$x86info.libpq.version
-if ($LIBPQVER -eq "") {
-	$LIBPQVER=$LIBPQ_VERSION
-}
-if ($USE_LIBPQ -eq "yes")
-{
-	$LIBPQBINDIR=$x86info.libpq.bin
-	if ($env:PROCESSOR_ARCHITECTURE -eq "x86") {
-		$pgmfs = "$env:ProgramFiles"
-	} else {
-		$pgmfs = "${env:ProgramFiles(x86)}"
-	}
-	if ($LIBPQBINDIR -eq "default") {
-		$LIBPQBINDIR = "$pgmfs\PostgreSQL\$LIBPQVER\bin"
-	}
-}
-
-Write-Host "VERSION    : $VERSION"
-Write-Host "USE LIBPQ  : $USE_LIBPQ ($LIBPQBINDIR)"
-Write-Host "USE GSS    : $USE_GSS ($GSSBINDIR)"
-Write-Host "USE SSPI   : $USE_SSPI"
-
-if ($env:WIX -ne "")
-{
-	$wix = "$env:WIX"
-	$env:Path += ";$WIX/bin"
-}
-
-<#
-	The ProductCode History
-	    ProductCode must be changed in case of major upgrade
-#>
-$PRODUCTID = @{}
-$PRODUCTID["09.02.0100"]="838E187D-8B7A-473d-B93C-C8E970B15D2B"
-$PRODUCTID["09.03.0100"]="D3527FA5-9C2B-4550-A59B-9534A78950F4"
-$PRODUCTID["09.03.0200"]="D3527FA5-9C2B-4550-A59B-9534A78950F4"
-$PRODUCTID["09.03.0210"]="D3527FA5-9C2B-4550-A59B-9534A78950F4"
-
-# The subdirectory to install into
-$SUBLOC=$VERSION.substring(0, 2) + $VERSION.substring(3, 2)
-
-$PRODUCTCODE=$PRODUCTID[$VERSION]
-if ("$PRODUCTCODE" -eq "") {
-	Write-Host ".`nSpecify the ProductCode for the VERSION $VERSION"
-	return
-}
-Write-Host "PRODUCTCODE: $PRODUCTCODE"
-
-try {
-	pushd $scroptPath
-
-	Write-Host ".`nBuilding psqlODBC/$SUBLOC merge module..."
-
-	invoke-expression "candle -nologo `"-dVERSION=$VERSION`" -dSUBLOC=$SUBLOC `"-dLINKFILES=$LIBPQBINDIR`" psqlodbcm.wxs"
-
-	invoke-expression "light -nologo -out psqlodbc.msm psqlodbcm.wixobj"
-
-	Write-Host ".`nBuilding psqlODBC installer database..."
-
-	invoke-expression "candle -nologo -dPlatform=`"x86`" `"-dVERSION=$VERSION`" -dSUBLOC=$SUBLOC `"-dPRODUCTCODE=$PRODUCTCODE`" -o psqlodbc.wixobj psqlodbc_cpu.wxs"
-
-	invoke-expression "light -nologo -ext WixUIExtension -cultures:en-us psqlodbc.wixobj"
-
-	Write-Host ".`nDone!"
-}
-catch {
-	Write-Host ".`nAborting build!"
-	throw $error[0]
-}
-finally {
-	popd
-}
diff --git a/installer/installer.mak b/installer/installer.mak
deleted file mode 100644
index d393130..0000000
--- a/installer/installer.mak
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-# All the driver files that will be included in the installer
-DRIVER_FILES = ../$(TARGET_CPU)_Unicode_$(CFG)/psqlodbc35w.dll \
-	../$(TARGET_CPU)_Unicode_$(CFG)/pgxalib.dll \
-	../$(TARGET_CPU)_Unicode_$(CFG)/pgenlist.dll \
-	../$(TARGET_CPU)_ANSI_$(CFG)/psqlodbc30a.dll \
-	../$(TARGET_CPU)_ANSI_$(CFG)/pgxalib.dll \
-	../$(TARGET_CPU)_ANSI_$(CFG)/pgenlista.dll
-
-ALL: $(TARGET_CPU)\psqlodbc_$(TARGET_CPU).msm $(TARGET_CPU)\psqlodbc_$(TARGET_CPU).msi
-
-CANDLE="$(WIX)bin\candle.exe"
-LIGHT="$(WIX)bin\light"
-
-!INCLUDE ..\windows-defaults.mak
-!IF EXISTS(..\windows-local.mak)
-!INCLUDE ..\windows-local.mak
-!ENDIF
-
-!MESSAGE determining product code
-
-!INCLUDE productcodes.mak
-
-!MESSAGE Got product code $(PRODUCTCODE)
-
-MSM_OPTS = -dLIBPQBINDIR="$(LIBPQ_BIN)"
-!IF "$(USE_GSS)" == "yes"
-MSM_OPTS = $(MSM_OPTS) -dGSSBINDIR="$(GSSBINDIR)"
-!ENDIF
-
-
-# Merge module
-$(TARGET_CPU)\psqlodbc_$(TARGET_CPU).msm: psqlodbcm_cpu.wxs $(DRIVER_FILES)
-	echo Building Installer Merge Module
-	$(CANDLE) -nologo -dPlatform="$(TARGET_CPU)" -dVERSION=$(POSTGRESDRIVERVERSION) -dSUBLOC=$(SUBLOC) $(MSM_OPTS) -o $(TARGET_CPU)\psqlodbcm.wixobj psqlodbcm_cpu.wxs
-	$(LIGHT) -nologo -o $(TARGET_CPU)\psqlodbc_$(TARGET_CPU).msm $(TARGET_CPU)\psqlodbcm.wixobj
-
-$(TARGET_CPU)\psqlodbc_$(TARGET_CPU).msi: psqlodbc_cpu.wxs $(DRIVER_FILES)
-	echo Building Installer
-	$(CANDLE) -nologo -dPlatform="$(TARGET_CPU)" -dVERSION=$(POSTGRESDRIVERVERSION) -dSUBLOC=$(SUBLOC) -dPRODUCTCODE=$(PRODUCTCODE) -o $(TARGET_CPU)\psqlodbc.wixobj psqlodbc_cpu.wxs
-	$(LIGHT) -nologo -ext WixUIExtension -cultures:en-us -o $(TARGET_CPU)\psqlodbc_$(TARGET_CPU).msi $(TARGET_CPU)\psqlodbc.wixobj
-	cscript modify_msi.vbs $(TARGET_CPU)\psqlodbc_$(TARGET_CPU).msi
-
-clean:
-	-rd /Q /S x64 x86
diff --git a/installer/installer.proj b/installer/installer.proj
new file mode 100644
index 0000000..4c32c69
--- /dev/null
+++ b/installer/installer.proj
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+  <Import Project="..\winbuild\psqlodbc.common.props" />
+
+  <PropertyGroup>
+    <OutDir>..\$(TARGET_CPU)_$(Configuration)\</OutDir>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <Candle>"$(WIX)bin\candle" -nologo</Candle>
+    <Light>"$(WIX)bin\light" -nologo</Light>
+  </PropertyGroup>
+
+  <Target Name="Build">
+
+    <!-- These PropertyGroups have to be inside the Target element, because
+         they depend on POSTGRESDRIVERVERSION which is defined by running
+         the pre-Build target DetermineVersion. Hence POSTGRESDRIVERVERSION is
+         not at the top-Project level -->
+    <!-- FIXME: this needs to be updated by hand when the major version changes -->
+    <!-- Version 9.2 used product code 838E187D-8B7A-473d-B93C-C8E970B15D2B -->
+    <PropertyGroup Condition="$(POSTGRESDRIVERVERSION.substring(0,5))=='09.03'">
+      <PRODUCTCODE>1F896F2F-5756-4d22-B5A3-040796C9B485</PRODUCTCODE>
+      <SUBLOC>0903</SUBLOC>
+    </PropertyGroup>
+
+    <PropertyGroup>
+      <CANDLE_MSM_OPTS>-dLIBPQBINDIR="$(PG_BIN)"</CANDLE_MSM_OPTS>
+      <CANDLE_MSM_OPTS Condition="$(USE_GSS)==true">$(CANDLE_MSM_OPTS) -dGSSBINDIR="$(GSSBINDIR)"</CANDLE_MSM_OPTS>
+      <CANDLE_OPTS>-dPlatform="$(TARGET_CPU)" -dConfiguration=$(Configuration) -dVERSION=$(POSTGRESDRIVERVERSION) -dSUBLOC=$(SUBLOC) -dPRODUCTCODE=$(PRODUCTCODE)</CANDLE_OPTS>
+    </PropertyGroup>
+
+    <!-- Build Merge module (.msm) -->
+    <Exec
+      command='$(Candle) $(CANDLE_OPTS) $(CANDLE_MSM_OPTS) -o $(OutDir)\psqlodbcm.wixobj psqlodbcm_cpu.wxs' />
+    <Exec
+      command='$(Light) -o $(OutDir)\psqlodbc_$(TARGET_CPU).msm $(OutDir)\psqlodbcm.wixobj' />
+
+    <!-- Build Installer (.msi) -->
+    <Exec
+      command='$(CANDLE) $(CANDLE_OPTS) -dMERGEM=$(OutDir)\psqlodbc_$(TARGET_CPU).msm -o $(OutDir)\psqlodbc.wixobj psqlodbc_cpu.wxs' />
+    <Exec
+      command='$(Light) -ext WixUIExtension -cultures:en-us -o $(OutDir)\psqlodbc_$(TARGET_CPU).msi $(OutDir)\psqlodbc.wixobj' />
+
+    <!-- Fix the driver DLL's name entry in the .msi file, to work around a
+         WiX bug -->
+    <Exec
+      command='cscript modify_msi.vbs $(OutDir)\psqlodbc_$(TARGET_CPU).msi' />
+
+  </Target>
+</Project>
\ No newline at end of file
diff --git a/installer/productcodes.mak b/installer/productcodes.mak
deleted file mode 100644
index b343071..0000000
--- a/installer/productcodes.mak
+++ /dev/null
@@ -1,19 +0,0 @@
-!IF "$(POSTGRESDRIVERVERSION)" == "09.02.0100"
-PRODUCTCODE="3E42F836-9204-4c42-B3C3-8680A0434875"
-SUBLOC=0902
-!ELSE IF "$(POSTGRESDRIVERVERSION)" == "09.03.0100"
-PRODUCTCODE="1F896F2F-5756-4d22-B5A3-040796C9B485"
-SUBLOC=0903
-!ELSE IF "$(POSTGRESDRIVERVERSION)" == "09.03.0200"
-PRODUCTCODE="1F896F2F-5756-4d22-B5A3-040796C9B485"
-SUBLOC=0903
-!ELSE IF "$(POSTGRESDRIVERVERSION)" == "09.03.0210"
-PRODUCTCODE="1F896F2F-5756-4d22-B5A3-040796C9B485"
-SUBLOC=0903
-!ELSE IF "$(POSTGRESDRIVERVERSION)" == "09.03.0300"
-PRODUCTCODE="1F896F2F-5756-4d22-B5A3-040796C9B485"
-SUBLOC=0903
-!ELSE
-!MESSAGE Driver version $(POSTGRESDRIVERVERSION) is not listed in productcodes.mak
-EXIT
-!ENDIF
diff --git a/installer/psqlodbc-setup/Bundle.wxs b/installer/psqlodbc-setup/Bundle.wxs
deleted file mode 100755
index 1b63cdd..0000000
--- a/installer/psqlodbc-setup/Bundle.wxs
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
-	<Bundle Name="psqlodbc" Version="09.02.01.00" Manufacturer="PostgreSQL Global Development Group" UpgradeCode="7f9f14ee-2f3a-4120-a300-ee3fbd585627">
-		<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
-
-    <WixVariable Id="WixStdbaLicenseRtf" Value="..\lgpl.rtf" />
-    <Chain>
-			<!-- TODO: Define the list of chained packages. -->
-      <PackageGroupRef Id="vcredist"/>
-      <MsiPackage SourceFile="..\psqlodbc.msi" DisplayInternalUI="yes" />
-      <MsiPackage SourceFile="..\x64\psqlodbc_x64.msi" DisplayInternalUI="yes" InstallCondition="VersionNT64" />
-    </Chain>
-	</Bundle>
-</Wix>
diff --git a/installer/psqlodbc-setup/Make.bat b/installer/psqlodbc-setup/Make.bat
deleted file mode 100755
index 616698b..0000000
--- a/installer/psqlodbc-setup/Make.bat
+++ /dev/null
@@ -1,32 +0,0 @@
-setlocal
-set wix_dir=%WIX%bin
-set pgmname=psqlodbc
-set build_config=Release
-set objdir=obj\%build_config%
-set bindir=bin\%build_config%
-
-"%wix_dir%\candle.exe" -v ^
--dConfiguration=%build_config% ^
--dOutDir=%bindir%\ -dPlatform=x86 ^
--d"ProjectDir=\\" -dProjectExt=.wixproj ^
--dProjectFileName=%pgmname%.wixproj -dProjectName=%pgmname% ^
--d"ProjectPath=%pgmname%.wixproj" ^
--d"TargetDir=%bindir%\\" -dTargetExt=.exe ^
--dTargetFileName=%pgmname%.exe -dTargetName=%pgmname% ^
--d"TargetPath=%bindir%\%pgmname%.exe" ^
--out %objdir%\ -arch x86 ^
--ext "%wix_dir%\WixUtilExtension.dll" ^
--ext "%wix_dir%\WixBalExtension.dll" ^
-Bundle.wxs vcredist.wxs
-
-"%wix_dir%\Light.exe" -out %bindir%\%pgmname%.exe ^
--pdbout %bindir%\%pgmname%.wixpdb ^
--ext "%wix_dir%\\WixUtilExtension.dll" ^
--ext "%wix_dir%\\WixBalExtension.dll" ^
--contentsfile %objdir%\%pgmname%.wixproj.BindContentsFileList.txt ^
--outputsfile %objdir%\%pgmname%.wixproj.BindOutputsFileList.txt ^
--builtoutputsfile %objdir%\%pgmname%.wixproj.BindBuiltOutputsFileList.txt ^
--wixprojectfile %pgmname%.wixproj ^
-%objdir%\Bundle.wixobj %objdir%\vcredist.wixobj
-
-endlocal
diff --git a/installer/psqlodbc-setup/psqlodbc-setup.wixproj b/installer/psqlodbc-setup/psqlodbc-setup.wixproj
deleted file mode 100755
index 38d2899..0000000
--- a/installer/psqlodbc-setup/psqlodbc-setup.wixproj
+++ /dev/null
@@ -1,46 +0,0 @@
-﻿<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
-    <ProductVersion>3.6</ProductVersion>
-    <ProjectGuid>{748caa18-f40d-4308-bc52-2605d09c38b1}</ProjectGuid>
-    <SchemaVersion>2.0</SchemaVersion>
-    <OutputName>psqlodbc-setup</OutputName>
-    <OutputType>Bundle</OutputType>
-    <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
-    <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
-    <OutputPath>bin\$(Configuration)\</OutputPath>
-    <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
-    <DefineConstants>Debug</DefineConstants>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
-    <OutputPath>bin\$(Configuration)\</OutputPath>
-    <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
-  </PropertyGroup>
-  <ItemGroup>
-    <Compile Include="Bundle.wxs" />
-    <Compile Include="vcredist.wxs" />
-  </ItemGroup>
-  <ItemGroup>
-    <WixExtension Include="WixUtilExtension">
-      <HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath>
-      <Name>WixUtilExtension</Name>
-    </WixExtension>
-    <WixExtension Include="WixBalExtension">
-      <HintPath>$(WixExtDir)\WixBalExtension.dll</HintPath>
-      <Name>WixBalExtension</Name>
-    </WixExtension>
-  </ItemGroup>
-  <Import Project="$(WixTargetsPath)" />
-  <!--
-	To modify your build process, add your task inside one of the targets below and uncomment it.
-	Other similar extension points exist, see Wix.targets.
-	<Target Name="BeforeBuild">
-	</Target>
-	<Target Name="AfterBuild">
-	</Target>
-	-->
-</Project>
diff --git a/installer/psqlodbc-setup/vcredist.wxs b/installer/psqlodbc-setup/vcredist.wxs
deleted file mode 100755
index 7342729..0000000
--- a/installer/psqlodbc-setup/vcredist.wxs
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- ?define vcredist_x86 =  http://download.microsoft.com/download/d/d/9/dd9a82d0-52ef-40db-8dab-795376989c03/vcredist_x86.exe ?>
-<?define vcredist_x64 =  http://download.microsoft.com/download/d/d/9/dd9a82d0-52ef-40db-8dab-795376989c03/vcredist_x64.exe ? -->
-<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
-     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
-  <Fragment>
-		<!-- TODO: Put your code here. -->
-    <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86" Value="Installed" Variable="vc100_redist_x86" />
-    <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x64" Value="Installed" Variable="vc100_redist_x64" Win64="yes"/>
-    <PackageGroup Id="vcredist">
-      <ExePackage Id="vc100_redist_x86"
-        Cache="no"
-        Compressed="yes"
-        PerMachine="yes"
-        Permanent="yes"
-        Vital="yes"
-        Name="Redist\vc100_redist_x86.exe"
-        SourceFile="vc100_redist_x86.exe"
-        InstallCommand="/q"
-        DetectCondition="vc100_redist_x86 AND (vc100_redist_x86 &gt;= 1)">
-        <ExitCode Value ="3010" Behavior="forceReboot" />
-      </ExePackage>
-      <ExePackage Id="vc100_redist_x64"
-        Cache="no"
-        Compressed="yes"
-        PerMachine="yes"
-        Permanent="yes"
-        Vital="yes"
-        Name="Redist\vc100_redist_x64.exe"
-        SourceFile="vc100_redist_x64.exe"
-        InstallCommand="/q"
-        InstallCondition="VersionNT64"
-        DetectCondition="vc100_redist_x64 AND (vc100_redist_x64 &gt;= 1)">
-        <ExitCode Value ="3010" Behavior="forceReboot" />
-      </ExePackage>
-    </PackageGroup>
-  </Fragment>
-</Wix>
diff --git a/installer/psqlodbc_cpu.wxs b/installer/psqlodbc_cpu.wxs
index 9c33838..2bf80f0 100644
--- a/installer/psqlodbc_cpu.wxs
+++ b/installer/psqlodbc_cpu.wxs
@@ -32,7 +32,9 @@
   <?define ALLUSERS = "1" ?>
 <?endif?>
 
+<?ifndef var.MERGEM ?>
 <?define MERGEM = "$(var.Platform)\psqlodbc_$(var.Platform).msm" ?>
+<?endif?>
 
 <!-- Product details -->
 
diff --git a/installer/psqlodbcm_cpu.wxs b/installer/psqlodbcm_cpu.wxs
index aed8508..d546da8 100644
--- a/installer/psqlodbcm_cpu.wxs
+++ b/installer/psqlodbcm_cpu.wxs
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
 
-<!-- Default to x86 platform -->
+<!-- Default to x86 (32-bit) and Release configuration-->
 <?ifndef var.Platform ?>
   <?define Platform = "x86" ?>
 <?else?>
@@ -10,24 +10,33 @@
   <?endif?>
 <?endif?>
 
+<?ifndef var.Configuration ?>
+  <?define Configuration = "Release" ?>
+<?else?>
+  <?if $(var.Configuration) != Release and $(var.Configuration) != Debug ?>
+    <?error Invalid Configuration variable ?>
+  <?endif?>
+<?endif?>
+
 <?if $(var.Platform) = x64 ?>
-  <?define ModuleName = "psqlODBC_$(var.Platform)" ?>
+  <?define ModuleName = "psqlODBC_x64" ?>
   <?define BIT64 = "yes" ?>
-  <?define ANSIFOLDER = "x64_ANSI_Release" ?>
-  <?define UNICODEFOLDER = "x64_Unicode_Release" ?>
+  <?define ANSIFOLDER = "x64_ANSI_$(var.Configuration)" ?>
+  <?define UNICODEFOLDER = "x64_Unicode_$(var.Configuration)" ?>
   <?define Module_PackageId = "970B6E07-7105-4d66-80FA-9E208952FB96" ?>
   <?define CIDPFILES = "5C9A19B5-D7C6-4bb4-BBBC-88C2A67A59B0" ?>
   <?define InstallerVersion = "300" ?>
 <?else?>
   <?define ModuleName = "psqlODBC" ?>
   <?define BIT64 = "no" ?>
-  <?define ANSIFOLDER = "x86_ANSI_Release" ?>
-  <?define UNICODEFOLDER = "x86_Unicode_Release" ?>
+  <?define ANSIFOLDER = "x86_ANSI_$(var.Configuration)" ?>
+  <?define UNICODEFOLDER = "x86_Unicode_$(var.Configuration)" ?>
   <?define Module_PackageId = "ACF10866-5C01-46f0-90F0-D5618638CA48" ?>
   <?define CIDPFILES = "00A1ACE3-B7C2-41b8-A1F1-DB565990DA4E" ?>
   <?define InstallerVersion = "150" ?>
 <?endif?>
 
+
   <Module
     Id="$(var.ModuleName)"
     Version="$(var.VERSION)"
diff --git a/psqlodbc.sln b/psqlodbc.sln
deleted file mode 100644
index b515cd3..0000000
--- a/psqlodbc.sln
+++ /dev/null
@@ -1,20 +0,0 @@
-﻿
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "psqlODBC", "psqlodbc.vcproj", "{C45ECB41-8473-4F11-8186-E5574CFBADCF}"
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Win32 = Debug|Win32
-		Release|Win32 = Release|Win32
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{C45ECB41-8473-4F11-8186-E5574CFBADCF}.Debug|Win32.ActiveCfg = Debug|Win32
-		{C45ECB41-8473-4F11-8186-E5574CFBADCF}.Debug|Win32.Build.0 = Debug|Win32
-		{C45ECB41-8473-4F11-8186-E5574CFBADCF}.Release|Win32.ActiveCfg = Release|Win32
-		{C45ECB41-8473-4F11-8186-E5574CFBADCF}.Release|Win32.Build.0 = Release|Win32
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal
diff --git a/psqlodbc.vcproj b/psqlodbc.vcproj
deleted file mode 100644
index 6aa42ab..0000000
--- a/psqlodbc.vcproj
+++ /dev/null
@@ -1,1135 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8.00"
-	Name="psqlODBC"
-	ProjectGUID="{C45ECB41-8473-4F11-8186-E5574CFBADCF}"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory=".\Release"
-			IntermediateDirectory=".\Release"
-			ConfigurationType="2"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Release/psqlodbc.tlb"
-				HeaderFileName=""
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/D SSL_DLL=&quot;\&quot;SSLEAY32.dll\&quot;&quot;"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="&quot;C:\Program Files\PostgreSQL\9.3\include&quot;;&quot;C:\OpenSSL\include&quot;"
-				PreprocessorDefinitions="USE_LIBPQ;WIN32;_WINDOWS;_USRDLL;ODBCVER=0x0351;DRIVER_CURSOR_IMPLEMENT;WIN_MULTITHREAD_SUPPORT;DYNAMIC_LOAD;MULTIBYTE;UNICODE_SUPPORT;USE_SSL;_CRT_SECURE_NO_DEPRECATE;USE_SSPI"
-				StringPooling="true"
-				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile="psqlodbc.pch"
-				AssemblerListingLocation=".\Release/"
-				ObjectFile=".\Release/"
-				ProgramDataBaseFileName=".\Release/"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				Culture="1041"
-				AdditionalIncludeDirectories="."
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib XOleHlp.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib winmm.lib libpq.lib ssleay32.lib libeay32.lib"
-				OutputFile="psqlodbc35w.dll"
-				LinkIncremental="1"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="&quot;C:\Program Files\PostgreSQL\9.3\lib\ms&quot;;&quot;C:\OpenSSL\lib\VC&quot;"
-				IgnoreAllDefaultLibraries="false"
-				ModuleDefinitionFile=".\psqlodbc.def"
-				DelayLoadDLLs="libpq.dll;ssleay32.dll;libeay32.dll;secur32.dll;crypt32.dll;XOLEHLP.DLL"
-				ProgramDatabaseFile="psqlodbc35w.pdb"
-				SubSystem="2"
-				ImportLibrary="psqlodbc35w.lib"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-				SuppressStartupBanner="true"
-				OutputFile=".\Release/psqlodbc.bsc"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory=".\Debug"
-			IntermediateDirectory=".\Debug"
-			ConfigurationType="2"
-			UseOfMFC="0"
-			ATLMinimizesCRunTimeLibraryUsage="false"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TypeLibraryName=".\Debug/psqlodbc.tlb"
-				HeaderFileName=""
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalOptions="/D SSL_DLL=&quot;\&quot;SSLEAY32.dll\&quot;&quot;"
-				Optimization="2"
-				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="&quot;C:\Program Files\PostgreSQL\9.3\include&quot;;&quot;C:\OpenSSL\include&quot;"
-				PreprocessorDefinitions="_DEBUG;USE_LIBPQ;WIN32;_WINDOWS;_USRDLL;ODBCVER=0x0351;DRIVER_CURSOR_IMPLEMENT;WIN_MULTITHREAD_SUPPORT;DYNAMIC_LOAD;MULTIBYTE;UNICODE_SUPPORT;USE_SSL;_CRT_SECURE_NO_DEPRECATE;USE_SSPI"
-				StringPooling="true"
-				RuntimeLibrary="1"
-				EnableFunctionLevelLinking="true"
-				PrecompiledHeaderFile=".\Debug/psqlodbc.pch"
-				AssemblerListingLocation=".\Debug/"
-				ObjectFile=".\Debug/"
-				ProgramDataBaseFileName=".\Debug/"
-				BrowseInformation="1"
-				WarningLevel="3"
-				SuppressStartupBanner="true"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1041"
-				AdditionalIncludeDirectories="."
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib XOleHlp.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib winmm.lib libpq.lib ssleay32.lib libeay32.lib"
-				OutputFile="psqlodbc35w.dll"
-				LinkIncremental="2"
-				SuppressStartupBanner="true"
-				AdditionalLibraryDirectories="&quot;C:\Program Files\PostgreSQL\9.3\lib\ms&quot;;&quot;C:\OpenSSL\lib\VC&quot;"
-				IgnoreAllDefaultLibraries="false"
-				ModuleDefinitionFile=".\psqlodbc.def"
-				DelayLoadDLLs="libpq.dll;ssleay32.dll;libeay32.dll;secur32.dll;crypt32.dll;XOLEHLP.DLL"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="psqlodbc35w.pdb"
-				SubSystem="2"
-				ImportLibrary="psqlodbc35w.lib"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-				SuppressStartupBanner="true"
-				OutputFile=".\Debug/psqlodbc.bsc"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="source"
-			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-			>
-			<File
-				RelativePath="bind.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="columninfo.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="connection.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="convert.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="descriptor.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="dlg_specific.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="dlg_wingui.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="drvconn.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="environ.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="execute.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="info.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="info30.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="inouealc.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="loadlib.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="lobj.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="misc.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="multibyte.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="mylog.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="odbcapi.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="odbcapi30.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="odbcapi30w.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="odbcapiw.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="options.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="parse.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="pgapi30.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="pgtypes.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="psqlodbc.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="qresult.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="results.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="setup.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="socket.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath=".\sspisvcs.c"
-				>
-			</File>
-			<File
-				RelativePath="statement.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="tuple.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="win_md5.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="win_unicode.c"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						AdditionalIncludeDirectories=""
-						PreprocessorDefinitions=""
-					/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-		<Filter
-			Name="include"
-			>
-			<File
-				RelativePath="bind.h"
-				>
-			</File>
-			<File
-				RelativePath="columninfo.h"
-				>
-			</File>
-			<File
-				RelativePath="connection.h"
-				>
-			</File>
-			<File
-				RelativePath="convert.h"
-				>
-			</File>
-			<File
-				RelativePath="descriptor.h"
-				>
-			</File>
-			<File
-				RelativePath="dlg_specific.h"
-				>
-			</File>
-			<File
-				RelativePath="environ.h"
-				>
-			</File>
-			<File
-				RelativePath="iodbc.h"
-				>
-			</File>
-			<File
-				RelativePath="isql.h"
-				>
-			</File>
-			<File
-				RelativePath="isqlext.h"
-				>
-			</File>
-			<File
-				RelativePath="loadlib.h"
-				>
-			</File>
-			<File
-				RelativePath="lobj.h"
-				>
-			</File>
-			<File
-				RelativePath="md5.h"
-				>
-			</File>
-			<File
-				RelativePath="misc.h"
-				>
-			</File>
-			<File
-				RelativePath="multibyte.h"
-				>
-			</File>
-			<File
-				RelativePath="pgapifunc.h"
-				>
-			</File>
-			<File
-				RelativePath="pgtypes.h"
-				>
-			</File>
-			<File
-				RelativePath="psqlodbc.h"
-				>
-			</File>
-			<File
-				RelativePath="qresult.h"
-				>
-			</File>
-			<File
-				RelativePath="socket.h"
-				>
-			</File>
-			<File
-				RelativePath=".\sspisvcs.h"
-				>
-			</File>
-			<File
-				RelativePath="statement.h"
-				>
-			</File>
-			<File
-				RelativePath="tuple.h"
-				>
-			</File>
-			<File
-				RelativePath="tuplelist.h"
-				>
-			</File>
-			<File
-				RelativePath="win_setup.h"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="resource"
-			>
-			<File
-				RelativePath="psqlodbc.def"
-				>
-			</File>
-			<File
-				RelativePath="psqlodbc.rc"
-				>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCResourceCompilerTool"
-						PreprocessorDefinitions=""
-						AdditionalIncludeDirectories=""
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCResourceCompilerTool"
-						PreprocessorDefinitions=""
-						AdditionalIncludeDirectories=""
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="resource.h"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/win64.mak b/win64.mak
deleted file mode 100755
index b8f1342..0000000
--- a/win64.mak
+++ /dev/null
@@ -1,399 +0,0 @@
-#
-# File:			win64.mak
-#
-# Description:		psqlodbc35w Unicode 64bit version Makefile.
-#			(can be built using platform SDK's buildfarm)
-#
-# Configurations:	Debug, Release
-# Build Types:		ALL, CLEAN
-# Usage:		NMAKE /f win64.mak CFG=[Release | Debug] [ALL | CLEAN]
-#
-# Comments:		Created by Hiroshi Inoue, 2006-10-31
-#
-
-# Include default configuration options, followed by any local overrides
-!INCLUDE windows-defaults.mak
-!IF EXISTS(windows-local.mak)
-!INCLUDE windows-local.mak
-!ENDIF
-
-!IF "$(ANSI_VERSION)" == "yes"
-!MESSAGE Building the PostgreSQL ANSI 3.0 Driver for $(TARGET_CPU)...
-!ELSE
-!MESSAGE Building the PostgreSQL Unicode 3.5 Driver for $(TARGET_CPU)...
-!ENDIF
-!MESSAGE
-!IF "$(CFG)" == ""
-CFG=Release
-!MESSAGE No configuration specified. Defaulting to Release.
-!MESSAGE
-!ENDIF
-
-!IF "$(CFG)" != "Release" && "$(CFG)" != "Debug"
-!MESSAGE Invalid configuration "$(CFG)" specified.
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f win64.mak CFG=[Release | Debug] [ALL | CLEAN]
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Release" ($(TARGET_CPU) Release DLL)
-!MESSAGE "Debug" ($(TARGET_CPU) Debug DLL)
-!MESSAGE
-!ERROR An invalid configuration was specified.
-!ENDIF
-
-#
-#	Please replace the default options from the commandline if necessary
-#
-!IFNDEF	CUSTOMCLOPT
-CUSTOMCLOPT=/nologo /W3 /wd4018 /EHsc
-!IF  "$(CFG)" == "Release"
-CUSTOMCLOPT=$(CUSTOMCLOPT) /MD
-!ELSE
-CUSTOMCLOPT=$(CUSTOMCLOPT) /MDd
-!ENDIF
-!ELSE
-!MESSAGE CL option $(CUSTOMCLOPT) specified
-!ENDIF
-
-#
-#	Please specify additional libraries to link from the command line.
-#	For example specify
-#		CUSTOMLINKLIBS=bufferoverflowu.lib
-#	  when bufferoverflowu.lib is needed in old VC environment.
-#
-CUSTOMLINKLIBS=
-
-# Print the paths that will be used in the build
-!MESSAGE Using PostgreSQL Include directory: $(PG_INC)
-!MESSAGE Using PostgreSQL Library directory: $(PG_LIB)
-
-!IF "$(USE_LIBPQ)" != "no"
-!MESSAGE Using OpenSSL Include directory: $(SSL_INC)
-!MESSAGE Using OpenSSL Library directory: $(SSL_LIB)
-!ENDIF
-
-!IF "$(USE_LIBPQ)" != "no"
-SSL_DLL = "SSLEAY32.dll"
-RESET_CRYPTO = yes
-ADD_DEFINES = $(ADD_DEFINES) /D USE_LIBPQ /D "SSL_DLL=\"$(SSL_DLL)\"" /D USE_SSL
-!ENDIF
-
-!IF "$(USE_SSPI)" == "yes"
-ADD_DEFINES = $(ADD_DEFINES) /D USE_SSPI
-!ENDIF
-!IF "$(USE_GSS)" == "yes"
-ADD_DEFINES = $(ADD_DEFINES) /D USE_GSS
-!ENDIF
-
-!IF "$(ANSI_VERSION)" == "yes"
-DTCLIB = pgenlista
-!ELSE
-DTCLIB = pgenlist
-!ENDIF
-DTCDLL = $(DTCLIB).dll
-
-!IF "$(TARGET_CPU)" == "x64"
-ADD_DEFINES=$(ADD_DEFINES) /D _WIN64
-!ENDIF
-
-!IF "$(USE_LIBPQ)" != "no"
-VC07_DELAY_LOAD=/DelayLoad:libpq.dll /DelayLoad:$(SSL_DLL)
-!IF "$(RESET_CRYPTO)" == "yes"
-VC07_DELAY_LOAD=$(VC07_DELAY_LOAD) /DelayLoad:libeay32.dll
-ADD_DEFINES=$(ADD_DEFINES) /D RESET_CRYPTO_CALLBACKS
-!ENDIF
-!ENDIF
-!IF "$(USE_SSPI)" == "yes"
-VC07_DELAY_LOAD=$(VC07_DELAY_LOAD) /DelayLoad:secur32.dll /DelayLoad:crypt32.dll
-!ENDIF
-!IF "$(USE_GSS)" == "yes"
-VC07_DELAY_LOAD=$(VC07_DELAY_LOAD) /DelayLoad:gssapi64.dll
-!ENDIF
-!IF "$(MSDTC)" != "no"
-VC07_DELAY_LOAD=$(VC07_DELAY_LOAD) /DelayLoad:$(DTCDLL)
-!ENDIF
-VC07_DELAY_LOAD=$(VC07_DELAY_LOAD) /DELAY:UNLOAD
-
-ADD_DEFINES = $(ADD_DEFINES) /D "DYNAMIC_LOAD"
-!IF "$(MSDTC)" != "no"
-ADD_DEFINES = $(ADD_DEFINES) /D "_HANDLE_ENLIST_IN_DTC_"
-!ENDIF
-!IF "$(MEMORY_DEBUG)" == "yes"
-ADD_DEFINES = $(ADD_DEFINES) /D "_MEMORY_DEBUG_" /GS
-!ENDIF
-!IF "$(ANSI_VERSION)" == "yes"
-ADD_DEFINES = $(ADD_DEFINES) /D "DBMS_NAME=\"PostgreSQL ANSI($(TARGET_CPU))\"" /D "ODBCVER=0x0350"
-!ELSE
-ADD_DEFINES = $(ADD_DEFINES) /D "DBMS_NAME=\"PostgreSQL Unicode($(TARGET_CPU))\"" /D "ODBCVER=0x0351" /D "UNICODE_SUPPORT"
-RSC_DEFINES = $(RSC_DEFINES) /D "UNICODE_SUPPORT"
-!ENDIF
-
-!IF "$(PORT_CHECK)" == "yes"
-ADD_DEFINES = $(ADD_DEFINES) /Wp64
-!ENDIF
-
-!IF "$(PG_INC)" != ""
-INC_OPT = $(INC_OPT) /I "$(PG_INC)"
-!ENDIF
-!IF "$(SSL_INC)" != ""
-INC_OPT = $(INC_OPT) /I "$(SSL_INC)"
-!ENDIF
-!IF "$(GSS_INC)" != ""
-INC_OPT = $(INC_OPT) /I "$(GSS_INC)"
-!ENDIF
-!IF "$(ADDL_INC)" != ""
-INC_OPT = $(INC_OPT) /I "$(ADD_INC)"
-!ENDIF
-
-!IF "$(ANSI_VERSION)" == "yes"
-MAINLIB = psqlodbc30a
-!ELSE
-MAINLIB = psqlodbc35w
-!ENDIF
-MAINDLL = $(MAINLIB).dll
-XALIB = pgxalib
-XADLL = $(XALIB).dll
-
-# Construct output directory name. The name consists of three parts,
-# target CPU, ANSI/Unicode, and Debug/Release. For example,the output
-# directory debug-enabled 32-bit ANSI-version is:
-#
-# .\x86_ANSI_Debug
-#
-OUTDIR=.\$(TARGET_CPU)
-!IF  "$(ANSI_VERSION)" == "yes"
-OUTDIR=$(OUTDIR)_ANSI
-!ELSE
-OUTDIR=$(OUTDIR)_Unicode
-!ENDIF
-!IF  "$(CFG)" == "Debug"
-OUTDIR=$(OUTDIR)_Debug
-!ELSE
-OUTDIR=$(OUTDIR)_Release
-!ENDIF
-
-# Location for intermediary build targets (e.g. *.obj files).
-INTDIR=$(OUTDIR)
-
-ALLDLL  = "$(INTDIR)"
-!IF "$(OUTDIR)" != "$(INTDIR)"
-ALLDLL  = $(ALLDLL) "$(INTDIR)"
-!ENDIF
-ALLDLL  = $(ALLDLL) "$(OUTDIR)\$(MAINDLL)"
-
-!IF  "$(MSDTC)" != "no"
-ALLDLL = $(ALLDLL) "$(OUTDIR)\$(XADLL)" "$(OUTDIR)\$(DTCDLL)"
-!ENDIF
-
-ALL : $(ALLDLL)
-
-CLEAN :
-	-@erase "$(INTDIR)\*.obj"
-	-@erase "$(INTDIR)\*.res"
-	-@erase "$(OUTDIR)\*.lib"
-	-@erase "$(OUTDIR)\*.exp"
-	-@erase "$(INTDIR)\*.pch"
-	-@erase "$(OUTDIR)\$(MAINDLL)"
-!IF "$(MSDTC)" != "no"
-	-@erase "$(OUTDIR)\$(DTCDLL)"
-	-@erase "$(OUTDIR)\$(XADLL)"
-!ENDIF
-
-"$(INTDIR)" :
-!IF !EXISTS($(INTDIR))
-    mkdir "$(INTDIR)"
-!ENDIF
-!IF !EXISTS($(OUTDIR)) && "$(OUTDIR)" != "$(INTDIR)"
-    mkdir "$(OUTDIR)"
-!ENDIF
-
-!IF  "$(MSDTC)" != "no"
-"$(OUTDIR)\$(MAINDLL)": "$(OUTDIR)\$(DTCLIB).lib"
-!ENDIF
-
-CPP=cl.exe
-CPP_PROJ=$(CUSTOMCLOPT) $(INC_OPT) /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_CRT_SECURE_NO_DEPRECATE" /D "WIN_MULTITHREAD_SUPPORT" $(ADD_DEFINES) /Fp"$(INTDIR)\psqlodbc.pch" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD
-!IF  "$(CFG)" == "Release"
-CPP_PROJ=$(CPP_PROJ) /O2
-!ELSEIF  "$(CFG)" == "Debug"
-CPP_PROJ=$(CPP_PROJ) /Gm /ZI /Od /D "_DEBUG" /RTC1
-!ENDIF
-
-.c{$(INTDIR)}.obj::
-   $(CPP) @<<
-   $(CPP_PROJ) /c $<
-<<
-
-.cpp{$(INTDIR)}.obj::
-   $(CPP) @<<
-   $(CPP_PROJ) /c $<
-<<
-
-.cxx{$(INTDIR)}.obj::
-   $(CPP) @<<
-   $(CPP_PROJ) /c $<
-<<
-
-RSC=rc.exe
-RSC_PROJ=/l 0x809 /fo"$(INTDIR)\psqlodbc.res"
-!IF  "$(CFG)" == "Debug"
-RSC_PROJ=$(RSC_PROJ) /d "_DEBUG"
-!ENDIF
-
-LINK32=link.exe
-LIB32=lib.exe
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib advapi32.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib XOleHlp.lib winmm.lib msvcrt.lib $(CUSTOMLINKLIBS) /nologo /dll /def:"$(DEF_FILE)"
-!IF "$(MSDTC)" != "no"
-LINK32_FLAGS=$(LINK32_FLAGS) "$(OUTDIR)\$(DTCLIB).lib"
-!ENDIF
-
-
-!IF  "$(ANSI_VERSION)" == "yes"
-DEF_FILE= "psqlodbca.def"
-!ELSE
-DEF_FILE= "psqlodbc.def"
-!ENDIF
-!IF  "$(CFG)" == "Release"
-LINK32_FLAGS=$(LINK32_FLAGS)
-!ELSE
-LINK32_FLAGS=$(LINK32_FLAGS) /debug /pdbtype:sept
-!ENDIF
-LINK32_FLAGS=$(LINK32_FLAGS) $(VC07_DELAY_LOAD)
-!IF "$(PG_LIB)" != ""
-LINK32_FLAGS=$(LINK32_FLAGS) /libpath:"$(PG_LIB)"
-!ENDIF
-!IF "$(GSS_LIB)" != ""
-LINK32_FLAGS=$(LINK32_FLAGS) /libpath:"$(GSS_LIB)"
-!ENDIF
-!IF "$(SSL_LIB)" != ""
-LINK32_FLAGS=$(LINK32_FLAGS) /libpath:"$(SSL_LIB)"
-!ENDIF
-
-LINK32_OBJS= \
-	"$(INTDIR)\bind.obj" \
-	"$(INTDIR)\columninfo.obj" \
-	"$(INTDIR)\connection.obj" \
-	"$(INTDIR)\convert.obj" \
-	"$(INTDIR)\dlg_specific.obj" \
-	"$(INTDIR)\dlg_wingui.obj" \
-	"$(INTDIR)\drvconn.obj" \
-	"$(INTDIR)\environ.obj" \
-	"$(INTDIR)\execute.obj" \
-	"$(INTDIR)\info.obj" \
-	"$(INTDIR)\info30.obj" \
-	"$(INTDIR)\lobj.obj" \
-	"$(INTDIR)\md5.obj" \
-	"$(INTDIR)\misc.obj" \
-	"$(INTDIR)\mylog.obj" \
-	"$(INTDIR)\pgapi30.obj" \
-	"$(INTDIR)\multibyte.obj" \
-	"$(INTDIR)\options.obj" \
-	"$(INTDIR)\parse.obj" \
-	"$(INTDIR)\pgtypes.obj" \
-	"$(INTDIR)\psqlodbc.obj" \
-	"$(INTDIR)\qresult.obj" \
-	"$(INTDIR)\results.obj" \
-	"$(INTDIR)\setup.obj" \
-!IF "$(USE_SSPI)" == "yes"
-	"$(INTDIR)\sspisvcs.obj" \
-!ENDIF
-!IF "$(USE_GSS)" == "yes"
-	"$(INTDIR)\gsssvcs.obj" \
-!ENDIF
-	"$(INTDIR)\socket.obj" \
-	"$(INTDIR)\statement.obj" \
-	"$(INTDIR)\tuple.obj" \
-	"$(INTDIR)\odbcapi.obj" \
-	"$(INTDIR)\odbcapi30.obj" \
-	"$(INTDIR)\descriptor.obj" \
-	"$(INTDIR)\loadlib.obj" \
-!IF "$(ANSI_VERSION)" != "yes"
-	"$(INTDIR)\win_unicode.obj" \
-	"$(INTDIR)\odbcapiw.obj" \
-	"$(INTDIR)\odbcapi30w.obj" \
-!ENDIF
-!IF "$(MSDTC)" != "no"
-	"$(INTDIR)\xalibname.obj" \
-!ENDIF
-!IF "$(MEMORY_DEBUG)" == "yes"
-	"$(INTDIR)\inouealc.obj" \
-!ENDIF
-	"$(INTDIR)\psqlodbc.res"
-
-DTCDEF_FILE= "$(DTCLIB).def"
-LIB32_DTCLIBFLAGS=/nologo /def:"$(DTCDEF_FILE)"
-
-LINK32_DTCFLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib uuid.lib wsock32.lib XOleHlp.lib $(OUTDIR)\$(MAINLIB).lib $(CUSTOMLINKLIBS) Delayimp.lib /DelayLoad:XOLEHLP.DLL /nologo /dll
-LINK32_DTCOBJS= \
-	"$(INTDIR)\msdtc_enlist.obj" "$(INTDIR)\xalibname.obj"
-
-XADEF_FILE= "$(XALIB).def"
-LINK32_XAFLAGS=/nodefaultlib:libcmt.lib kernel32.lib user32.lib gdi32.lib advapi32.lib odbc32.lib odbccp32.lib wsock32.lib XOleHlp.lib winmm.lib msvcrt.lib $(CUSTOMLINKLIBS) /nologo /dll /def:"$(XADEF_FILE)"
-LINK32_XAOBJS= \
-	"$(INTDIR)\pgxalib.obj"
-
-"$(OUTDIR)\$(MAINDLL)" : $(DEF_FILE) $(LINK32_OBJS)
-    $(LINK32) @<<
-  $(LINK32_FLAGS) $(LINK32_OBJS) /pdb:$*.pdb /implib:$*.lib /out:$@
-<<
-
-"$(OUTDIR)\$(DTCLIB).lib" : $(DTCDEF_FILE) $(LINK32_DTCOBJS)
-    $(LIB32) @<<
-  $(LIB32_DTCLIBFLAGS) $(LINK32_DTCOBJS) /out:$@
-<<
-
-"$(OUTDIR)\$(DTCDLL)" : $(DTCDEF_FILE) $(LINK32_DTCOBJS)
-    $(LINK32) @<<
-  $(LINK32_DTCFLAGS) $(LINK32_DTCOBJS) $*.exp /pdb:$*.pdb /out:$@
-<<
-
-"$(OUTDIR)\$(XADLL)" : $(XADEF_FILE) $(LINK32_XAOBJS)
-    $(LINK32) @<<
-  $(LINK32_XAFLAGS) $(LINK32_XAOBJS) /pdb:$*.pdb /implib:$*.lib /out:$@
-<<
-
-
-SOURCE=psqlodbc.rc
-
-"$(INTDIR)\psqlodbc.res" : $(SOURCE)
-	$(RSC) $(RSC_PROJ) $(RSC_DEFINES) $(SOURCE)
-
-
-
-####
-# Umbrella targets, for building the driver in multiple configurations
-
-unicode-driver:
-	$(MAKE) -f win64.mak ANSI_VERSION=no
-ansi-driver:
-	$(MAKE) -f win64.mak ANSI_VERSION=yes
-
-installer: unicode-driver ansi-driver
-	cd installer && $(MAKE) -f installer.mak CFG=$(CFG)
-
-# world target builds both 32-bit and 64-bit installers in one command.
-#
-# The "setenv" command, from Microsoft SDK, is used to switch the build
-# target. However, it only changes the environment for the current shell;
-# it is reset for the next command. So we cannot just call "setenv /x64"
-# here one one line and nmake one the next one. I also tried creating a .bat
-# file with the commands, but setenv contains a "EXIT /B" which stops the
-# script from executing. But we can launch a new cmd.exe and pass the
-# commands to it in stdin.
-world:
-	cmd < <<
-setenv /x64
-$(MAKE) -f win64.mak installer CFG=$(CFG)
-setenv /x86
-$(MAKE) -f win64.mak installer CFG=$(CFG)
-<<
-
-clean-world:
-	-rd /Q /S x64_ANSI_Release x64_ANSI_Debug
-	-rd /Q /S x64_Unicode_Release x64_Unicode_Debug
-	-rd /Q /S x86_ANSI_Release x86_ANSI_Debug
-	-rd /Q /S x86_Unicode_Release x86_Unicode_Debug
-	cd installer && $(MAKE) /f installer.mak CFG=$(CFG) clean
diff --git a/winbuild.proj b/winbuild.proj
new file mode 100755
index 0000000..9546191
--- /dev/null
+++ b/winbuild.proj
@@ -0,0 +1,82 @@
+<!--
+    This is the top-level MSBuild project file for building the driver on 
+    Windows. It calls into the sub-project files in the winbuild directory to
+    build the driver DLLs, the files in installer directory to build the
+    installer.
+
+Targets:
+
+  BuildDriver     - Builds the ANSI or Unicode driver, in a single
+                    Configuration and Platform
+  BuildDriverBoth - Build ANSI and Unicode drives, in a single Configuration
+                    and Platform
+  BuildInstaller  - Build the installer for a single Configuratation and
+                    Platform
+
+  BuildAll        - Build both x86 and x64 installers, in current
+                    Debug/release Configuration. This is the default target.
+
+  Clean           - Remove all output directories
+
+  -->
+<Project DefaultTargets="BuildAll" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+    <!-- Build drivers and installer, both 32-bit and 64-bit versions. -->
+    <Target Name="BuildAll">
+        <MSBuild Projects="winbuild.proj" Targets="BuildInstaller"
+	  Properties="TARGET_CPU=x86"/>
+        <MSBuild Projects="winbuild.proj" Targets="BuildInstaller"
+	  Properties="TARGET_CPU=x64"/>
+    </Target>
+
+    <!-- Build the driver DLLs, with current combination of ANSI/Unicode,
+         32-bit/64-bit and Debug/Release configuration. -->
+    <Target Name="BuildDriver">
+        <!-- pgenlist.dll and psqlodbc.dll both depend on each other, so
+             building one before the other will fail, in either order.
+             To work around that, first build just the import libraries.
+          -->
+        <MSBuild Projects="winbuild\psqlodbc.vcxproj;winbuild\pgenlist.vcxproj"
+	  Targets="BuildImportLib" />
+
+        <MSBuild Projects="winbuild\psqlodbc.vcxproj;winbuild\pgenlist.vcxproj;winbuild\pgxalib.vcxproj"
+	  Targets="Build"/>
+    </Target>
+
+    <!-- Build ANSI and Unicode drivers, in current 32-bit/64-bit and
+         Debug/Release configuration -->
+    <ItemGroup>
+      <BothDrivers Include="winbuild.proj">
+        <AdditionalProperties>ANSI_VERSION=false</AdditionalProperties>
+      </BothDrivers>
+      <BothDrivers Include="winbuild.proj">
+        <AdditionalProperties>ANSI_VERSION=true</AdditionalProperties>
+      </BothDrivers>
+    </ItemGroup>
+    <Target Name="BuildDriverBoth">
+        <MSBuild Projects="winbuild.proj" Targets="BuildDriver"
+                 Properties="ANSI_VERSION=false" />
+        <MSBuild Projects="winbuild.proj" Targets="BuildDriver"
+                 Properties="ANSI_VERSION=true" />
+    </Target>
+
+    <!-- Build installer, in current 32-bit/64-bit and Debug/Release
+         configuration -->
+    <Target Name="BuildInstaller" DependsOnTargets="BuildDriverBoth">
+        <MSBuild Projects="installer\installer.proj" Targets="Build" />
+    </Target>
+
+    <!-- Remove all output directories -->
+    <Target Name="Clean">
+        <!-- Installer output directories -->
+        <RemoveDir Directories="x86_Debug;x86_Release" />
+        <!-- Driver output directories -->
+        <RemoveDir Directories="x86_ANSI_Debug;x86_ANSI_Release" />
+        <RemoveDir Directories="x86_Unicode_Debug;x86_Unicode_Release" />
+	<!-- same for x64 -->
+        <RemoveDir Directories="x64_Debug;x64_Release" />
+        <RemoveDir Directories="x64_ANSI_Debug;x64_ANSI_Release" />
+        <RemoveDir Directories="x64_Unicode_Debug;x64_Unicode_Release" />
+    </Target>
+
+</Project>
diff --git a/winbuild/BuildAll.ps1 b/winbuild/BuildAll.ps1
deleted file mode 100755
index 6b68e04..0000000
--- a/winbuild/BuildAll.ps1
+++ /dev/null
@@ -1,300 +0,0 @@
-<#
-.SYNOPSIS
-    Build all dlls of psqlodbc project using MSbuild.
-.DESCRIPTION
-    Build psqlodbc35w.dll, psqlodbc30a.dll, pgenlist.dll, pgenlista.dll
-    and pgxalib.dll for both x86 and x64 platforms.
-.PARAMETER Target
-    Specify the target of MSBuild. "Build"(default), "Rebuild" or
-    "Clean" is available.
-.PARAMETER VCVersion
-    Visual Studio version is determined automatically unless this
-    option is specified.
-.PARAMETER Platform
-    Specify build platforms, "both"(default), "Win32" or "x64" is
-    available.
-.PARAMETER Toolset
-    MSBuild PlatformToolset is determined automatically unless this
-    option is specified. Currently "v100", "Windows7.1SDK", "v110",
-    "v110_xp", "v120" or "v120_xp" is available.
-.PARAMETER MSToolsVersion
-    MSBuild ToolsVersion is detemrined automatically unless this
-    option is specified.  Currently "4.0" or "12.0" is available.
-.PARAMETER Configuration
-    Specify "Release"(default) or "Debug".
-.PARAMETER BuildConfigPath
-    Specify the configuration xml file name if you want to use
-    the configuration file other than standard one.
-    The relative path is relative to the current directory.
-.EXAMPLE
-    > .\BuildAll
-	Build with default or automatically selected parameters.
-.EXAMPLE
-    > .\BuildAll Clean
-	Clean all generated files.
-.EXAMPLE
-    > .\BuildAll -V(CVersion) 11.0
-	Build using Visual Studio 11.0 environment.
-.EXAMPLE
-    > .\BuildAll -P(latform) x64
-	Build only 64bit dlls.
-.NOTES
-    Author: Hiroshi Inoue
-    Date:   Febrary 1, 2014
-#>
-
-#
-#	build 32bit & 64bit dlls for VC10 or later
-#
-Param(
-[ValidateSet("Build", "Rebuild", "Clean", "info")]
-[string]$Target="Build",
-[string]$VCVersion,
-[ValidateSet("Win32", "x64", "both")]
-[string]$Platform="both",
-[string]$Toolset,
-[ValidateSet("", "4.0", "12.0")]
-[string]$MSToolsVersion,
-[ValidateSet("Debug", "Release")]
-[String]$Configuration="Release",
-[string]$BuildConfigPath
-)
-
-function buildPlatform($platinfo, $Platform)
-{
-	$USE_LIBPQ=$platinfo.use_libpq
-	$LIBPQVER=$platinfo.libpq.version
-	if ($LIBPQVER -eq "") {
-		$LIBPQVER = $LIBPQ_VERSION
-	}
-	$USE_SSPI=$platinfo.use_sspi
-	$USE_GSS=$platinfo.use_gss
-	$PG_INC=$platinfo.libpq.include
-	$PG_LIB=$platinfo.libpq.lib
-	$SSL_INC=$platinfo.ssl.include
-	$SSL_LIB=$platinfo.ssl.lib
-	$GSS_INC=$platinfo.gss.include
-	$GSS_LIB=$platinfo.gss.lib
-	$BUILD_MACROS=$platinfo.build_macros
-	if ($USE_LIBPQ -eq "yes")
-	{
-		if ($Platform -eq "x64") {
-			if ($env:PROCESSOR_ARCHITECTURE -eq "x86") {
-				$pgmfs = "$env:ProgramW6432"
-			} else {
-				$pgmfs = "$env:ProgramFiles"
-			}
-		} else {
-			if ($env:PROCESSOR_ARCHITECTURE -eq "x86") {
-				$pgmfs = "$env:ProgramFiles"
-			} else {
-				$pgmfs = "${env:ProgramFiles(x86)}"
-			}
-		}
-		if ($PG_INC -eq "default") {
-			if ($pgmfs -eq "") {
-				PG_INC=""
-			} else {
-				$PG_INC = "$pgmfs\PostgreSQL\$LIBPQVER\include"
-			}
-		}
-		if ($PG_LIB -eq "default") {
-			if ($pgmfs -eq "") {
-				PG_LIB=""
-			} else {
-				$PG_LIB = "$pgmfs\PostgreSQL\$LIBPQVER\lib"
-			}
-		}
-	}
-
-	Write-Host "USE LIBPQ  : $USE_LIBPQ ($PG_INC $PG_LIB)"
-	Write-Host "USE GSS    : $USE_GSS ($GSS_INC $GSS_LIB)"
-	Write-Host "USE SSPI   : $USE_SSPI"
-	Write-Host "SSL DIR    : ($SSL_INC $SSL_LIB)"
-
-	$MACROS=@"
-/p:USE_LIBPQ=$USE_LIBPQ``;USE_SSPI=$USE_SSPI``;USE_GSS=$USE_GSS``;PG_LIB="$PG_LIB"``;PG_INC="$PG_INC"``;SSL_LIB="$SSL_LIB"``;SSL_INC="$SSL_INC"``;GSS_LIB="$GSS_LIB"``;GSS_INC="$GSS_INC"
-"@
-	if ($BUILD_MACROS -ne "") {
-		$BUILD_MACROS = $BUILD_MACROS -replace ';', '`;'
-		$BUILD_MACROS = $BUILD_MACROS -replace '"', '`"'
-		$MACROS="$MACROS $BUILD_MACROS"
-	}
-	Write-Debug "MACROS in function = $MACROS"
-
-	invoke-expression -Command "& `"${msbuildexe}`" ./platformbuild.vcxproj /tv:$MSToolsVersion /p:Platform=$Platform``;Configuration=$Configuration``;PlatformToolset=${Toolset} /t:$target /p:VisualStudioVersion=${VisualStudioVersion} /p:DRIVERVERSION=$DRIVERVERSION ${MACROS}"
-}
-
-$scriptPath = (Split-Path $MyInvocation.MyCommand.Path)
-$configInfo = & "$scriptPath\configuration.ps1" "$BuildConfigPath"
-$DRIVERVERSION=$configInfo.Configuration.version
-pushd $scriptPath
-$path_save = ${env:PATH}
-
-$WSDK71Set="Windows7.1SDK"
-$refnum=""
-Write-Debug "VCVersion=$VCVersion $env:VisualStudioVersion"
-#
-#	Determine VisualStudioVersion
-#
-if ("$VCVersion" -eq "") {
-	$VCVersion=$configInfo.Configuration.vcversion
-}
-$VisualStudioVersion=$VCVersion
-if ("$VisualStudioVersion" -eq "") {
-	$VisualStudioVersion = $env:VisualStudioVersion # VC11 or later version of C++ command prompt sets this variable
-}
-if ("$VisualStudioVersion" -eq "") {
-	if ("${env:WindowsSDKVersionOverride}" -eq "v7.1") { # SDK7.1+ command prompt
-		$VisualStudioVersion = "10.0"
-	} elseif ("${env:VCInstallDir}" -ne "") { # C++ command prompt
-		if ("${env:VCInstallDir}" -match "Visual Studio\s*(\S+)\\VC\\$") {
-			$VisualStudioVersion = $matches[1]
-		}
-	}
-}
-#	neither C++ nor SDK prompt
-if ("$VisualStudioVersion" -eq "") {
-	if ("${env:VS100COMNTOOLS}" -ne "") { # VC10 or SDK 7.1 is installed (current official)
-		$VisualStudioVersion = "10.0"
-	} elseif ("${env:VS120COMNTOOLS}" -ne "") { # VC12 is installed
-		$VisualStudioVersion = "12.0"
-	} elseif ("${env:VS110COMNTOOLS}" -ne "") { # VC11 is installed
-		$VisualStudioVersion = "11.0"
-	} else {
-		Write-Error "Visual Studio >= 10.0 not found" -Category InvalidArgument;return
-	}
-} elseif ([int]::TryParse($VisualStudioVersion, [ref]$refnum)) {
-	$VisualStudioVersion="${refnum}.0"
-}
-#	Check VisualStudioVersion and prepare for ToolsVersion
-switch ($VisualStudioVersion) {
- "10.0"	{ $tv = "4.0" }
- "11.0"	{ $tv = "4.0" }
- "12.0"	{ $tv = "12.0" }
- default { Write-Error "Selected Visual Stuidio is Version ${VisualStudioVersion}. Please use VC10 or later" -Category InvalidArgument; return }
-}
-#
-#	Determine ToolsVersion
-#
-if ("$MSToolsVersion" -eq "") {
-	$MSToolsVersion=$env:ToolsVersion
-}
-if ("$MSToolsVersion" -eq "") {
-	 $MSToolsVersion = $tv
-} elseif ([int]::TryParse($MSToolsVersion, [ref]$refnum)) {
-	$MSToolsVersion="${refnum}.0"
-}
-#
-#	Determine MSBuild executable
-#
-Write-Debug "ToolsVersion=$MSToolsVersion VisualStudioVersion=$VisualStudioVersion"
-try {
-	$msbver = invoke-expression "msbuild /ver /nologo"
-	if ("$msbver" -match "^(\d+)\.(\d+)") {
-		$major1 = [int] $matches[1]
-		$minor1 = [int] $matches[2]
-		if ($MSToolsVersion -match "^(\d+)\.(\d+)") {
-			$bavail = $false
-			$major2 = [int] $matches[1]
-			$minor2 = [int] $matches[2]
-			if ($major1 -gt $major2) {
-				Write-Debug "$major1 > $major2"
-				$bavail = $true
-			}
-			elseif ($major1 -eq $major2 -And $minor1 -ge $minor2) {
-				Write-Debug "($major1, $minor1) >= ($major2, $minor2)"
-				$bavail = $true
-			}
-			if ($bavail) {
-				$msbuildexe = "MSBuild"
-			}
-		}
-	}
-} catch {}
-if ("$msbuildexe" -eq "") {
-	$msbindir=""
-	$regKey="HKLM:\Software\Wow6432Node\Microsoft\MSBuild\ToolsVersions\${MSToolsVersion}"
-	if (Test-Path -path $regkey) {
-		$msbitem=Get-ItemProperty $regKey
-		if ($msbitem -ne $null) {
-			$msbindir=$msbitem.MSBuildToolsPath
-		}
-	} else {
-		$regKey="HKLM:\Software\Microsoft\MSBuild\ToolsVersions\${MSToolsVersion}"
-		if (Test-Path -path $regkey) {
-			$msbitem=Get-ItemProperty $regKey
-			if ($msbitem -ne $null) {
-				$msbindir=$msbitem.MSBuildToolsPath
-			}
-		} else {
-			Write-Error "MSBuild ToolsVersion $MSToolsVersion not Found" -Category NotInstalled; return
-		}
-	}
-	$msbuildexe = "$msbindir\msbuild"
-}
-#
-#	Determine PlatformToolset
-#
-if ("$Toolset" -eq "") {
-	$Toolset=$configInfo.Configuration.toolset
-}
-if ("$Toolset" -eq "") {
-	$Toolset=$env:PlatformToolset
-}
-if ("$Toolset" -eq "") {
-	switch ($VisualStudioVersion) {
-	 "10.0"	{
-			if (Test-path "HKLM:\Software\Microsoft\Microsoft SDKs\Windows\v7.1") {
-				$Toolset=$WSDK71Set
-			} else {
-				$Toolset="v100"
-			}
-		}
-	 "11.0"	{$Toolset="v110_xp"}
-	 "12.0"	{$Toolset="v120_xp"}
-	}
-}
-#	avoid a bug of Windows7.1SDK PlatformToolset
-if ($Toolset -eq $WSDK71Set) {
-	$env:TARGET_CPU=""
-}
-
-$recordResult = $true
-try {
-#
-#	build 32bit dlls
-#
-	if ($Platform -ieq "Win32" -or $Platform -ieq "both") {
-		buildPlatform $configInfo.Configuration.x86 "Win32"
-		if ($LastExitCode -ne 0) {
-			$recordResult = $false
-		}
-	}
-#
-#	build 64bit dlls
-#
-	if ($Platform -ieq "x64" -or $Platform -ieq "both") {
-		buildPlatform $configInfo.Configuration.x64 "x64"
-		if ($LastExitCode -ne 0) {
-			$recordResult = $false
-		}
-	}
-#
-#	Write the result to configuration xml
-#
-	if ($recordResult) {
-		$configInfo.Configuration.BuildResult.Date=[string](Get-Date)
-		$configInfo.Configuration.BuildResult.VisualStudioVersion=$VisualStudioVersion
-		$configInfo.Configuration.BuildResult.PlatformToolset=$Toolset
-		$configInfo.Configuration.BuildResult.ToolsVersion=$MSToolsVersion
-		$configInfo.Configuration.BuildResult.Platform=$Platform
-		SaveConfiguration $configInfo
-	}
-} catch {
-	$error[0] | Format-List -Force
-}
-
-Write-Host "ToolsVersion=$MSToolsVersion VisualStudioVersion=$VisualStudioVersion PlatformToolset=$Toolset"
-$env:PATH = $path_save
-popd
diff --git a/winbuild/configuration-defaults.props b/winbuild/configuration-defaults.props
new file mode 100644
index 0000000..7edd4a6
--- /dev/null
+++ b/winbuild/configuration-defaults.props
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  This file contains default configuration options for the build.
+  To override, create a "configuration-local.props" file. You can copy
+  this file as a template.
+-->
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+
+    <!-- Use libpq to establish connection. If enabled, PostgreSQL client
+         and OpenSSL must be installed, and PG_INC/PG_LIB and SSL_INC/SSL_LIB
+         properties must be set. -->
+    <USE_LIBPQ>true</USE_LIBPQ>
+
+    <!-- Support SSPI authentication -->    
+    <USE_SSPI>true</USE_SSPI>
+    <!-- Support two-phase commit with MSDTC -->
+    <MSDTC>true</MSDTC>
+
+    <!-- Support gssapi authentication. If enabled, libgss must be installed
+         and GSS_INC/GSS_LIB properties must be set. -->
+    <USE_GSS>false</USE_GSS>
+
+    <!-- Print a memory leak report at program exit. Off by default, and
+         ignored on Release builds. -->
+    <MEMORY_DEBUG>false</MEMORY_DEBUG>
+
+  </PropertyGroup>
+
+  <!-- Paths to external dependencies. These defaults are the default install
+       locations of the libraries, using the most recent stable versions.
+    -->
+  <PropertyGroup Condition="'$(Platform)'=='Win32'">
+
+    <!-- Location of PostgreSQL header files and libpq.lib -->
+    <PG_INC>C:\Program Files (x86)\PostgreSQL\9.3\include</PG_INC>
+    <PG_LIB>C:\Program Files (x86)\PostgreSQL\9.3\lib</PG_LIB>
+    <!-- Location of PostgreSQL libpq binaries. Not used when compiling, but
+         the libpq.dll and SSL DLLs are copied into the installer from this
+         directory -->
+    <PG_BIN>C:\Program Files (x86)\PostgreSQL\9.3\bin</PG_BIN>
+
+    <!-- Location of OpenSSL headers and lib -->
+    <SSL_INC>C:\OpenSSL-Win32\include</SSL_INC>
+    <SSL_LIB>C:\OpenSSL-Win32\lib</SSL_LIB>
+
+    <GSS_INC></GSS_INC>
+    <GSS_LIB></GSS_LIB>
+
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Platform)'=='x64'">
+    <PG_INC>C:\Program Files\PostgreSQL\9.3\include</PG_INC>
+    <PG_LIB>C:\Program Files\PostgreSQL\9.3\lib</PG_LIB>
+    <PG_BIN>C:\Program Files\PostgreSQL\9.3\bin</PG_BIN>
+    <SSL_INC>C:\OpenSSL-Win64\include</SSL_INC>
+    <SSL_LIB>C:\OpenSSL-Win64\lib</SSL_LIB>
+
+    <GSS_INC></GSS_INC>
+    <GSS_LIB></GSS_LIB>
+
+  </PropertyGroup>
+</Project>
\ No newline at end of file
diff --git a/winbuild/configuration.ps1 b/winbuild/configuration.ps1
deleted file mode 100755
index 318a147..0000000
--- a/winbuild/configuration.ps1
+++ /dev/null
@@ -1,96 +0,0 @@
-Param(
-[string]$configPath
-)
-function InitConfiguration($savePath = $configurationXmlPath)
-{
-	$configInfo = [xml](Get-Content "$configurationTemplatePath")
-	if ($env:PROCESSOR_ARCHITECTURE -eq "x86")
-	{
-		$x64info = $configInfo.Configuration.x64
-		$x64info.libpq.include = ""
-		$x64info.libpq.lib = ""
-		$x64info.libpq.bin = ""
-	}
-	$configInfo.save("$savePath")
-
-	return $configInfo
-}
-
-function global:GetConfiguration($loadPath = $configurationXmlPath)
-{
-	$configInfo =  [xml] (Get-Content "$loadPath")
-	set-variable -name xmlFormatVersion -value "0.3" -option constant
-	if ($configInfo.Configuration.formatVersion -ne $xmlFormatVersion)
-	{
-        	$xmlDoc2 = [xml](Get-Content "$configurationTemplatePath")
-        	$root2 = $XmlDoc2.get_DocumentElement()
-        	$root1 = $configInfo.get_DocumentElement()
-        	unifyNodes $root1 $root2
-
-		$root1.formatVersion = $xmlFormatVersion
-            	$configInfo.save("$loadPath")
-	}
-
-	return $configInfo
-}
-
-function global:SaveConfiguration($configInfo, $savePath = $configurationXmlPath)
-{
-	$configInfo.save("$savePath")
-}
-
-function global:unifyNodes($node1, $node2)
-{
-    $attributes2 = $node2.get_Attributes()
-    if ($attributes2.Count -gt 0)
-    {
-        $attributes1 = $node1.get_Attributes()
-        foreach ($attrib in $attributes2)
-        {
-            $attribname = $attrib.name
-            if (($attributes1.Count -eq 0) -or ($attributes1.GetNamedItem($attribname) -eq $null))
-            {
-                Write-Debug " Adding attribute=$attribname"
-                $addattr = $node1.OwnerDocument.ImportNode($attrib, $true)
-                $added = $attributes1.Append($addattr)
-            }
-        }
-    }
-    if (!$node2.get_HasChildNodes()) {
-        return;
-    }
-    foreach ($child2 in $node2.get_ChildNodes())
-    {
-        $nodename = $child2.get_Name()
-        if ($nodename -eq "#text"){
-            continue
-        }
-        $matchnode = $node1.SelectSingleNode($nodename)
-        if ($matchnode -eq $null)
-        {
-                Write-Debug "Adding node=$nodename"
-                $addnode = $node1.OwnerDocument.ImportNode($child2, $true)
-                $added = $node1.AppendChild($addnode)
-                continue
-        }
-        unifyNodes $matchnode $child2
-    }
-}
-
-Write-Debug "configPath=$configPath"
-$global:LIBPQ_VERSION="9.3"
-$scriptPath = [System.IO.Path]::GetDirectoryName($myInvocation.MyCommand.Definition)
-$global:configurationTemplatePath = "$scriptPath\configuration_template.xml"
-$global:configurationXmlPath = $configPath
-if ($configurationXmlPath -eq "") {
-	$global:configurationXmlPath = "$scriptPath\configuration.xml"
-}
-if (!(Test-Path -path $configurationXmlPath))
-{
-	InitConfiguration
-}
-else
-{
-	GetConfiguration
-}
-Return
diff --git a/winbuild/configuration_template.xml b/winbuild/configuration_template.xml
deleted file mode 100755
index 2d53a89..0000000
--- a/winbuild/configuration_template.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Configuration version="09.03.0300" formatVersion="0.3" vcversion="" toolset="">
-  <title></title>
-  <x86 disabled="no" use_libpq="yes" use_sspi="no" use_gss="no">
-    <libpq version="">
-      <include>default</include>
-      <lib>default</lib>
-      <bin>default</bin>
-    </libpq>
-    <ssl>
-      <include></include>
-      <lib></lib>
-    </ssl>
-    <gss>
-      <include></include>
-      <lib></lib>
-      <bin></bin>
-    </gss>
-    <setvcvars></setvcvars>
-    <build_macros></build_macros>
-  </x86>
-  <x64 use_libpq="yes" use_sspi="yes" use_gss="no">
-    <libpq version="">
-      <include>default</include>
-      <lib>default</lib>
-      <bin>default</bin>
-    </libpq>
-    <ssl>
-      <include></include>
-      <lib></lib>
-    </ssl>
-    <gss>
-      <include></include>
-      <lib></lib>
-      <bin></bin>
-    </gss>
-    <setvcvars></setvcvars>
-    <build_macros></build_macros>
-  </x64>
-  <BuildResult>
-    <Date></Date>
-    <VisualStudioVersion></VisualStudioVersion>
-    <PlatformToolset></PlatformToolset>
-    <ToolsVersion></ToolsVersion>
-    <Platform></Platform>
-  </BuildResult>
-</Configuration>
diff --git a/winbuild/editConfiguration.ps1 b/winbuild/editConfiguration.ps1
deleted file mode 100755
index 4cbc2ab..0000000
--- a/winbuild/editConfiguration.ps1
+++ /dev/null
@@ -1,306 +0,0 @@
-# Powershell needs to run in STA mode to display WPF windows
-Param(
-[string]$configPath
-)
-if ([Threading.Thread]::CurrentThread.GetApartmentState() -eq "MTA"){
-	PowerShell -Sta -File $MyInvocation.MyCommand.Path
-	return
-}
-
-<#
-	Edit the configuration xnl file with WPF
-#>
-
-Add-Type -AssemblyName presentationframework
-
-[xml]$XAML = @'
-<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-        Title="MainWindow" Height="670" Width="539" BorderBrush="Black" Margin="30,0,0,0">
-    <Grid>
-        <StackPanel Height="600" HorizontalAlignment="Left" Margin="42,29,0,0" Name="stackPanel1" VerticalAlignment="Top" Width="431" Opacity="1">
-            <StackPanel Orientation="Horizontal" Height="50">
-                <Label Content="Windows Build Configuration" Height="28" Name="label25" Margin="30,0,0,0" />
-                <Button Content="save" Height="23" Name="buttonSave" Width="75" Margin="30,0,0,0" />
-                <Button Content="end" Height="23" Name="buttonEnd" Width="75" Margin="30,0,0,0" />
-            </StackPanel>
-            <StackPanel Orientation="Horizontal" Height="30" Width="Auto">
-                <Label Content="version" Height="28" Name="labelVersion" HorizontalAlignment="Left" />
-		<TextBox Height="24" Name="versionBox" HorizontalAlignment="Left" Width="100" />
-                <Label Content="vcversion" Height="28" Name="labelVcversion" HorizontalAlignment="Left" />
-		<TextBox Height="24" Name="vcversionBox" HorizontalAlignment="Left" Width="50" />
-                <Label Content="toolset" Height="28" Name="labelToolset" HorizontalAlignment="Left" />
-		<TextBox Height="24" Name="toolsetBox" HorizontalAlignment="Left" Width="50" />
-            </StackPanel>
-            <StackPanel Orientation="Horizontal">
-                <Label Content="x86" Height="26" Name="label1" Width="43" HorizontalContentAlignment="Center" HorizontalAlignment="Left" VerticalAlignment="Top" />
-                <CheckBox Content="libpq" Height="Auto" HorizontalContentAlignment="Center" Name="checkBox1" VerticalContentAlignment="Center" Width="51" BorderBrush="Black" />
-		<TextBox Height="Auto" Name="versionBox1" Width="30" />
-                <CheckBox Content="gss" Height="Auto" HorizontalContentAlignment="Center" Name="checkBox2" VerticalContentAlignment="Center" Width="51" BorderBrush="Black" />
-                <CheckBox Content="sspi" Height="Auto" HorizontalContentAlignment="Center" Name="checkBox3" VerticalContentAlignment="Center" Width="51" BorderBrush="Black" />
-            </StackPanel>
-            <StackPanel Height="78" Name="stackPanel2" Width="Auto" HorizontalAlignment="Right" Orientation="Horizontal">
-                <Label Content="libpq" Height="Auto" HorizontalContentAlignment="Center" Name="label2" VerticalContentAlignment="Center" Width="51" BorderBrush="Black" BorderThickness="1,1,0,0" />
-                <StackPanel Height="Auto" Name="stackPanel3" Width="380">
-                    <StackPanel Height="26" Name="stackPanel4" Width="Auto" Orientation="Horizontal">
-                        <Label Content="include" Height="Auto" Name="label3" Width="56" BorderThickness="1,1,1,0" BorderBrush="Black" />
-                        <TextBox Height="24" Name="textBox1" Width="304" />
-                        <Button Content="..." Height="23" Name="button1" Width="20" />
-                    </StackPanel>
-                    <StackPanel Height="26" Name="stackPanel5" Width="Auto" Orientation="Horizontal">
-                        <Label Content="lib       " Height="Auto" Name="label4" Width="56" BorderBrush="Black" BorderThickness="1,1,1,0" />
-                        <TextBox Height="24" Name="textBox2" Width="304" />
-                        <Button Content="..." Height="23" Name="button2" Width="20" />
-                    </StackPanel>
-                    <StackPanel Height="26" Name="stackPanel6" Width="Auto" Orientation="Horizontal">
-                        <Label Content="bin      " Height="Auto" Name="label5" Width="56" BorderBrush="Black" BorderThickness="1,1,1,0" />
-                        <TextBox Height="25" Name="textBox3" Width="304" />
-                        <Button Content="..." Height="23" Name="button3" Width="20" />
-                    </StackPanel>
-                </StackPanel>
-            </StackPanel>
-            <StackPanel Height="78" Name="stackPanel7" Orientation="Horizontal" Width="Auto">
-                <Label BorderBrush="Black" Content="gss" Height="Auto" HorizontalContentAlignment="Center" Name="label6" VerticalContentAlignment="Center" Width="51" BorderThickness="1,1,0,0" />
-                <StackPanel Height="Auto" Name="stackPanel8" Width="380">
-                    <StackPanel Height="26" Name="stackPanel9" Orientation="Horizontal" Width="Auto">
-                        <Label Content="include" Height="Auto" Name="label7" Width="56" BorderThickness="1,1,1,0" BorderBrush="Black" />
-                        <TextBox Height="24" Name="textBox4" Width="304" />
-                        <Button Content="..." Height="23" Name="button4" Width="20" />
-                    </StackPanel>
-                    <StackPanel Height="26" Name="stackPanel10" Orientation="Horizontal" Width="Auto">
-                        <Label BorderBrush="Black" Content="lib       " Height="Auto" Name="label8" Width="56" BorderThickness="1,1,1,0" />
-                        <TextBox Height="24" Name="textBox5" Width="304" />
-                        <Button Content="..." Height="23" Name="button5" Width="20" />
-                    </StackPanel>
-                    <StackPanel Height="26" Name="stackPanel11" Orientation="Horizontal" Width="Auto">
-                        <Label BorderBrush="Black" Content="bin      " Height="Auto" Name="label9" Width="56" BorderThickness="1,1,1,0" />
-                        <TextBox Height="25" Name="textBox6" Width="304" />
-                        <Button Content="..." Height="23" Name="button6" Width="20" />
-                    </StackPanel>
-                </StackPanel>
-            </StackPanel>
-            <StackPanel Height="52" Name="stackPanel12" Orientation="Horizontal" Width="Auto">
-                <Label BorderBrush="Black" Content="ssl" Height="Auto" HorizontalContentAlignment="Center" Name="label10" VerticalContentAlignment="Center" Width="51" BorderThickness="1,1,0,1" />
-                <StackPanel Height="Auto" Name="stackPanel13" Width="380">
-                    <StackPanel Height="26" Name="stackPanel14" Orientation="Horizontal" Width="Auto">
-                        <Label Content="include" Height="Auto" Name="label11" Width="56" BorderThickness="1,1,1,0" BorderBrush="Black" />
-                        <TextBox Height="24" Name="textBox7" Width="304" />
-                        <Button Content="..." Height="23" Name="button7" Width="20" />
-                    </StackPanel>
-                    <StackPanel Height="26" Name="stackPanel15" Orientation="Horizontal" Width="Auto">
-                        <Label BorderBrush="Black" Content="lib       " Height="Auto" Name="label12" Width="56" BorderThickness="1" />
-                        <TextBox Height="24" Name="textBox8" Width="304" />
-                        <Button Content="..." Height="23" Name="button8" Width="20" />
-                    </StackPanel>
-                 </StackPanel>
-            </StackPanel>
-	    <!-- x86.setvcvars -->
-            <StackPanel Height="26" Name="stackPanel86vcvars" Orientation="Horizontal" Width="Auto">
-                <Label BorderBrush="Black" Content="setvcvars" Height="Auto" HorizontalContentAlignment="Center" Name="label86vcvars" VerticalContentAlignment="Center" Width="107" BorderThickness="1,0,1,1" />
-                <StackPanel Height="Auto" Name="stackPanel86vcvars_1" Orientation="Horizontal" Width="Auto">
-			<TextBox Height="24" Name="textBox86vcvars" Width="304" />
-                        <Button Content="..." Height="23" Name="button86vcvars" Width="20" />
-                 </StackPanel>
-            </StackPanel>
-	    <!-- x64 -->
-            <StackPanel Orientation="Horizontal">
-                <Label Content="x64" Height="26" HorizontalAlignment="Left" HorizontalContentAlignment="Center" Name="label13" VerticalAlignment="Top" Width="43" />
-                <CheckBox BorderBrush="Black" Content="libpq" Height="Auto" HorizontalContentAlignment="Center" Name="checkBox4" VerticalContentAlignment="Center" Width="51" />
-		<TextBox Height="Auto" Name="versionBox2" Width="30" />
-                <CheckBox BorderBrush="Black" Content="gss" Height="Auto" HorizontalContentAlignment="Center" Name="checkBox5" VerticalContentAlignment="Center" Width="51" />
-                <CheckBox BorderBrush="Black" Content="sspi" Height="Auto" HorizontalContentAlignment="Center" Name="checkBox6" VerticalContentAlignment="Center" Width="51" />
-            </StackPanel>
-            <StackPanel Height="78" Name="stackPanel16" Orientation="Horizontal" Width="Auto">
-                <Label BorderBrush="Black" Content="libpq" Height="Auto" HorizontalContentAlignment="Center" Name="label14" VerticalContentAlignment="Center" Width="51" BorderThickness="1,1,0,0" />
-                <StackPanel Height="Auto" Name="stackPanel17" Width="380">
-                    <StackPanel Height="26" Name="stackPanel18" Orientation="Horizontal" Width="Auto">
-                        <Label Content="include" Height="Auto" Name="label15" Width="56" BorderThickness="1,1,1,0" BorderBrush="Black" />
-                        <TextBox Height="24" Name="textBox9" Width="304" />
-                        <Button Content="..." Height="23" Name="button9" Width="20" />
-                    </StackPanel>
-                    <StackPanel Height="26" Name="stackPanel19" Orientation="Horizontal" Width="Auto">
-                        <Label BorderBrush="Black" Content="lib       " Height="Auto" Name="label16" Width="56" BorderThickness="1,1,1,0" />
-                        <TextBox Height="24" Name="textBox10" Width="304" />
-                        <Button Content="..." Height="23" Name="button10" Width="20" />
-                    </StackPanel>
-                    <StackPanel Height="26" Name="stackPanel20" Orientation="Horizontal" Width="Auto">
-                        <Label BorderBrush="Black" Content="bin      " Height="Auto" Name="label17" Width="56" BorderThickness="1,1,1,0" />
-                        <TextBox Height="25" Name="textBox11" Width="304" />
-                        <Button Content="..." Height="23" Name="button11" Width="20" />
-                    </StackPanel>
-                </StackPanel>
-            </StackPanel>
-            <StackPanel Height="78" Name="stackPanel21" Orientation="Horizontal" Width="Auto">
-                <Label BorderBrush="Black" Content="gss" Height="Auto" HorizontalContentAlignment="Center" Name="label18" VerticalContentAlignment="Center" Width="51" BorderThickness="1,1,0,0" />
-                <StackPanel Height="Auto" Name="stackPanel22" Width="380">
-                    <StackPanel Height="26" Name="stackPanel23" Orientation="Horizontal" Width="Auto">
-                        <Label Content="include" Height="Auto" Name="label19" Width="56" BorderThickness="1,1,1,0" BorderBrush="Black" />
-                        <TextBox Height="24" Name="textBox12" Width="304" />
-                        <Button Content="..." Height="23" Name="button12" Width="20" />
-                    </StackPanel>
-                    <StackPanel Height="26" Name="stackPanel24" Orientation="Horizontal" Width="Auto">
-                        <Label BorderBrush="Black" Content="lib       " Height="Auto" Name="label20" Width="56" BorderThickness="1,1,1,0" />
-                        <TextBox Height="24" Name="textBox13" Width="304" />
-                        <Button Content="..." Height="23" Name="button13" Width="20" />
-                    </StackPanel>
-                    <StackPanel Height="26" Name="stackPanel25" Orientation="Horizontal" Width="Auto">
-                        <Label BorderBrush="Black" Content="bin      " Height="Auto" Name="label21" Width="56" BorderThickness="1,1,1,0" />
-                        <TextBox Height="25" Name="textBox14" Width="304" />
-                        <Button Content="..." Height="23" Name="button14" Width="20" />
-                    </StackPanel>
-                </StackPanel>
-            </StackPanel>
-            <StackPanel Height="52" Name="stackPanel26" Orientation="Horizontal" Width="Auto">
-                <Label BorderBrush="Black" Content="ssl" Height="Auto" HorizontalContentAlignment="Center" Name="label22" VerticalContentAlignment="Center" Width="51" BorderThickness="1,1,0,1" />
-                <StackPanel Height="Auto" Name="stackPanel27" Width="380">
-                    <StackPanel Height="26" Name="stackPanel28" Orientation="Horizontal" Width="Auto">
-                        <Label Content="include" Height="Auto" Name="label23" Width="56" BorderThickness="1,1,1,0" BorderBrush="Black" />
-                        <TextBox Height="24" Name="textBox15" Width="304" />
-                        <Button Content="..." Height="23" Name="button15" Width="20" />
-                    </StackPanel>
-                    <StackPanel Height="26" Name="stackPanel29" Orientation="Horizontal" Width="Auto">
-                        <Label BorderBrush="Black" Content="lib       " Height="Auto" Name="label24" Width="56" BorderThickness="1" />
-                        <TextBox Height="24" Name="textBox16" Width="304" />
-                        <Button Content="..." Height="23" Name="button16" Width="20" />
-                    </StackPanel>
-                </StackPanel>
-            </StackPanel>
-	    <!-- x64.setvcvars -->
-            <StackPanel Height="26" Name="stackPanel64vcvars" Orientation="Horizontal" Width="Auto">
-                <Label BorderBrush="Black" Content="setvcvars" Height="Auto" HorizontalContentAlignment="Center" Name="label64vcvars" VerticalContentAlignment="Center" Width="107" BorderThickness="1,0,1,1" />
-                <StackPanel Height="Auto" Name="stackPanel64vcvars_1" Orientation="Horizontal" Width="Auto">
-			<TextBox Height="24" Name="textBox64vcvars" Width="304" />
-                        <Button Content="..." Height="23" Name="button64vcvars" Width="20" />
-                 </StackPanel>
-            </StackPanel>
-
-        </StackPanel>
-    </Grid>
-</Window>
-'@
-
-$reader=(New-Object System.Xml.XmlNodeReader $xaml)
-$window=[Windows.Markup.XamlReader]::Load( $reader )
-
-$buttonEnd = $window.FindName("buttonEnd")
-$buttonEnd_clicked = $buttonEnd.add_Click
-$buttonEnd_clicked.Invoke({
-	$window.close()
-})
-
-$button_click =
-{
-    ($sender, $e) = $this, $_
-    # senderi$thisj
-	[void] [Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms')
-	$d = New-Object Windows.Forms.FolderBrowserDialog
-	if ($d.ShowDialog() -eq "OK") {
-        $lname = $sender.Name.substring(6)
-		$text = $window.FindName("textBox" + $lname)
-		$text.Text = $d.SelectedPath
-    }
-}
-
-for ($i = 1; $i -lt 17; $i++)
-{
-	$button = $window.FindName("button" + $i)
-    $button.add_Click($button_click)
-}
-
-$button_click2 =
-{
-    ($sender, $e) = $this, $_
-    # senderi$thisj
-	[void] [Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms')
-	$d = New-Object Windows.Forms.OpenFileDialog
-	$d.InitialDirectory = $scriptPath
-	if ($d.ShowDialog() -eq "OK") {
-        	$lname = $sender.Name.substring(6)
-		$text = $window.FindName("textBox" + $lname)
-		$text.Text = $d.FileName
-    	}
-}
-
-foreach ($btnname in ("button86vcvars", "button64vcvars"))
-{
-	$button = $window.FindName($btnname)
-	$button.add_Click($button_click2)
-}
-
-$scriptPath = (Split-Path $MyInvocation.MyCommand.Path)
-$configInfo = & "$scriptPath\configuration.ps1" "$configPath"
-
-$window.findName("versionBox").Text = $configInfo.Configuration.version
-$window.findName("vcversionBox").Text = $configInfo.Configuration.vcversion
-$window.findName("toolsetBox").Text = $configInfo.Configuration.toolset
-
-$x86info = $configInfo.Configuration.x86
-$window.findName("checkBox1").isChecked = ($x86info.use_libpq -eq "yes")
-$window.findName("versionBox1").Text = $x86info.libpq.version
-$window.findName("checkBox2").isChecked = ($x86info.use_gss -eq "yes")
-$window.findName("checkBox3").isChecked = ($x86info.use_sspi -eq "yes")
-$window.findName("textBox1").Text = $x86info.libpq.include
-$window.findName("textBox2").Text = $x86info.libpq.lib
-$window.findName("textBox3").Text = $x86info.libpq.bin
-$window.findName("textBox4").Text = $x86info.gss.include
-$window.findName("textBox5").Text = $x86info.gss.lib
-$window.findName("textBox6").Text = $x86info.gss.bin
-$window.findName("textBox7").Text = $x86info.ssl.include
-$window.findName("textBox8").Text = $x86info.ssl.lib
-$window.findName("textBox86vcvars").Text = $x86info.setvcvars
-
-$x64info = $configInfo.Configuration.x64
-
-$window.findName("checkBox4").isChecked = ($x64info.use_libpq -eq "yes")
-$window.findName("versionBox2").Text = $x64info.libpq.version
-$window.findName("checkBox5").isChecked = ($x64info.use_gss -eq "yes")
-$window.findName("checkBox6").isChecked = ($x64info.use_sspi -eq "yes")
-$window.findName("textBox9").Text = $x64info.libpq.include
-$window.findName("textBox10").Text = $x64info.libpq.lib
-$window.findName("textBox11").Text = $x64info.libpq.bin
-$window.findName("textBox12").Text = $x64info.gss.include
-$window.findName("textBox13").Text = $x64info.gss.lib
-$window.findName("textBox14").Text = $x64info.gss.bin
-$window.findName("textBox15").Text = $x64info.ssl.include
-$window.findName("textBox16").Text = $x64info.ssl.lib
-$window.findName("textBox64vcvars").Text = $x64info.setvcvars
-
-$buttonSave = $window.FindName("buttonSave")
-$buttonSave_clicked = $buttonSave.add_Click
-$buttonSave_clicked.Invoke({
-	$configInfo.Configuration.version = $window.findName("versionBox").Text
-	$configInfo.Configuration.vcversion = $window.findName("vcversionBox").Text
-	$configInfo.Configuration.toolset = $window.findName("toolsetBox").Text
-	$x86info.use_libpq = $(if ($window.findName("checkBox1").isChecked) {"yes"} else {"no"})
-	$x86info.libpq.version = $window.findName("versionBox1").Text
-	$x86info.use_gss = $(if ($window.findName("checkBox2").isChecked) {"yes"} else {"no"})
-	$x86info.use_sspi = $(if ($window.findName("checkBox3").isChecked) {"yes"} else {"no"})
-	$x86info.libpq.include = $window.findName("textBox1").Text
-	$x86info.libpq.lib = $window.findName("textBox2").Text
-	$x86info.libpq.bin = $window.findName("textBox3").Text
-	$x86info.gss.include = $window.findName("textBox4").Text
-	$x86info.gss.lib = $window.findName("textBox5").Text
-	$x86info.gss.bin = $window.findName("textBox6").Text
-	$x86info.ssl.include = $window.findName("textBox7").Text
-	$x86info.ssl.lib = $window.findName("textBox8").Text
-	$x86info.setvcvars = $window.findName("textBox86vcvars").Text
-
-
-	$x64info.use_libpq = $(if ($window.findName("checkBox4").isChecked) {"yes"} else {"no"})
-	$x64info.libpq.version = $window.findName("versionBox2").Text
-	$x64info.use_gss = $(if ($window.findName("checkBox5").isChecked) {"yes"} else {"no"})
-	$x64info.use_sspi = $(if ($window.findName("checkBox6").isChecked) {"yes"} else {"no"})
-	$x64info.libpq.include = $window.findName("textBox9").Text
-	$x64info.libpq.lib = $window.findName("textBox10").Text
-	$x64info.libpq.bin = $window.findName("textBox11").Text
-	$x64info.gss.include = $window.findName("textBox12").Text
-	$x64info.gss.lib = $window.findName("textBox13").Text
-	$x64info.gss.bin = $window.findName("textBox14").Text
-	$x64info.ssl.include = $window.findName("textBox15").Text
-	$x64info.ssl.lib = $window.findName("textBox16").Text
-	$x64info.setvcvars = $window.findName("textBox64vcvars").Text
-
-	SaveConfiguration $configInfo
-})
-
-$window.ShowDialog() | out-null
diff --git a/winbuild/pgenlist.vcxproj b/winbuild/pgenlist.vcxproj
index b765365..fb48216 100755
--- a/winbuild/pgenlist.vcxproj
+++ b/winbuild/pgenlist.vcxproj
@@ -1,4 +1,4 @@
-﻿<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
     <ProjectConfiguration Include="Debug|Win32">
@@ -24,199 +24,45 @@
     <RootNamespace>pgenlist</RootNamespace>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <GenerateImportLib>true</GenerateImportLib>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v120_xp</PlatformToolset>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <GenerateImportLib>true</GenerateImportLib>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v120_xp</PlatformToolset>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <GenerateImportLib>true</GenerateImportLib>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v120_xp</PlatformToolset>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <GenerateImportLib>true</GenerateImportLib>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v120_xp</PlatformToolset>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
+
+  <Import Project="psqlodbc.common.props" />
+  <Import Project="psqlodbc.Cpp.props" />
+
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <ImportGroup Label="ExtensionSettings">
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+  <ImportGroup Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   </ImportGroup>
-  <PropertyGroup Label="UserMacros" >
-	<ANSI_VERSION>no</ANSI_VERSION>
-  </PropertyGroup>
-
-  <PropertyGroup Condition="'$(ANSI_VERSION)'=='yes'">
-    <TargetName>pgenlista</TargetName>
-    <TargetType>ANSI</TargetType>
-    <DriverName>psqlodbc30a</DriverName>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(ANSI_VERSION)'!='yes'">
-    <TargetName>pgenlist</TargetName>
-    <TargetType>Unicode</TargetType>
-    <DriverName>psqlodbc35w</DriverName>
-  </PropertyGroup>
-
-  <PropertyGroup Condition="'$(Platform)'=='Win32'">
-    <TARGET_CPU>x86</TARGET_CPU>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Platform)'!='Win32'">
-    <TARGET_CPU>x64</TARGET_CPU>
-  </PropertyGroup>
 
   <PropertyGroup>
-    <IntDir>$(srcPath)$(TARGET_CPU)_$(TargetType)_$(Configuration)\pgenlist\</IntDir>
-    <OutDir>$(srcPath)$(TARGET_CPU)_$(TargetType)_$(Configuration)\</OutDir>
+    <!-- Override IntDir, originally set in psqlodbc.Cpp.props -->
+    <IntDir>$(IntDir)\pgenlist\</IntDir>
   </PropertyGroup>
 
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <LinkIncremental>true</LinkIncremental>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <LinkIncremental>true</LinkIncremental>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <LinkIncremental>false</LinkIncremental>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <LinkIncremental>false</LinkIncremental>
+  <PropertyGroup>
+    <!-- The Link step uses this to determine the name of the output DLL file -->
+    <TargetName>$(DTCDLL)</TargetName>
   </PropertyGroup>
 
-  <Import Project="psqlodbc.Cpp.props" />
+  <Target Name="BuildImportLib">
+   <MakeDir Directories="$(OutDir)"/>
+   <Exec command='lib /def:$(srcPath)$(DTCDLL).def /machine:$(TARGET_CPU) /out:"$(OutDir)$(DTCDLL).lib"' />
+  </Target>
 
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <ClCompile>
-      <PreprocessorDefinitions>_HANDLE_ENLIST_IN_DTC_;_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;_USRDLL;PGENLIST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
-    <ImpLib Condition="'$(GenerateImportLib)'=='true'">
-      <TargetMachine>MachineX86</TargetMachine>
-      <ModuleDefinitionFile>$(srcPath)$(targetName).def</ModuleDefinitionFile>
-      <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
-    </ImpLib>
-    <Link>
-      <DelayLoadDLLs>XOLEHLP.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
-      <AdditionalDependencies>xolehlp.lib;$(Drivername).lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-    </Link>
-    <CustomBuildStep>
-      <Command>
-      </Command>
-    </CustomBuildStep>
-    <PreLinkEvent>
-      <Command>
-      </Command>
-    </PreLinkEvent>
-    <PostBuildEvent>
-      <Command>
-      </Command>
-    </PostBuildEvent>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <ClCompile>
-      <PreprocessorDefinitions>_HANDLE_ENLIST_IN_DTC_;_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;_USRDLL;PGENLIST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
-    <ImpLib Condition="'$(GenerateImportLib)'=='true'">
-      <TargetMachine>MachineX64</TargetMachine>
-      <ModuleDefinitionFile>$(srcPath)$(targetName).def</ModuleDefinitionFile>
-      <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
-    </ImpLib>
-    <Link>
-      <DelayLoadDLLs>XOLEHLP.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
-      <AdditionalDependencies>xolehlp.lib;$(Drivername).lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-    </Link>
-    <CustomBuildStep>
-      <Command>
-      </Command>
-    </CustomBuildStep>
-    <PreLinkEvent>
-      <Command>
-      </Command>
-    </PreLinkEvent>
-    <PostBuildEvent>
-      <Command>
-      </Command>
-    </PostBuildEvent>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <ClCompile>
-      <PreprocessorDefinitions>_HANDLE_ENLIST_IN_DTC_;_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;_USRDLL;PGENLIST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
-    <ImpLib Condition="'$(GenerateImportLib)'=='true'">
-      <TargetMachine>MachineX86</TargetMachine>
-      <ModuleDefinitionFile>$(srcPath)$(targetName).def</ModuleDefinitionFile>
-      <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
-    </ImpLib>
-    <Link>
-      <DelayLoadDLLs>XOLEHLP.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
-      <AdditionalDependencies>xolehlp.lib;$(DriverName).lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-    </Link>
-    <PreLinkEvent>
-      <Command>
-      </Command>
-    </PreLinkEvent>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <ClCompile>
-      <PreprocessorDefinitions>_HANDLE_ENLIST_IN_DTC_;_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;_USRDLL;PGENLIST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
-    <ImpLib Condition="'$(GenerateImportLib)'=='true'">
-      <TargetMachine>MachineX64</TargetMachine>
-      <ModuleDefinitionFile>$(srcPath)$(targetName).def</ModuleDefinitionFile>
-      <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
-    </ImpLib>
+  <ItemDefinitionGroup>
     <Link>
+      <ModuleDefinitionFile>$(srcPath)$(DTCDLL).def</ModuleDefinitionFile>
+
       <DelayLoadDLLs>XOLEHLP.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
-      <AdditionalDependencies>xolehlp.lib;$(Drivername).lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>xolehlp.lib;$(MAINDLL).lib;%(AdditionalDependencies)</AdditionalDependencies>
       <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
     </Link>
-    <PreLinkEvent>
-      <Command>
-      </Command>
-    </PreLinkEvent>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(GenerateImportLib)'=='true'">
-    <Link>
-      <ModuleDefinitionFile></ModuleDefinitionFile>
-      <AdditionalDependencies>$(TargetName).exp;%(AdditionalDependencies)</AdditionalDependencies>
-    </Link>
   </ItemDefinitionGroup>
-  <ItemGroup>
-    <Text Include="ReadMe.txt" />
-  </ItemGroup>
+
   <ItemGroup>
     <ClCompile Include="$(srcPath)msdtc_enlist.cpp" />
     <ClCompile Include="$(srcPath)xalibname.c" />
   </ItemGroup>
+
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-  <ImportGroup Label="ExtensionTargets">
-  </ImportGroup>
+
 </Project>
diff --git a/winbuild/pgxalib.vcxproj b/winbuild/pgxalib.vcxproj
index c6f824e..1f3c588 100755
--- a/winbuild/pgxalib.vcxproj
+++ b/winbuild/pgxalib.vcxproj
@@ -18,163 +18,36 @@
       <Platform>x64</Platform>
     </ProjectConfiguration>
   </ItemGroup>
+
   <PropertyGroup Label="Globals">
     <ProjectGuid>{27D21217-BD79-4A0A-80C4-EE87C57D423F}</ProjectGuid>
     <Keyword>Win32Proj</Keyword>
     <RootNamespace>pgxalib</RootNamespace>
   </PropertyGroup>
+
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v120_xp</PlatformToolset>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v120_xp</PlatformToolset>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v120_xp</PlatformToolset>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v120_xp</PlatformToolset>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
+
+  <Import Project="psqlodbc.common.props" />
+  <Import Project="psqlodbc.Cpp.props" />
+
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <ImportGroup Label="ExtensionSettings">
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+  <ImportGroup Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <PropertyGroup>
-    <TargetName>pgxalib</TargetName>
-  </PropertyGroup>
-
-  <PropertyGroup Condition="'$(ANSI_VERSION)'=='yes'">
-    <TargetType>ANSI</TargetType>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(ANSI_VERSION)'!='yes'">
-    <TargetType>Unicode</TargetType>
-  </PropertyGroup>
-
-  <PropertyGroup Condition="'$(Platform)'=='Win32'">
-    <TARGET_CPU>x86</TARGET_CPU>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Platform)'!='Win32'">
-    <TARGET_CPU>x64</TARGET_CPU>
-  </PropertyGroup>
 
   <PropertyGroup>
-    <IntDir>$(srcPath)$(TARGET_CPU)_$(TargetType)_$(Configuration)\</IntDir>
-    <OutDir>$(srcPath)$(TARGET_CPU)_$(TargetType)_$(Configuration)\</OutDir>
-  </PropertyGroup>
-
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <LinkIncremental>true</LinkIncremental>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <LinkIncremental>true</LinkIncremental>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <LinkIncremental>false</LinkIncremental>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <LinkIncremental>false</LinkIncremental>
+    <TargetName>pgxalib</TargetName>
   </PropertyGroup>
 
-  <Import Project="psqlodbc.Cpp.props" />
-
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <ClCompile>
-      <PreprocessorDefinitions>_HANDLE_ENLIST_IN_DTC_;_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;_USRDLL;PGENLIST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
-    <Link>
-      <AdditionalDependencies>wsock32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
-    </Link>
-    <CustomBuildStep>
-      <Command>
-      </Command>
-    </CustomBuildStep>
-    <PreLinkEvent>
-      <Command>
-      </Command>
-    </PreLinkEvent>
-    <PostBuildEvent>
-      <Command>
-      </Command>
-    </PostBuildEvent>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <ClCompile>
-      <PreprocessorDefinitions>_HANDLE_ENLIST_IN_DTC_;_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;_USRDLL;PGENLIST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
+  <ItemDefinitionGroup>
     <Link>
       <AdditionalDependencies>wsock32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
     </Link>
-    <CustomBuildStep>
-      <Command>
-      </Command>
-    </CustomBuildStep>
-    <PreLinkEvent>
-      <Command>
-      </Command>
-    </PreLinkEvent>
-    <PostBuildEvent>
-      <Command>
-      </Command>
-    </PostBuildEvent>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <ClCompile>
-      <PreprocessorDefinitions>_HANDLE_ENLIST_IN_DTC_;_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;_USRDLL;PGENLIST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
-    <Link>
-      <AdditionalDependencies>wsock32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
-    </Link>
-    <PreLinkEvent>
-      <Command>
-      </Command>
-    </PreLinkEvent>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <ClCompile>
-      <PreprocessorDefinitions>_HANDLE_ENLIST_IN_DTC_;_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;_USRDLL;PGENLIST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
-    <Link>
-      <AdditionalDependencies>wsock32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
-    </Link>
-    <PreLinkEvent>
-      <Command>
-      </Command>
-    </PreLinkEvent>
-  </ItemDefinitionGroup>
-  <ItemGroup>
-    <Text Include="ReadMe.txt" />
-  </ItemGroup>
+
   <ItemGroup>
     <ClCompile Include="$(srcPath)pgxalib.cpp" />
     <ClCompile Include="$(srcPath)xalibname.c" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-  <ImportGroup Label="ExtensionTargets">
-  </ImportGroup>
 </Project>
diff --git a/winbuild/platformbuild.vcxproj b/winbuild/platformbuild.vcxproj
deleted file mode 100755
index c2ad3c0..0000000
--- a/winbuild/platformbuild.vcxproj
+++ /dev/null
@@ -1,87 +0,0 @@
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-    <PropertyGroup>
-	<Configuration>Release</Configuration>
-	<srcPath>..\</srcPath>
-    </PropertyGroup>
-    <ItemGroup>
-        <ProjectToBuild Include="psqlodbc.vcxproj">
-        </ProjectToBuild>
-        <ProjectToBuild Include="pgenlist.vcxproj">
-        </ProjectToBuild>
-        <ProjectToBuild Include="psqlodbc.vcxproj">
-	  <AdditionalProperties>ANSI_VERSION=yes
-	  </AdditionalProperties>
-        </ProjectToBuild>
-        <ProjectToBuild Include="pgenlist.vcxproj">
-	  <AdditionalProperties>ANSI_VERSION=yes
-	  </AdditionalProperties>
-        </ProjectToBuild>
-        <ProjectToBuild Include="pgxalib.vcxproj">
-        </ProjectToBuild>
-    </ItemGroup>
-    <Target Name="Build">
-        <MSBuild Projects="pgenlist.vcxproj" 
-	  Targets="BuildCompile"
-	  Properties="Configuration=$(Configuration);srcPath=$(srcPath);BuildStep=Lib"/>
-        <MSBuild Projects="psqlodbc.vcxproj" 
-	  Targets="Build"
-	  Properties="Configuration=$(Configuration);srcPath=$(srcPath)"/>
-        <MSBuild Projects="pgenlist.vcxproj" 
-	  Targets="Build"
-	  Properties="Configuration=$(Configuration);srcPath=$(srcPath);BuildStep=Link"/>
-
-        <MSBuild Projects="pgenlist.vcxproj" 
-	  Targets="BuildCompile"
-	  Properties="ANSI_VERSION=yes;Configuration=$(Configuration);srcPath=$(srcPath);BuildStep=Lib"/>
-        <MSBuild Projects="psqlodbc.vcxproj" 
-	  Targets="Build"
-	  Properties="ANSI_VERSION=yes;Configuration=$(Configuration);srcPath=$(srcPath)"/>
-        <MSBuild Projects="pgenlist.vcxproj" 
-	  Targets="Build"
-	  Properties="ANSI_VERSION=yes;Configuration=$(Configuration);srcPath=$(srcPath);BuildStep=Link"/>
-        <MSBuild Projects="pgxalib.vcxproj" 
-	  Targets="Build"
-	  Properties="Configuration=$(Configuration);srcPath=$(srcPath)"/>
-        <!-- MSBuild Projects="@(ProjectToBuild)" 
-	  Targets="Build"
-	  Properties="Configuration=$(Configuration);srcPath=$(srcPath)"/ -->
-    </Target>
-    <Target Name="Rebuild">
-        <MSBuild Projects="pgenlist.vcxproj" 
-	  Targets="Clean;BuildCompile"
-	  Properties="Configuration=$(Configuration);srcPath=$(srcPath);ImpLibForward=true"/>
-        <MSBuild Projects="psqlodbc.vcxproj" 
-	  Targets="ReBuild"
-	  Properties="Configuration=$(Configuration);srcPath=$(srcPath)"/>
-        <MSBuild Projects="pgenlist.vcxproj" 
-	  Targets="Build"
-	  Properties="Configuration=$(Configuration);srcPath=$(srcPath)"/>
-
-        <MSBuild Projects="pgenlist.vcxproj" 
-	  Targets="Clean;BuildCompile"
-	  Properties="ANSI_VERSION=yes;Configuration=$(Configuration);srcPath=$(srcPath);ImpLibForward=true"/>
-        <MSBuild Projects="psqlodbc.vcxproj" 
-	  Targets="ReBuild"
-	  Properties="ANSI_VERSION=yes;Configuration=$(Configuration);srcPath=$(srcPath)"/>
-        <MSBuild Projects="pgenlist.vcxproj" 
-	  Targets="Build"
-	  Properties="ANSI_VERSION=yes;Configuration=$(Configuration);srcPath=$(srcPath)"/>
-        <MSBuild Projects="pgxalib.vcxproj" 
-	  Targets="ReBuild"
-	  Properties="Configuration=$(Configuration);srcPath=$(srcPath)"/>
-
-        <!-- MSBuild Projects="@(ProjectToBuild)"
-	  Targets="Rebuild" 
-	  Properties="Configuration=$(Configuration);srcPath=$(srcPath)"/ -->
-    </Target>
-    <Target Name="Clean">
-        <MSBuild Projects="@(ProjectToBuild)"
-	  Targets="Clean" 
-	  Properties="Configuration=$(Configuration);srcPath=$(srcPath)"/>
-    </Target>
-    <Target Name="Info">
-        <MSBuild Projects="@(ProjectToBuild)"
-	  Targets="Info" 
-	  Properties="Configuration=$(Configuration);srcPath=$(srcPath)"/>
-    </Target>
-</Project>
diff --git a/winbuild/psqlodbc.Cpp.props b/winbuild/psqlodbc.Cpp.props
index 7edcfd7..73f6fbb 100644
--- a/winbuild/psqlodbc.Cpp.props
+++ b/winbuild/psqlodbc.Cpp.props
@@ -2,90 +2,135 @@
 ***********************************************************************************************
 psqlodbc.Cpp.props
 
+Set properties common for all C/C++ projects.
+
 ***********************************************************************************************
 -->
-
 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <!--		-->
   <Import Project="pguser.Cpp.props" />
-  <PropertyGroup Condition="'$(Platform)'=='Win32'">
-      <WarningLevel>Level3</WarningLevel>
-      <DisableSpecificWarnings>4018</DisableSpecificWarnings>
+
+  <!-- Build Unicode version by default -->
+  <PropertyGroup Condition="'$(ANSI_VERSION)'==''">
+    <ANSI_VERSION>false</ANSI_VERSION>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Platform)'=='x64'">
-      <WarningLevel>Level3</WarningLevel>
-      <DisableSpecificWarnings>4018</DisableSpecificWarnings>
+
+  <PropertyGroup Condition="$(ANSI_VERSION)">
+    <TargetType>ANSI</TargetType>
+  </PropertyGroup>
+  <PropertyGroup Condition="!$(ANSI_VERSION)">
+    <TargetType>Unicode</TargetType>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <IntDir>$(srcPath)$(TARGET_CPU)_$(TargetType)_$(Configuration)\</IntDir>
+    <OutDir>$(srcPath)$(TARGET_CPU)_$(TargetType)_$(Configuration)\</OutDir>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(Configuration)'=='Debug'">
+    <LinkIncremental>true</LinkIncremental>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)'=='Release'">
+    <LinkIncremental>false</LinkIncremental>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+    <UseDebugLibraries>true</UseDebugLibraries>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+    <UseDebugLibraries>false</UseDebugLibraries>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="$(ANSI_VERSION)">
+    <ODBCVER>0x0350</ODBCVER>
+    <DBMS_NAME>PostgreSQL ANSI</DBMS_NAME>
   </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+  <PropertyGroup Condition="!$(ANSI_VERSION)">
+    <ODBCVER>0x0351</ODBCVER>
+    <DBMS_NAME>PostgreSQL Unicode</DBMS_NAME>
+  </PropertyGroup>
+
+  <!-- Append (x64) suffix to the 64-bit driver's name -->
+  <PropertyGroup Condition="'$(Platform)'=='x64'" >
+    <DBMS_NAME>$(DBMS_NAME)(x64)</DBMS_NAME>
+  </PropertyGroup>
+
+  <ItemDefinitionGroup Condition="!$(ANSI_VERSION)" >
     <ClCompile>
-      <PrecompiledHeader>NotUsing</PrecompiledHeader>
-      <WarningLevel>$(WarningLevel)</WarningLevel>
-      <Optimization>Disabled</Optimization>
-      <SDLCheck>true</SDLCheck>
-      <PrecompiledHeaderFile />
-      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
+      <PreprocessorDefinitions>UNICODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <Link>
-      <SubSystem>Windows</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <ModuleDefinitionFile>$(srcPath)$(TargetName).def</ModuleDefinitionFile>
-      <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
-    </Link>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+
+  <PropertyGroup Condition="$(ANSI_VERSION)">
+    <MAINDLL>psqlodbc30a</MAINDLL>
+    <MAINDEF>$(srcPath)psqlodbca.def</MAINDEF>
+    <DTCDLL>pgenlista</DTCDLL>
+  </PropertyGroup>
+  <PropertyGroup Condition="!$(ANSI_VERSION)">
+    <MAINDLL>psqlodbc35w</MAINDLL>
+    <MAINDEF>$(srcPath)psqlodbc.def</MAINDEF>
+    <DTCDLL>pgenlist</DTCDLL>
+  </PropertyGroup>
+
+  <!-- MEMORY_DEBUG -->
+  <ItemDefinitionGroup Condition="$(MEMORY_DEBUG)" >
     <ClCompile>
-      <PrecompiledHeader>NotUsing</PrecompiledHeader>
-      <WarningLevel>$(WarningLevel)</WarningLevel>
-      <Optimization>Disabled</Optimization>
-      <SDLCheck>true</SDLCheck>
-      <PrecompiledHeaderFile />
-      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
+      <PreprocessorDefinitions>_MEMORY_DEBUG_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <Link>
-      <SubSystem>Windows</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <ModuleDefinitionFile>$(srcPath)$(TargetName).def</ModuleDefinitionFile>
-      <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
-    </Link>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+
+  <ItemDefinitionGroup>
+    <ClCompile>
+      <PreprocessorDefinitions>ODBCVER=$(ODBCVER);DBMS_NAME="$(DBMS_NAME)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemDefinitionGroup>
+
+  <ItemDefinitionGroup>
+    <!-- Set general compiler options -->
     <ClCompile>
-      <WarningLevel>$(WarningLevel)</WarningLevel>
       <PrecompiledHeader>NotUsing</PrecompiledHeader>
-      <Optimization>MaxSpeed</Optimization>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <WarningLevel>Level3</WarningLevel>
       <SDLCheck>true</SDLCheck>
       <PrecompiledHeaderFile />
-      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
+      <!-- Disable warnings about signed/unsigned mismatch in comparisons -->
+      <DisableSpecificWarnings>4018</DisableSpecificWarnings>
+      <!-- _CRT_SECURE_NO_DEPRECATE to disable warning about using sprintf -->
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;DYNAMIC_LOAD;WIN_MULTITHREAD_SUPPORT;WIN32;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <OptimizeReferences>true</OptimizeReferences>
       <ModuleDefinitionFile>$(srcPath)$(TargetName).def</ModuleDefinitionFile>
       <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
     </Link>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+
+  <ItemDefinitionGroup Condition="$(MSDTC)">
+    <ClCompile>
+      <PreprocessorDefinitions>_HANDLE_ENLIST_IN_DTC_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemDefinitionGroup>
+
+  <ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemDefinitionGroup>
+
+  <ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
     <ClCompile>
-      <WarningLevel>$(WarningLevel)</WarningLevel>
-      <PrecompiledHeader>NotUsing</PrecompiledHeader>
       <Optimization>MaxSpeed</Optimization>
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <SDLCheck>true</SDLCheck>
-      <PrecompiledHeaderFile />
-      <DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
     </ClCompile>
     <Link>
-      <SubSystem>Windows</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
-      <ModuleDefinitionFile>$(srcPath)$(TargetName).def</ModuleDefinitionFile>
-      <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
     </Link>
   </ItemDefinitionGroup>
 </Project>
diff --git a/winbuild/psqlodbc.common.props b/winbuild/psqlodbc.common.props
new file mode 100644
index 0000000..81f7176
--- /dev/null
+++ b/winbuild/psqlodbc.common.props
@@ -0,0 +1,49 @@
+<!--
+***********************************************************************************************
+psqlodbc.common.props
+
+Set properties common for all projects, including the installer.
+
+***********************************************************************************************
+-->
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+  <PropertyGroup>
+    <srcPath>..\</srcPath>
+  </PropertyGroup>
+
+  <!-- Deduce Platform from the TARGET_CPU variable. TARGET_CPU is set
+       by "setenv /x86" and "setenv /x64", or passed down from the top
+       project file -->
+  <PropertyGroup Condition="'$(TARGET_CPU)'=='x86'">
+    <Platform>Win32</Platform>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(TARGET_CPU)'=='x64'">
+    <Platform>x64</Platform>
+  </PropertyGroup>
+
+  <!-- Load config options -->
+  <Import Project="configuration-defaults.props" />
+  <Import Project="configuration-local.props" Condition="exists('configuration-local.props')"/>
+
+  <!--
+    Extract POSTGRESDRIVERVERSION and PG_DRVFILE_VERSION defines from
+    version.h into MSBuild properties. Note that this is a Target - the
+    properies won't be available until the Target has been run.
+   -->
+  <Target Name="DetermineVersion" BeforeTargets="Build">
+
+    <ReadLinesFromFile File="..\version.h">
+      <Output TaskParameter="Lines" PropertyName="version_h_lines" />
+    </ReadLinesFromFile>
+
+    <PropertyGroup>
+      <POSTGRESDRIVERVERSION>$([System.Text.RegularExpressions.Regex]::Match($(version_h_lines), `#define\s+POSTGRESDRIVERVERSION\s+"(.+?)"`).get_Groups().get_Item(1))</POSTGRESDRIVERVERSION>
+      <PG_DRVFILE_VERSION>$([System.Text.RegularExpressions.Regex]::Match($(version_h_lines), `#define\s+PG_DRVFILE_VERSION\s+(\S+?);`).get_Groups().get_Item(1))</PG_DRVFILE_VERSION>
+    </PropertyGroup>
+
+    <Message Text='Extracted POSTGRESDRIVERVERSION from version.h: $(POSTGRESDRIVERVERSION)' />
+    <Message Text='Extracted PG_DRVFILE_VERSION from version.h: $(PG_DRVFILE_VERSION)' />
+  </Target>
+
+</Project>
diff --git a/winbuild/psqlodbc.vcxproj b/winbuild/psqlodbc.vcxproj
index 9f3e7e6..e43698a 100755
--- a/winbuild/psqlodbc.vcxproj
+++ b/winbuild/psqlodbc.vcxproj
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
   <ItemGroup Label="ProjectConfigurations">
     <ProjectConfiguration Include="Debug|Win32">
       <Configuration>Debug</Configuration>
@@ -18,250 +19,87 @@
       <Platform>x64</Platform>
     </ProjectConfiguration>
   </ItemGroup>
+
   <PropertyGroup Label="Globals">
     <ProjectGuid>{79F872B5-9FAF-43DF-B441-9C860EAE52CF}</ProjectGuid>
     <Keyword>Win32Proj</Keyword>
     <RootNamespace>psqlodbc</RootNamespace>
     <ProjectName>psqlodbc</ProjectName>
   </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v120_xp</PlatformToolset>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v120_xp</PlatformToolset>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v120_xp</PlatformToolset>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v120_xp</PlatformToolset>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <ImportGroup Label="ExtensionSettings">
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <!--			-->
-  <PropertyGroup Label="UserMacros" >
-    <ANSI_VERSION>no</ANSI_VERSION>
-    <!-- 		-->
-    <PG_INC></PG_INC>
-    <SSL_INC></SSL_INC>
-    <GSS_INC></GSS_INC>
-    <PG_LIB></PG_LIB>
-    <SSL_LIB></SSL_LIB>
-    <GSS_LIB></GSS_LIB>
-    <!-- 		-->
-    <MSDTC>yes</MSDTC>
-    <USE_LIBPQ>yes</USE_LIBPQ>
-    <USE_GSS>no</USE_GSS>
-    <USE_SSPI>yes</USE_SSPI>
-    <MEMORY_DEBUG>no</MEMORY_DEBUG>
-    <!-- work properties -->
-    <ADD_DEFINES></ADD_DEFINES>
-    <ADD_INC></ADD_INC>
-    <ADD_LIBPATH></ADD_LIBPATH>
-    <RSC_DEFINES></RSC_DEFINES>
-    <DELAY_LOAD_DLLS></DELAY_LOAD_DLLS>
-  </PropertyGroup>
-  <!-- USE_LIBPQ -->
-  <PropertyGroup Condition="'$(USE_LIBPQ)'!='no'" >
-    <ADD_INC>$(ADD_INC);$(PG_INC);$(SSL_INC)</ADD_INC>
-    <ADD_LIBPATH>$(ADD_LIBPATH);$(PG_LIB);$(SSL_LIB)</ADD_LIBPATH>
-    <ADD_DEFINES>$(ADD_DEFINES);USE_LIBPQ;USE_SSL;RESET_CRYPTO_CALLBACKS</ADD_DEFINES>
-    <DELAY_LOAD_DLLS>libpq.dll;ssleay32.dll;libeay32.dll</DELAY_LOAD_DLLS>
-  </PropertyGroup>
-  <!-- USE_GSS -->
-  <PropertyGroup Condition="'$(USE_GSS)|$(Platform)'=='yes|Win32'" >
-    <ADD_INC>$(ADD_INC);$(GSS_INC)</ADD_INC>
-    <ADD_LIBPATH>$(ADD_LIBPATH);$(GSS_LIB)</ADD_LIBPATH>
-    <ADD_DEFINES>$(ADD_DEFINES);USE_GSS</ADD_DEFINES>
-    <DELAY_LOAD_DLLS>$(DELAY_LOAD_DLLS);gssapi32.dll</DELAY_LOAD_DLLS>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(USE_GSS)|$(Platform)'=='yes|x64'" >
-    <ADD_INC>$(ADD_INC);$(GSS_INC)</ADD_INC>
-    <ADD_LIBPATH>$(ADD_LIBPATH);$(GSS_LIB)</ADD_LIBPATH>
-    <ADD_DEFINES>$(ADD_DEFINES);USE_GSS</ADD_DEFINES>
-    <DELAY_LOAD_DLLS>$(DELAY_LOAD_DLLS);gssapi64.dll</DELAY_LOAD_DLLS>
-  </PropertyGroup>
-  <!-- USE_SSPI -->
-  <PropertyGroup Condition="'$(USE_SSPI)'=='yes'" >
-    <ADD_DEFINES>$(ADD_DEFINES);USE_SSPI</ADD_DEFINES>
-    <DELAY_LOAD_DLLS>$(DELAY_LOAD_DLLS);secur32.dll;crypt32.dll</DELAY_LOAD_DLLS>
-  </PropertyGroup>
-
-  <PropertyGroup Condition="'$(ANSI_VERSION)'=='yes'">
-    <TargetName>psqlodbc30a</TargetName>
-    <TargetType>ANSI</TargetType>
-    <MAINDEF>$(srcPath)psqlodbca.def</MAINDEF>
-    <DTCDLL>pgenlista</DTCDLL>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(ANSI_VERSION)'!='yes'">
-    <TargetName>psqlodbc35w</TargetName>
-    <TargetType>Unicode</TargetType>
-    <MAINDEF>$(srcPath)psqlodbc.def</MAINDEF>
-    <DTCDLL>pgenlist</DTCDLL>
-  </PropertyGroup>
-
-  <PropertyGroup Condition="'$(Platform)'=='Win32'">
-    <TARGET_CPU>x86</TARGET_CPU>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Platform)'!='Win32'">
-    <TARGET_CPU>x64</TARGET_CPU>
-  </PropertyGroup>
 
-  <PropertyGroup>
-    <IntDir>$(srcPath)$(TARGET_CPU)_$(TargetType)_$(Configuration)\</IntDir>
-    <OutDir>$(srcPath)$(TARGET_CPU)_$(TargetType)_$(Configuration)\</OutDir>
-  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.default.props" />
 
-  <PropertyGroup Condition="'$(ANSI_VERSION)|$(Platform)'=='yes|Win32'" >
-    <ADD_DEFINES>$(ADD_DEFINES);ODBCVER=0x0350;DBMS_NAME="PostgreSQL ANSI"</ADD_DEFINES>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(ANSI_VERSION)|$(Platform)'=='yes|x64'" >
-    <ADD_DEFINES>$(ADD_DEFINES);ODBCVER=0x0350;DBMS_NAME="PostgreSQL ANSI(x64)"</ADD_DEFINES>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(ANSI_VERSION)|$(Platform)'=='no|Win32'" >
-    <ADD_DEFINES>$(ADD_DEFINES);UNICODE_SUPPORT;ODBCVER=0x0351</ADD_DEFINES>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(ANSI_VERSION)|$(Platform)'=='no|x64'" >
-    <ADD_DEFINES>$(ADD_DEFINES);UNICODE_SUPPORT;ODBCVER=0x0351;DBMS_NAME="PostgreSQL Unicode(x64)"</ADD_DEFINES>
-    <RSC_DEFINES>$(RSC_DEFINES);UNICODE_SUPPORT</RSC_DEFINES>
-  </PropertyGroup>
+  <Import Project="psqlodbc.common.props" />
+  <Import Project="psqlodbc.Cpp.props" />
 
-  <PropertyGroup Condition="'$(MSDTC)'=='yes'">
-    <ADD_DEFINES>$(ADD_DEFINES);_HANDLE_ENLIST_IN_DTC_</ADD_DEFINES>
-    <DELAY_LOAD_DLLS>$(DELAY_LOAD_DLLS);$(DTCDLL).dll</DELAY_LOAD_DLLS>
-  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
 
   <PropertyGroup>
-    <PreBuildEventUseInBuild>false</PreBuildEventUseInBuild>
-  </PropertyGroup>
-  <!-- MEMORY_DEBUG -->
-  <PropertyGroup Condition="'$(MEMORY_DEBUG)'=='yes'" >
-    <ADD_DEFINES>$(ADD_DEFINES);_MEMORY_DEBUG_</ADD_DEFINES>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(DRIVERVERSION)'!=''" >
-    <ADD_DEFINES>$(ADD_DEFINES);POSTGRESDRIVERVERSION="$(DRIVERVERSION)"</ADD_DEFINES>
-    <RSC_DEFINES>$(RSC_DEFINES);PG_DRVFILE_VERSION=$(DRIVERVERSION.substring(0, 2)),$(DRIVERVERSION.substring(3,2)),$(DRIVERVERSION.substring(6, 2)),$(DRIVERVERSION.substring(8, 2));POSTGRES_RESOURCE_VERSION=\"$(DRIVERVERSION)\"</RSC_DEFINES>
+    <!-- The Link step uses this to determine the name of the output DLL file -->
+    <TargetName>$(MAINDLL)</TargetName>
   </PropertyGroup>
 
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <LinkIncremental>true</LinkIncremental>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <LinkIncremental>true</LinkIncremental>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <LinkIncremental>false</LinkIncremental>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <LinkIncremental>false</LinkIncremental>
-  </PropertyGroup>
-
-  <Import Project="psqlodbc.Cpp.props" />
-
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+  <!-- USE_LIBPQ -->
+  <ItemDefinitionGroup Condition="$(USE_LIBPQ)" >
     <ClCompile>
-      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;$(ADD_DEFINES);DYNAMIC_LOAD;WIN_MULTITHREAD_SUPPORT;WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>$(ADD_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>USE_LIBPQ;USE_SSL;RESET_CRYPTO_CALLBACKS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>$(PG_INC);$(SSL_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     </ClCompile>
-    <ResourceCompile>
-      <PreprocessorDefinitions>$(RSC_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ResourceCompile>
     <Link>
-      <DelayLoadDLLs>$(DELAY_LOAD_DLLS);%(DelayLoadDLLs)</DelayLoadDLLs>
-      <AdditionalLibraryDirectories>$(ADD_LIBPATH);$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-      <AdditionalDependencies>advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;wsock32.lib;ws2_32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <ModuleDefinitionFile>$(MAINDEF)</ModuleDefinitionFile>
-      <SupportUnloadOfDelayLoadedDLL>true</SupportUnloadOfDelayLoadedDLL>
+      <AdditionalLibraryDirectories>$(PG_LIB);$(SSL_LIB);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <DelayLoadDLLs>libpq.dll;ssleay32.dll;libeay32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
     </Link>
-    <PreBuildEvent>
-      <Command>lib /def:$(srcPath)$(DTCDLL).def /machine:x86 /out:"$(outDir)\$(DTCLDLL).lib"</Command>
-    </PreBuildEvent>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+
+  <!-- USE_GSS -->
+  <ItemDefinitionGroup Condition="$(USE_GSS)">
     <ClCompile>
-      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;$(ADD_DEFINES);DYNAMIC_LOAD;WIN_MULTITHREAD_SUPPORT;WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>$(ADD_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>USE_GSS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>$(GSS_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     </ClCompile>
-    <ResourceCompile>
-      <PreprocessorDefinitions>$(RSC_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ResourceCompile>
     <Link>
-      <DelayLoadDLLs>$(DELAY_LOAD_DLLS);%(DelayLoadDLLs)</DelayLoadDLLs>
-      <AdditionalLibraryDirectories>$(ADD_LIBPATH);$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-      <AdditionalDependencies>advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;wsock32.lib;ws2_32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <ModuleDefinitionFile>$(MAINDEF)</ModuleDefinitionFile>
-      <SupportUnloadOfDelayLoadedDLL>true</SupportUnloadOfDelayLoadedDLL>
+      <AdditionalLibraryDirectories>$(GSS_LIB);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <DelayLoadDLLs Condition="'$(Platform)'=='Win32'">gssapi32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+      <DelayLoadDLLs Condition="'$(Platform)'=='x64'">gssapi64.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
     </Link>
-    <PreBuildEvent>
-      <Command>lib /def:$(srcPath)$(DTCDLL).def /machine:x64 /out:"$(outDir)\$(DTCLDLL).lib"</Command>
-    </PreBuildEvent>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+
+  <!-- USE_SSPI -->
+  <ItemDefinitionGroup Condition="$(USE_SSPI)">
     <ClCompile>
-      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;$(ADD_DEFINES);DYNAMIC_LOAD;WIN_MULTITHREAD_SUPPORT;WIN32;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>$(ADD_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>USE_SSPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
-    <ResourceCompile>
-      <PreprocessorDefinitions>$(RSC_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ResourceCompile>
     <Link>
-      <DelayLoadDLLs>$(DELAY_LOAD_DLLS);%(DelayLoadDLLs)</DelayLoadDLLs>
-      <AdditionalLibraryDirectories>$(ADD_LIBPATH);$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-      <AdditionalDependencies>winmm.lib;wsock32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <ModuleDefinitionFile>$(MAINDEF)</ModuleDefinitionFile>
-      <SupportUnloadOfDelayLoadedDLL>true</SupportUnloadOfDelayLoadedDLL>
+      <DelayLoadDLLs>secur32.dll;crypt32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
     </Link>
-    <PreBuildEvent>
-      <Command>lib /def:$(srcPath)$(DTCDLL).def /machine:x86 /out:"$(outDir)\$(DTCDLL).lib"</Command>
-    </PreBuildEvent>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <ClCompile>
-      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;$(ADD_DEFINES);DYNAMIC_LOAD;WIN_MULTITHREAD_SUPPORT;WIN32;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>$(ADD_INC);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-    </ClCompile>
-    <ResourceCompile>
-      <PreprocessorDefinitions>$(RSC_DEFINES);%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ResourceCompile>
+
+  <ItemDefinitionGroup Condition="$(MSDTC)">
+    <Link>
+      <DelayLoadDLLs>$(DTCDLL).dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+    </Link>
+  </ItemDefinitionGroup>
+
+  <ItemDefinitionGroup>
     <Link>
-      <DelayLoadDLLs>$(DELAY_LOAD_DLLS);%(DelayLoadDLLs)</DelayLoadDLLs>
-      <AdditionalLibraryDirectories>$(ADD_LIBPATH);$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-      <AdditionalDependencies>winmm.lib;wsock32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalDependencies>advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;wsock32.lib;ws2_32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <ModuleDefinitionFile>$(MAINDEF)</ModuleDefinitionFile>
       <SupportUnloadOfDelayLoadedDLL>true</SupportUnloadOfDelayLoadedDLL>
     </Link>
-    <PreBuildEvent>
-      <Command>lib /def:$(srcPath)$(DTCDLL).def /machine:x64 /out:"$(outDir)\$(DTCDLL).lib"</Command>
-    </PreBuildEvent>
+
+    <ResourceCompile>
+      <PreprocessorDefinitions>$(PG_DRVFILE_VERSION);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions Condition="!$(ANSI_VERSION)">UNICODE_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
   </ItemDefinitionGroup>
+
+  <Target Name="BuildImportLib">
+   <MakeDir Directories="$(OutDir)"/>
+   <Exec command='lib /def:$(MAINDEF) /machine:$(TARGET_CPU) /out:"$(OutDir)$(MAINDLL).lib"' />
+  </Target>
+
   <ItemGroup>
     <Text Include="ReadMe.txt" />
   </ItemGroup>
@@ -281,7 +119,7 @@
     <ClCompile Include="$(srcPath)execute.c" />
     <ClCompile Include="$(srcPath)info.c" />
     <ClCompile Include="$(srcPath)info30.c" />
-    <ClCompile Condition="'$(MEMORY_DEBUG)'=='yes'" Include="$(srcPath)inouealc.c" />
+    <ClCompile Condition="$(MEMORY_DEBUG)" Include="$(srcPath)inouealc.c" />
     <ClCompile Include="$(srcPath)loadlib.c" />
     <ClCompile Include="$(srcPath)lobj.c" />
     <ClCompile Include="$(srcPath)misc.c" />
@@ -289,8 +127,8 @@
     <ClCompile Include="$(srcPath)mylog.c" />
     <ClCompile Include="$(srcPath)odbcapi.c" />
     <ClCompile Include="$(srcPath)odbcapi30.c" />
-    <ClCompile Condition="'$(ANSI_VERSION)'=='no'" Include="$(srcPath)odbcapi30w.c" />
-    <ClCompile Condition="'$(ANSI_VERSION)'=='no'" Include="$(srcPath)odbcapiw.c" />
+    <ClCompile Condition="!$(ANSI_VERSION)" Include="$(srcPath)odbcapi30w.c" />
+    <ClCompile Condition="!$(ANSI_VERSION)" Include="$(srcPath)odbcapiw.c" />
     <ClCompile Include="$(srcPath)options.c" />
     <ClCompile Include="$(srcPath)parse.c" />
     <ClCompile Include="$(srcPath)pgapi30.c" />
@@ -300,21 +138,16 @@
     <ClCompile Include="$(srcPath)results.c" />
     <ClCompile Include="$(srcPath)setup.c" />
     <ClCompile Include="$(srcPath)socket.c" />
-    <ClCompile Condition="'$(USE_GSS)'=='yes'" Include="$(srcPath)gsssvcs.c" />
-    <ClCompile Condition="'$(USE_SSPI)'=='yes'" Include="$(srcPath)sspisvcs.c" />
+    <ClCompile Condition="$(USE_GSS)" Include="$(srcPath)gsssvcs.c" />
+    <ClCompile Condition="$(USE_SSPI)" Include="$(srcPath)sspisvcs.c" />
     <ClCompile Include="$(srcPath)statement.c" />
     <ClCompile Include="$(srcPath)tuple.c" />
     <ClCompile Include="$(srcPath)win_md5.c" />
-    <ClCompile Condition="'$(ANSI_VERSION)'=='no'" Include="$(srcPath)win_unicode.c" />
-    <ClCompile Condition="'$(MSDTC)'=='yes'" Include="$(srcPath)xalibname.c" />
+    <ClCompile Condition="!$(ANSI_VERSION)" Include="$(srcPath)win_unicode.c" />
+    <ClCompile Condition="$(MSDTC)" Include="$(srcPath)xalibname.c" />
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="$(srcPath)psqlodbc.rc" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-  <ImportGroup Label="ExtensionTargets">
-  </ImportGroup>
-  <Target Name="Info">
-    <Message Text="VCInstallDir=$(VCInstallDir) VSInstallDir=$(VSInstallDir) ExecutablePath=$(ExecutablePath)" />
-  </Target>
 </Project>
diff --git a/windows-defaults.mak b/windows-defaults.mak
deleted file mode 100644
index 2a24a96..0000000
--- a/windows-defaults.mak
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# This file includes default configuration options used to build the driver
-# on Windows using "nmake /f win64.mak". You can override these by creating a
-# file in the same directory called "windows-local.mak". It will be processed
-#after these defaults. (You can copy this file as a template, and modify)
-#
-!IF "$(TARGET_CPU)" == "x86"
-PG_INC=C:\Program Files (x86)\PostgreSQL\9.3\include
-PG_LIB=C:\Program Files (x86)\PostgreSQL\9.3\lib
-!ELSE
-PG_INC=$(PROGRAMFILES)\PostgreSQL\9.3\include
-PG_LIB=$(PROGRAMFILES)\PostgreSQL\9.3\lib
-!ENDIF
-
-# these will only used if building with USE_LIBPQ (which is the default)
-!IF "$(TARGET_CPU)" == "x86"
-SSL_INC=C:\OpenSSL-Win32\include
-SSL_LIB=C:\OpenSSL-Win32\lib
-!ELSE
-SSL_INC=C:\OpenSSL-Win64\include
-SSL_LIB=C:\OpenSSL-Win64\lib
-!ENDIF
-
-# Enable/disable features
-
-USE_LIBPQ = yes
-USE_SSPI = no
-USE_GSS = no
-MSDTC = yes
