TapeMiniPreProcessReadWrite routine

TapeMiniPreProcessReadWrite is an optional, special-purpose routine that performs any device-specific operations required before read and write operations. Most tape miniclass drivers do not need this routine.

Syntax


TAPE_PROCESS_COMMAND_ROUTINE TapeMiniPreProcessReadWrite;

TAPE_STATUS TapeMiniPreProcessReadWrite(
  _Inout_  PVOID               MinitapeExtension,
  _Inout_  PVOID               CommandExtension,
  _Inout_  PVOID               CommandParameters,
  _Inout_  PSCSI_REQUEST_BLOCK Srb,
  _In_     ULONG               CallNumber,
  _In_opt_ TAPE_STATUS         StatusOfLastCommand,
  _Inout_  PULONG              RetryFlags
)
{ ... }

Parameters

MinitapeExtension [in, out]

Pointer to the driver-specific minitape extension. This is NULL if the miniclass driver did not request a minitape extension when it initialized.

CommandExtension [in, out]

Not used.

CommandParameters [in, out]

Not used.

Srb [in, out]

Pointer to the SRB for the read or write operation. TapeMiniPreProcessReadWrite should not modify this SRB.

CallNumber [in]

Not used.

StatusOfLastCommand [in, optional]

Not used.

RetryFlags [in, out]

Not used.

Return value

TapeMiniPreProcessReadWrite can return any TAPE_STATUS value. The tape class driver ignores the return value.

Remarks

The activities of the TapeMiniPreProcessReadWrite routine are device specific. The routine can use the information passed to it by the class driver to implement special preprocessing for reads and writes. If a drive has limited capabilities, the driver may need this routine to maintain coherent state, for example.

If a tape miniclass driver sets a non-NULL entry point for this routine in the TAPE_INIT_DATA_EX structure it passes to TapeClassInitialize from its DriverEntry routine, the tape class driver calls it before each read and write operation on the tape device. The class driver does not expect any information back from this routine.

Requirements

Target platform

Header

Minitape.h (include Minitape.h)

See also

DriverEntry of Tape Miniclass Driver
TAPE_INIT_DATA_EX
TapeClassInitialize
TAPE_STATUS

 

 

Send comments about this topic to Microsoft

Show: