TAPE_EXTENSION_INIT_ROUTINE callback function (minitape.h)

ExtensionInit initializes an optional, driver-specific context area. This routine is called by TapeClassInitialize when the tape miniclass driver is loaded. This routine is optional.

Syntax

TAPE_EXTENSION_INIT_ROUTINE TapeExtensionInitRoutine;

void TapeExtensionInitRoutine(
  [in] PVOID MinitapeExtension,
  [in] PINQUIRYDATA InquiryData,
  [in] PMODE_CAPABILITIES_PAGE ModeCapabilitiesPage
)
{...}

Parameters

[in] MinitapeExtension

Pointer to a buffer of the size requested by the tape miniclass driver when it initialized.

[in] InquiryData

Pointer to the SCSI inquiry data for the tape device.

[in] ModeCapabilitiesPage

Pointer to a buffer that contains low-level information for the tape device. The format of this page is defined by the QIC 157 standard and is subject to change. This is NULL if the device does not support a mode capabilities page.

Return value

None

Remarks

A tape miniclass driver requests a minitape extension by specifying a nonzero value for MinitapeExtensionSize in the TAPE_INIT_DATA_EX structure it passes to TapeClassInitialize from its DriverEntry routine. A miniclass driver defines the structure and contents of the minitape extension and typically uses it to store inquiry data for the devices it supports.

The tape class driver allocates the minitape extension and supplies it subsequently in calls to the tape miniclass driver's routines that handle the device-specific aspects of device-control requests and to the miniclass driver's optional TapeMiniTapeError routine.

ExtensionInit initializes the minitape extension, and the miniclass driver uses this area to maintain run-time state for its device. The tape class driver passes InquiryData and a ModeCapabilitiesPage to this routine because those structures contain information that a tape miniclass driver might want to store in the minitape extension.

Requirements

Requirement Value
Target Platform Desktop
Header minitape.h (include Minitape.h)

See also

DriverEntry of Tape Miniclass Driver

TAPE_INIT_DATA_EX

TAPE_STATUS

TapeClassInitialize

TapeMiniTapeError