DDK Setup Batch File

The setup process creates a batch file called Ddkenv.bat that sets up the DDK environment. The batch file also creates environment variables that allow you to restore your old environment. If you want to take advantage of this capability of restoring the PROMPT, PATH, LIB, and INCLUDE variables, you will need to run Ddkenv.bat before you run any other batch files (such as the Visual C++ batch file). (Note, however, that the capability of restoring your environment may not be very useful because you can always close the current MS-DOS prompt and start another one.)

Important

You need to set the DDKROOT and SDKROOT variables in Ddkenv.bat before you use the batch file.

The following information describes how to use Ddkenv.bat.

Syntax

ddkenv {{16 | 32} deviceclass | restore}

Parameters

16

Sets up the 16-bit build environment.

32

Sets up the 32-bit build environment.

restore

Restores PROMPT, PATH, LIB, and INCLUDE to the values before Ddkenv.bat was run.

deviceclass

Specifies one of the following classes:


printer

display

comm

base

keyb

block

mouse

plugplay

mmedia

net

pen


Selects the device class. Must be all lowercase or all uppercase.


Environment variables

The Ddkenv.bat batch file sets a number of environment variables.

_PROMPT, _PATH, _INCLUDE, and _LIB

These environment variables save the old values, so they can be restored with the restore option.

WIN16

This environment variable is used internally for jumping to the proper 16-bit or 32-bit environment set up commands. This variable is deleted upon exit from Ddkenv.bat.

The WIN16 environment variable can have these values:

DDKROOT

You should set the environment variable DDKROOT to the base directory of the DDK installation, usually \Ddk. If you move the DDK, you should change this variable. (It is set at the top of Ddkenv.bat.)

SDKROOT

You should set the environment variable SDKROOT to the base directory of the SDK installation, usually \Mstools. If you move the SDK, you should change this variable. (It is set at the top of Ddkenv.bat.)

INCLUDE

The INCLUDE environment variable is set to the location of include files.

For 16-bit development INCLUDE is set to the following directories:

%DDKROOT%\%2\INC

The include directory for the device class.

%DDKROOT%\INC16

The 16-bit DDK include directory.

%SDKROOT%\INC16

The 16-bit SDK include directory.

%_INCLUDE%

The saved value of the INCLUDE environment variable.

%DDKROOT%\INC32

The 32-bit DDK include directory.

%SDKROOT%\INCLUDE

The main (32-bit) SDK include directory.


For 32-bit development INCLUDE is set to the following directories:

%DDKROOT%\%2\INC

The include directory for the device class.

%DDKROOT%\INC32

The 32-bit DDK include directory.

%SDKROOT%\INCLUDE

The main (32-bit) SDK include directory.

%_INCLUDE%

Saved value of the INCLUDE environment variable.

%DDKROOT%\INC16

The 16-bit DDK include directory.

%SDKROOT%\INC16

The 16-bit SDK include directory.


LIB

The LIB environment variable is set to the following directories:

%DDKROOT%\LIB

The main DDK library directory.

%SDKROOT%\LIB16

The 16-bit SDK library directory (changed to %SDKROOT%\LIB for 32-bit development).

%_LIB%

The saved value of the LIB environment variable.


PATH

%DDKROOT%\%2\BIN

The tools directory for the device class.

%DDKROOT%\BIN

The main DDK tools directory.

%SDKROOT%\BINW16

The SDK's 16-bit tools directory (not included for 32-bit development).

%SDKROOT%\BIN

The SDK's main tools directory.

%_PATH%

The saved value of the PATH environment variable.


PROMPT

The PROMPT environment variable is set to one of the following values:

Windows 95 16-bit deviceclass%_PROMPT

or

Windows 95 32-bit deviceclass%_PROMPT

_PROMPT is the value of the PROMPT environment variable before Ddkdev.bat is run.