Desktop Engine Installation API

Distributing SQL Server with Applications

Distributing SQL Server Applications

Desktop Engine Installation API

Before attempting to install an instance of the Microsoft® SQL Server™ 2000 Desktop Engine, an application setup process should first validate the proposed installation using the Desktop Engine Installation API functions:

  • Use NumInstalledInstances to ensure the computer does not already have more than 16 instances installed.

  • Use IsInstanceNameValid to ensure the name for the new instance of SQL Server has not already been used by an existing instance.

To use these functions in a setup program you are developing, you must first:

  • Copy the file Validateinstance.h from C:\Program Files\Microsoft SQL Server\80\Tools\DevTools\Samples\Desktop to a folder in your compiler include path. Validateinstance.h contains the function prototypes for the Desktop Engine Setup API functions.

  • Copy the files Desktopenginedeploy.lib and Sqdedev.lib from C:\Program Files\Microsoft SQL Server\80\Tools\DevTools\Samples\Desktop to a folder in your compiler library path.

If the application setup program requires logic to interpret the Desktop Engine return codes, also copy the file Sqlserrors.h from C:\Program Files\Microsoft SQL Server\80\Tools\DevTools\Samples\Desktop to a folder in your compiler include path. Sqlserror.h includes the #defines creating the symbolic names you can use to reference the Desktop Engine Windows Installer return codes.