CreateTapePartition

  DWORD CreateTapePartition(hDevice, dwSize, lpvpp, lpo)    
  HANDLE hDevice; /* open device handle */
  DWORD dwSize; /* size of new partition in megabytes */
  LPVOID lpvpp; /* pointer to partition parameters */
  LPOVERLAPPED lpo; /* overlapped structure */

Parameters

hDevice

Specifies an open handle to the device where the new partition will be created.

dwSize

Specifies the size of the partition parameters structure.

lpvpp

Points to the partition parameters structure. This structure contains the following members:

Member Description

DWORD dwPartitionMethod Specifies the method of partitioning requested. This parameter can have one of the following values:

Value Meaning

TAPE_PARTITION_FIXED Partition parameters are fixed by the device.
TAPE_PARTITION_SELECT Number of partitions is specified by dwPartitionCount and the partition sizes are defined by the device.
TAPE_PARTITION_INITIATOR Number of partitions is specified by dwPartitionCount and the partition sizes are specified in the lpPartitionSize array.

DWORD dwPartitionCount  
  Specifies the number of partitions to create and the number of elements in the lpPartitionSize array.
LPVOID lpPartitionSize  
  Points to a variable length array that contains the size for each partition in megabytes. If the size of a partition is zero, the partition is created from all the tape remaining on the device. The last size in the array should always be zero.

lpo

Points to an OVERLAPPED structure. The OVERLAPPED structure has the following form:

typedef struct _OVERLAPPED { /* o */

DWORD Internal;

DWORD InternalHigh;

DWORD Offset;

DWORD OffsetHigh;

HANDLE hEvent;

} OVERLAPPED;

typedef OVERLAPPED *LPOVERLAPPED;

Return Value

If the function is successful, the return value is NO_ERROR. Otherwise, it is an error code.