CDI_Register_CDM

Registers a CDM with NWPA.

Thread Context:Non-Blocking

Syntax

    LONG CDI_Register_CDM (
       LONG  *cdmOSHandle,
       LONG   cdmHandle,
       LONG   types,
       BYTE  *name,
       LONG   npaHandle
       );
    
    

Parameters

cdmOSHandle
(IN) The CDM's handle for using the CDI APIs. The value of cdmOSHandle was assigned during CDI_Register_CDM, and it is used in conjunction with the CDM-generated cdmHandle to uniquely identify a CDM when it interfaces with NWPA through the CDI API set.
cdmHandle
(IN) Handle that the CDM generated for itself. This handle is the CDM's own unique identifier. It is used in conjunction with the OS-generated cdmOSHandle to uniquely identify a CDM when it interfaces with NWPA through the CDI API set.
types
(IN) A packed LONG containing information that identifies for NWPA the CDM's CDM type (filter, enhancer, or base-translator), and the device types and host adapter type it supports. The parameter is divided as follows:

Figure 6-1 types parameter

Possible values for CDM types:

Value

Description

0x01

Base-Translator (These have binding priority over Generic Base-Translators)

0x02

Enhancer

0x03

Filter

0x04

Generic Base-Translator

Possible values for device types:

Value

Description

0x00

Direct-access device (magnetic disk)

0x01

Sequential-access device (magnetic tape)

0x02

Printer device

0x03

Processor device

0x04

Write once device (some optical disks)

0x05

CD device

0x06

Scanner device

0x07

Optical memory device (some optical disks)

0x08

Media changer device (jukebox) or magazine

0x09

Communications device

0x0A-0B

Defined by ASC IT8 (Graphic Arts Pre-Press)

0x0C-1E

Reserved

0x1F

Unknown or no device type

0xFF

Call CDM_Inquiry for every type of device

Possible values for host adapter bus types:

Value

Description

0x0001

SCSI

0x0002

IDE-ATA

0x0003

Custom

0x0004

SATA (Serial ATA)

0x0005 to 0xFFFE

Reserved

0xFFFF

Any bus type

name
(IN) Length-preceded string containing the CDM's name. Maximum string length is 64 bytes where byte 0 contains the string length and bytes 1 through 63 can contain characters.
npaHandle
(IN) The CDM's handle for using the NPA APIs. Its value was assigned during NPA_Register_CDM_Module.
cdmOSHandle
(OUT) Receives a CDM OS handle used as a communication token between the CDM and NWPA. This handle is used in conjunction with the CDM-generated Handle to uniquely identify a CDM when it interfaces with NWPA through the CDI API set.

Return Values

The following table lists return values and descriptions.

zero

Successful

nonzero

Unsuccessful

Remarks

CDI_Register_CDM is used to register the module as a CDM and make its entry points, registered during NPA_Register_CDM_Module, visible to the system. This is the last function called within CDM_Load prior to CDM_Load returning its thread to the OS calling process.