You can specify any number of software parameters to be saved under the driver's registry key. For NDIS2 drivers, these are also saved in PROTOCOL.INI. The parameter descriptions are saved under the Ndi\params subkey; their current values are saved at the root of the driver key. For NDIS drivers, the NDIS wrapper can read these parameters from the root of the driver key and report them back to the driver. The user views and edits the parameters from the Advanced property sheet page provided by NETDI. Parameters can be numeric (int, long, word, dword), or text (edit, enum). For numeric types, you can specify the minimum, maximum and, optionally, the interval value. For the enum type, you must specify a list of values and descriptions. For the edit type, you can specify certain edit control options: maximum length, OEM-text compatibility, and upper case.
Driver Sub Key | Value Name | Value | Description |
---|---|---|---|
Ndi\Params\ParamKey | ParamDesc | string | Specifies the parameter description that will be shown in the Advanced dialog. |
Ndi\Params\ParamKey | Type | type | The parameter type. Can be: int, long, word, dword, enum, edit. The type is edit if type is not specified. |
Ndi\Params\ParamKey | Default | default value | Specifies the default value if no current value is specified. |
Ndi\Params\ParamKey | Optional | 0|1 | Marks the parameter as optional. An optional parameter can have no current value. The user can mark it as Not Present in the Advanced dialog. If Optional is not specified, the user must use the default value or supply a value the parameter. |
Range information for numeric types
Ndi\Params\ParamKey | Min | numeric value | The minimum value. |
Ndi\Params\ParamKey | Max | numeric value | The maximum value. |
Ndi\Params\ParamKey | Step | numeric value | The step between valid value, based from the minimum value. |
Ndi\Params\ParamKey | Base | 10|16 | Display and save values as decimal or hexadecimal. 10 if not specified. |
Range information for enum types
Ndi\Params\ParamKey\Enum value | description | A multiple value key. The value name is saved as the parameter value in the registry. The RHS value is shown to the user in dropdown listbox as the parameter value description. |
Hardware resource parameters for NDIS2 network card drivers:
Ndi\Params\ParamKey | resc | BYTE:1-4 | This binary value is required for all hardware resource parameters. It indicates what type of hardware resource the parameter represents: |
1 - Memory address | |||
2 - I/O Address | |||
3 - DMA channel | |||
4 - IRQ |
Use the following parameter to tell NETDI to store the parameter in some other location in the registry. Note, for this parameter, this will be the only value listed under Ndi\Params. The rest of the preceding parameters must be located in the desired registry key. (See the sessions parameter for NETBEUI listed in the preceding example.)
Storing parameters in an arbitrary registry location:
Ndi\Params\ParamKey | location | registry key | This tells NETDI what arbitrary registry key to store the value of this parameter. |
Parameter flags:
Ndi\Params\ParamKey | flag | BYTE:value | This binary DWORD value specifies flags for the parameter. The value is created by bitwise ORing the desired flags: |
0x10 - Used by NDIS2 only | |||
0x20 - Used by NDIS3 only | |||
0x40 - Card uses IRQ 2 | |||
0x08 - Required parameter (UI will force the user to set this value). | |||
Note: This parameter is written in the INF file as a DWORD using Intel(r) byte ordering. For example, 0x30 would be written in the INF file as 30,00,00,00. |