## MMPM/2 Device Driver Reference

[prev][next][parent][TOC]

### Step 4. Creating an Audio Installation DLL

In some cases, you might want to perform some action that is specific to your adapter, and thus not provided by this generic audio installation program. For example, you might want to query the user's hardware setup to determine values, such as interrupt level, rather than prompting the user for those values. In this case, you can create your own DLL to perform these functions.

The audio installation program calls your DLL and allows it to return values that can be added to your lines in the CONFIG.SYS file. The following steps describe how to use your DLL:

1.Write and compile the DLL.

The entry point to your DLL must accept the following parameters:

    CardSpecDLLEntry (USHORT usCardNum,
                      CHAR   achSpec[259])

where:

usCardNum Is the sequential number of this adapter.

For example, if the user chooses to install two of these adapters, the DLL is called twice. The first time the DLL is called, usCardNum is 1, and the second time the DLL is called, usCardNum is 2.

achSpec[5][259] Is a two dimensional array that can hold up to five strings of 259 characters each. Your DLL can put values into these five strings. The audio installation program then puts these strings into lines in the CONFIG.SYS file as specified in CARDINFO.RC. If there is more than one of these values, they are put into the CONFIG.SYS in sequential order. For example, your DLL fills in the following values:

    achSpec[0]="rec"
    achSpec[1]="3"
    achSpec[2]="11"
    achSpec[3]=""
    achSpec[4]=""

The format of your CONFIG.SYS line in CARDINFO.RC is:

    "DEVICE=*PATH*\\MVPRODD.SYS *SPEC* *SPEC* *SPEC*"

The line that is put into CONFIG.SYS is:

    DEVICE=D:\MMOS2\MVPRODD.SYS rec 3 11

2.Put the name of the DLL and the name of the DLL's entry point into CARDINFO.RC.