Bewerken

Delen via


ChangerClassInitialize function (mcd.h)

The ChangerClassInitialize routine initializes the driver.

Syntax

NTSTATUS ChangerClassInitialize(
  [in] PDRIVER_OBJECT  DriverObject,
  [in] PUNICODE_STRING RegistryPath,
       PMCD_INIT_DATA  ChangerInitData
);

Parameters

[in] DriverObject

Pointer to the changer miniclass driver object. This is passed as a parameter to the miniclass driver's DriverEntry routine. The format of this object is operating system-specific and should not be interpreted by the miniclass driver.

[in] RegistryPath

Pointer to the registry path for changer miniclass driver. This is also passed as a parameter to the miniclass driver's DriverEntry routine. The format of this is operating system-specific and should not be interpreted by the miniclass driver.

ChangerInitData

Pointer to an MCD_INIT_DATA structure containing miniclass driver-specific information such as the entry points for the changer miniclass driver's command processing routines.

Return value

ChangerClassInitialize returns a value indicating the success or failure of the driver initialization. If initialization is successful, ChangerClassInitialize returns STATUS_SUCCESS. Otherwise, ChangerClassInitialize returns an appropriate error message. Minidrivers should not interpret this error value, but should just return this value from their DriverEntry routine.

Remarks

ChangerClassInitialize is a changer class driver routine that miniclass drivers can call in Microsoft Windows XP and later operating systems.

Changer miniclass drivers call ChangerClassInitialize from within their DriverEntry routines to initialize the driver. ChangerClassInitialize performs many tasks formerly performed by the changer class driver's DriverEntry routine such as registering the miniclass driver's dispatch routines. It allocates a driver object extension and copies the data contained in MCDInitData into the driver object extension along with other initialization data such as the driver's registry path and pointers to certain changer class driver routines that are operating system-specific.

Changer miniclass drivers must allocate an MCD_INIT_DATA structure, zero the structure by calling RtlZeroMemory, and then assign values to the appropriate members, before passing the structure's address to ChangerClassInitialize by means of the MCDInitData parameter.

Requirements

Requirement Value
Target Platform Desktop
Header mcd.h (include Mcd.h, Ntddchgr.h)
Library Mcd.lib

See also

MCD_INIT_DATA

RtlZeroMemory