/// <summary>Type of positioning to perform.</summary>
publicenumTAPE_POS_METHOD
{
/// <summary>
/// Moves the tape to the device-specific block address specified by the dwOffsetLow and dwOffsetHigh parameters. The dwPartition parameter is ignored.
/// </summary>
TAPE_ABSOLUTE_BLOCK=1,
/// <summary>Moves the tape to the block address specified by dwOffsetLow and dwOffsetHigh in the partition specified by dwPartition.</summary>
TAPE_LOGICAL_BLOCK=2,
/// <summary>Moves the tape to the beginning of the current partition. The dwPartition, dwOffsetLow, and dwOffsetHigh parameters are ignored.</summary>
TAPE_REWIND=0,
/// <summary>Moves the tape to the end of the data on the partition specified by dwPartition.</summary>
TAPE_SPACE_END_OF_DATA=4,
/// <summary>
/// Moves the tape forward (or backward) the number of filemarks specified by dwOffsetLow and dwOffsetHigh in the current partition. The dwPartition
/// parameter is ignored.
/// </summary>
TAPE_SPACE_FILEMARKS=6,
/// <summary>
/// Moves the tape forward (or backward) the number of blocks specified by dwOffsetLow and dwOffsetHigh in the current partition. The dwPartition
/// parameter is ignored.
/// </summary>
TAPE_SPACE_RELATIVE_BLOCKS=5,
/// <summary>
/// Moves the tape forward (or backward) to the first occurrence of n filemarks in the current partition, where n is the number specified by
/// dwOffsetLow and dwOffsetHigh. The dwPartition parameter is ignored.
/// </summary>
TAPE_SPACE_SEQUENTIAL_FMKS=7,
/// <summary>
/// Moves the tape forward (or backward) to the first occurrence of n setmarks in the current partition, where n is the number specified by
/// dwOffsetLow and dwOffsetHigh. The dwPartition parameter is ignored.
/// </summary>
TAPE_SPACE_SEQUENTIAL_SMKS=9,
/// <summary>
/// Moves the tape forward (or backward) the number of setmarks specified by dwOffsetLow and dwOffsetHigh in the current partition. The dwPartition
/// parameter is ignored.
/// </summary>
TAPE_SPACE_SETMARKS=8,
}
/// <summary>Type of address to obtain.</summary>
publicenumTAPE_POS_TYPE
{
/// <summary>The lpdwOffsetLow and lpdwOffsetHigh parameters receive the device-specific block address. The dwPartition parameter receives zero.</summary>
TAPE_ABSOLUTE_POSITION=0,
/// <summary>
/// The lpdwOffsetLow and lpdwOffsetHigh parameters receive the logical block address. The dwPartition parameter receives the logical tape partition.
/// </summary>
TAPE_LOGICAL_POSITION=1
}
/// <summary>Tape device preparation.</summary>
publicenumTAPE_PREP_OP
{
/// <summary>Performs a low-level format of the tape. Currently, only the QIC117 device supports this feature.</summary>
TAPE_FORMAT=5,
/// <summary>Loads the tape and moves the tape to the beginning.</summary>
TAPE_LOAD=0,
/// <summary>Locks the tape ejection mechanism so that the tape is not ejected accidentally.</summary>
TAPE_LOCK=3,
/// <summary>
/// Adjusts the tension by moving the tape to the end of the tape and back to the beginning. This option is not supported by all devices. This value
/// is ignored if it is not supported.
/// </summary>
TAPE_TENSION=2,
/// <summary>
/// Moves the tape to the beginning for removal from the device. After a successful unload operation, the device returns errors to applications that
/// attempt to access the tape, until the tape is loaded again.
/// </summary>
TAPE_UNLOAD=1,
/// <summary>Unlocks the tape ejection mechanism.</summary>
TAPE_UNLOCK=4,
}
/// <summary>Type of tapemarks to write.</summary>
publicenumTAPEMARK_TYPE
{
/// <summary>Writes the number of filemarks specified by the dwTapemarkCount parameter.</summary>
TAPE_FILEMARKS=1,
/// <summary>Writes the number of long filemarks specified by dwTapemarkCount.</summary>
TAPE_LONG_FILEMARKS=3,
/// <summary>Writes the number of setmarks specified by dwTapemarkCount.</summary>
TAPE_SETMARKS=0,
/// <summary>Writes the number of short filemarks specified by dwTapemarkCount.</summary>
TAPE_SHORT_FILEMARKS=2,
}
/// <summary>
/// The <c>BackupRead</c> function can be used to back up a file or directory, including the security information. The function reads data associated
/// with a specified file or directory into a buffer, which can then be written to the backup medium using the <c>WriteFile</c> function.
/// </summary>
/// <param name="hFile">
/// <para>
/// Handle to the file or directory to be backed up. To obtain the handle, call the <c>CreateFile</c> function. The SACLs are not read unless the file
/// handle was created with the <c>ACCESS_SYSTEM_SECURITY</c> access right. For more information, see File Security and Access Rights.
/// </para>
/// <para>
/// The handle must be synchronous (nonoverlapped). This means that the FILE_FLAG_OVERLAPPED flag must not be set when <c>CreateFile</c> is called. This
/// function does not validate that the handle it receives is synchronous, so it does not return an error code for a synchronous handle, but calling it
/// with an asynchronous (overlapped) handle can result in subtle errors that are very difficult to debug.
/// </para>
/// <para>
/// The <c>BackupRead</c> function may fail if <c>CreateFile</c> was called with the flag <c>FILE_FLAG_NO_BUFFERING</c>. In this case, the
/// <c>GetLastError</c> function returns the value <c>ERROR_INVALID_PARAMETER</c>.
/// </para>
/// </param>
/// <param name="lpBuffer">Pointer to a buffer that receives the data.</param>
/// <param name="nNumberOfBytesToRead">Length of the buffer, in bytes. The buffer size must be greater than the size of a <c>WIN32_STREAM_ID</c> structure.</param>
/// <param name="lpNumberOfBytesRead">
/// <para>Pointer to a variable that receives the number of bytes read.</para>
/// <para>
/// If the function returns a nonzero value, and the variable pointed to by lpNumberOfBytesRead is zero, then all the data associated with the file
/// handle has been read.
/// </para>
/// </param>
/// <param name="bAbort">
/// Indicates whether you have finished using <c>BackupRead</c> on the handle. While you are backing up the file, specify this parameter as <c>FALSE</c>.
/// Once you are done using <c>BackupRead</c>, you must call <c>BackupRead</c> one more time specifying <c>TRUE</c> for this parameter and passing the
/// appropriate lpContext. lpContext must be passed when bAbort is <c>TRUE</c>; all other parameters are ignored.
/// </param>
/// <param name="bProcessSecurity">
/// <para>Indicates whether the function will restore the access-control list (ACL) data for the file or directory.</para>
/// <para>If bProcessSecurity is <c>TRUE</c>, the ACL data will be backed up.</para>
/// </param>
/// <param name="lpContext">
/// <para>
/// Pointer to a variable that receives a pointer to an internal data structure used by <c>BackupRead</c> to maintain context information during a backup operation.
/// </para>
/// <para>
/// You must set the variable pointed to by lpContext to <c>NULL</c> before the first call to <c>BackupRead</c> for the specified file or directory. The
/// function allocates memory for the data structure, and then sets the variable to point to that structure. You must not change lpContext or the
/// variable that it points to between calls to <c>BackupRead</c>.
/// </para>
/// <para>
/// To release the memory used by the data structure, call <c>BackupRead</c> with the bAbort parameter set to <c>TRUE</c> when the backup operation is complete.
/// </para>
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is nonzero.</para>
/// <para>If the function fails, the return value is zero, indicating that an I/O error occurred. To get extended error information, call <c>GetLastError</c>.</para>
/// The <c>BackupSeek</c> function seeks forward in a data stream initially accessed by using the <c>BackupRead</c> or <c>BackupWrite</c> function.
/// </summary>
/// <param name="hFile">
/// <para>Handle to the file or directory. This handle is created by using the <c>CreateFile</c> function.</para>
/// <para>
/// The handle must be synchronous (nonoverlapped). This means that the FILE_FLAG_OVERLAPPED flag must not be set when <c>CreateFile</c> is called. This
/// function does not validate that the handle it receives is synchronous, so it does not return an error code for a synchronous handle, but calling it
/// with an asynchronous (overlapped) handle can result in subtle errors that are very difficult to debug.
/// </para>
/// </param>
/// <param name="dwLowBytesToSeek">Low-order part of the number of bytes to seek.</param>
/// <param name="dwHighBytesToSeek">High-order part of the number of bytes to seek.</param>
/// <param name="lpdwLowByteSeeked">Pointer to a variable that receives the low-order bits of the number of bytes the function actually seeks.</param>
/// <param name="lpdwHighByteSeeked">Pointer to a variable that receives the high-order bits of the number of bytes the function actually seeks.</param>
/// <param name="lpContext">
/// Pointer to an internal data structure used by the function. This structure must be the same structure that was initialized by the <c>BackupRead</c>
/// or <c>BackupWrite</c> function. An application must not touch the contents of this structure.
/// </param>
/// <returns>
/// <para>If the function could seek the requested amount, the function returns a nonzero value.</para>
/// <para>If the function could not seek the requested amount, the function returns zero. To get extended error information, call <c>GetLastError</c>.</para>
/// The <c>BackupWrite</c> function can be used to restore a file or directory that was backed up using <c>BackupRead</c>. Use the <c>ReadFile</c>
/// function to get a stream of data from the backup medium, then use <c>BackupWrite</c> to write the data to the specified file or directory.
/// </summary>
/// <param name="hFile">
/// <para>
/// Handle to the file or directory to be restored. To obtain the handle, call the <c>CreateFile</c> function. The SACLs are not restored unless the file
/// handle was created with the <c>ACCESS_SYSTEM_SECURITY</c> access right. To ensure that the integrity ACEs are restored correctly, the file handle
/// must also have been created with the WRITE_OWNER access right. For more information, see File Security and Access Rights.
/// </para>
/// <para><c>Windows Server 2003 and Windows XP:</c> The WRITE_OWNER access right is not required.</para>
/// <para>
/// The handle must be synchronous (nonoverlapped). This means that the FILE_FLAG_OVERLAPPED flag must not be set when <c>CreateFile</c> is called. This
/// function does not validate that the handle it receives is synchronous, so it does not return an error code for a synchronous handle, but calling it
/// with an asynchronous (overlapped) handle can result in subtle errors that are very difficult to debug.
/// </para>
/// <para>
/// The <c>BackupWrite</c> function may fail if <c>CreateFile</c> was called with the flag <c>FILE_FLAG_NO_BUFFERING</c>. In this case, the
/// <c>GetLastError</c> function returns the value <c>ERROR_INVALID_PARAMETER</c>.
/// </para>
/// </param>
/// <param name="lpBuffer">Pointer to a buffer that the function writes data from.</param>
/// <param name="nNumberOfBytesToWrite">Size of the buffer, in bytes. The buffer size must be greater than the size of a <c>WIN32_STREAM_ID</c> structure.</param>
/// <param name="lpNumberOfBytesWritten">Pointer to a variable that receives the number of bytes written.</param>
/// <param name="bAbort">
/// Indicates whether you have finished using <c>BackupWrite</c> on the handle. While you are restoring the file, specify this parameter as <c>FALSE</c>.
/// After you are done using <c>BackupWrite</c>, you must call <c>BackupWrite</c> one more time specifying <c>TRUE</c> for this parameter and passing the
/// appropriate lpContext. lpContext must be passed when bAbort is <c>TRUE</c>; all other parameters are ignored.
/// </param>
/// <param name="bProcessSecurity">
/// <para>Specifies whether the function will restore the access-control list (ACL) data for the file or directory.</para>
/// <para>
/// If bProcessSecurity is <c>TRUE</c>, you need to specify <c>WRITE_OWNER</c> and <c>WRITE_DAC</c> access when opening the file or directory handle. If
/// the handle does not have those access rights, the operating system denies access to the ACL data, and ACL data restoration will not occur.
/// </para>
/// </param>
/// <param name="lpContext">
/// <para>
/// Pointer to a variable that receives a pointer to an internal data structure used by <c>BackupWrite</c> to maintain context information during a
/// restore operation.
/// </para>
/// <para>
/// You must set the variable pointed to by lpContext to <c>NULL</c> before the first call to <c>BackupWrite</c> for the specified file or directory. The
/// function allocates memory for the data structure, and then sets the variable to point to that structure. You must not change lpContext or the
/// variable that it points to between calls to <c>BackupWrite</c>.
/// </para>
/// <para>
/// To release the memory used by the data structure, call <c>BackupWrite</c> with the bAbort parameter set to <c>TRUE</c> when the restore operation is complete.
/// </para>
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is nonzero.</para>
/// <para>If the function fails, the return value is zero, indicating that an I/O error occurred. To get extended error information, call <c>GetLastError</c>.</para>
/// <summary>The <c>CreateTapePartition</c> function reformats a tape.</summary>
/// <param name="hDevice">Handle to the device where the new partition is to be created. This handle is created by using the <c>CreateFile</c> function.</param>
/// <param name="dwPartitionMethod">
/// <para>
/// Type of partition to create. To determine what type of partitions your device supports, see the documentation for your hardware. This parameter can
/// Partitions the tape into the number and size of partitions specified by dwCount and dwSize, respectively, except for the last partition. The size of
/// the last partition is the remainder of the tape.
/// </term>
/// </item>
/// <item>
/// <term>TAPE_SELECT_PARTITIONS1L</term>
/// <term>
/// Partitions the tape into the number of partitions specified by dwCount. The dwSize parameter is ignored. The size of the partitions is determined by
/// Number of partitions to create. The <c>GetTapeParameters</c> function provides the maximum number of partitions a tape can support.
/// </param>
/// <param name="dwSize">Size of each partition, in megabytes. This value is ignored if the dwPartitionMethod parameter is <c>TAPE_SELECT_PARTITIONS</c>.</param>
/// <returns>
/// <para>If the function succeeds, the return value is NO_ERROR.</para>
/// <para>If the function fails, it can return one of the following error codes.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Error</term>
/// <term>Description</term>
/// </listheader>
/// <item>
/// <term>ERROR_BEGINNING_OF_MEDIA1102L</term>
/// <term>An attempt to access data before the beginning-of-medium marker failed.</term>
/// </item>
/// <item>
/// <term>ERROR_BUS_RESET1111L</term>
/// <term>A reset condition was detected on the bus.</term>
/// </item>
/// <item>
/// <term>ERROR_END_OF_MEDIA1100L</term>
/// <term>The end-of-tape marker was reached during an operation.</term>
/// </item>
/// <item>
/// <term>ERROR_FILEMARK_DETECTED1101L</term>
/// <term>A filemark was reached during an operation.</term>
/// </item>
/// <item>
/// <term>ERROR_SETMARK_DETECTED1103L</term>
/// <term>A setmark was reached during an operation.</term>
/// </item>
/// <item>
/// <term>ERROR_NO_DATA_DETECTED1104L</term>
/// <term>The end-of-data marker was reached during an operation.</term>
/// </item>
/// <item>
/// <term>ERROR_PARTITION_FAILURE1105L</term>
/// <term>The tape could not be partitioned.</term>
/// </item>
/// <item>
/// <term>ERROR_INVALID_BLOCK_LENGTH1106L</term>
/// <term>The block size is incorrect on a new tape in a multivolume partition.</term>
/// <summary>The <c>GetTapeParameters</c> function retrieves information that describes the tape or the tape drive.</summary>
/// <param name="hDevice">Handle to the device about which information is sought. This handle is created by using the <c>CreateFile</c> function.</param>
/// <param name="dwOperation">
/// <para>Type of information requested. This parameter must be one of the following values.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>GET_TAPE_DRIVE_INFORMATION1</term>
/// <term>Retrieves information about the tape device.</term>
/// </item>
/// <item>
/// <term>GET_TAPE_MEDIA_INFORMATION0</term>
/// <term>Retrieves information about the tape in the tape device.</term>
/// </item>
/// </list>
/// </para>
/// </param>
/// <param name="lpdwSize">
/// Pointer to a variable that receives the size, in bytes, of the buffer specified by the lpTapeInformation parameter. If the buffer is too small, this
/// parameter receives the required size.
/// </param>
/// <param name="lpTapeInformation">
/// <para>
/// Pointer to a structure that contains the requested information. If the dwOperation parameter is GET_TAPE_MEDIA_INFORMATION, lpTapeInformation points
/// to a <c>TAPE_GET_MEDIA_PARAMETERS</c> structure.
/// </para>
/// <para>If dwOperation is GET_TAPE_DRIVE_INFORMATION, lpTapeInformation points to a <c>TAPE_GET_DRIVE_PARAMETERS</c> structure.</para>
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is NO_ERROR.</para>
/// <para>If the function fails, it can return one of the following error codes.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Error code</term>
/// <term>Description</term>
/// </listheader>
/// <item>
/// <term>ERROR_BEGINNING_OF_MEDIA1102L</term>
/// <term>An attempt to access data before the beginning-of-medium marker failed.</term>
/// </item>
/// <item>
/// <term>ERROR_BUS_RESET1111L</term>
/// <term>A reset condition was detected on the bus.</term>
/// <summary>The <c>GetTapePosition</c> function retrieves the current address of the tape, in logical or absolute blocks.</summary>
/// <param name="hDevice">Handle to the device on which to get the tape position. This handle is created by using <c>CreateFile</c>.</param>
/// <param name="dwPositionType">
/// <para>Type of address to obtain. This parameter can be one of the following values.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>TAPE_ABSOLUTE_POSITION0L</term>
/// <term>The lpdwOffsetLow and lpdwOffsetHigh parameters receive the device-specific block address. The dwPartition parameter receives zero.</term>
/// </item>
/// <item>
/// <term>TAPE_LOGICAL_POSITION1L</term>
/// <term>The lpdwOffsetLow and lpdwOffsetHigh parameters receive the logical block address. The dwPartition parameter receives the logical tape partition.</term>
/// </item>
/// </list>
/// </para>
/// </param>
/// <param name="lpdwPartition">
/// Pointer to a variable that receives the number of the current tape partition. Partitions are numbered logically from 1 through n, where 1 is the
/// first partition on the tape and n is the last. When a device-specific block address is retrieved, or if the device supports only one partition, this
/// parameter receives zero.
/// </param>
/// <param name="lpdwOffsetLow">Pointer to a variable that receives the low-order bits of the current tape position.</param>
/// <param name="lpdwOffsetHigh">
/// Pointer to a variable that receives the high-order bits of the current tape position. This parameter can be <c>NULL</c> if the high-order bits are
/// not required.
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is NO_ERROR.</para>
/// <para>If the function fails, it can return one of the following error codes.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Error code</term>
/// <term>Description</term>
/// </listheader>
/// <item>
/// <term>ERROR_BEGINNING_OF_MEDIA1102L</term>
/// <term>An attempt to access data before the beginning-of-medium marker failed.</term>
/// </item>
/// <item>
/// <term>ERROR_BUS_RESET1111L</term>
/// <term>A reset condition was detected on the bus.</term>
/// <summary>The <c>GetTapeStatus</c> function determines whether the tape device is ready to process tape commands.</summary>
/// <param name="hDevice">Handle to the device for which to get the device status. This handle is created by using the <c>CreateFile</c> function.</param>
/// <returns>
/// <para>If the tape device is ready to accept appropriate tape-access commands without returning errors, the return value is NO_ERROR.</para>
/// <para>If the function fails, it can return one of the following error codes.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Error code</term>
/// <term>Description</term>
/// </listheader>
/// <item>
/// <term>ERROR_BEGINNING_OF_MEDIA1102L</term>
/// <term>An attempt to access data before the beginning-of-medium marker failed.</term>
/// </item>
/// <item>
/// <term>ERROR_BUS_RESET1111L</term>
/// <term>A reset condition was detected on the bus.</term>
/// <summary>The <c>PrepareTape</c> function prepares the tape to be accessed or removed.</summary>
/// <param name="hDevice">Handle to the device preparing the tape. This handle is created by using the <c>CreateFile</c> function.</param>
/// <param name="dwOperation">
/// <para>Tape device preparation. This parameter can be one of the following values.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>TAPE_FORMAT5L</term>
/// <term>Performs a low-level format of the tape. Currently, only the QIC117 device supports this feature.</term>
/// </item>
/// <item>
/// <term>TAPE_LOAD0L</term>
/// <term>Loads the tape and moves the tape to the beginning.</term>
/// </item>
/// <item>
/// <term>TAPE_LOCK3L</term>
/// <term>Locks the tape ejection mechanism so that the tape is not ejected accidentally.</term>
/// </item>
/// <item>
/// <term>TAPE_TENSION2L</term>
/// <term>
/// Adjusts the tension by moving the tape to the end of the tape and back to the beginning. This option is not supported by all devices. This value is
/// ignored if it is not supported.
/// </term>
/// </item>
/// <item>
/// <term>TAPE_UNLOAD1L</term>
/// <term>
/// Moves the tape to the beginning for removal from the device. After a successful unload operation, the device returns errors to applications that
/// attempt to access the tape, until the tape is loaded again.
/// </term>
/// </item>
/// <item>
/// <term>TAPE_UNLOCK4L</term>
/// <term>Unlocks the tape ejection mechanism.</term>
/// </item>
/// </list>
/// </para>
/// </param>
/// <param name="bImmediate">
/// If this parameter is <c>TRUE</c>, the function returns immediately. If it is <c>FALSE</c>, the function does not return until the operation has been completed.
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is NO_ERROR.</para>
/// <para>If the function fails, it can return one of the following error codes.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Error</term>
/// <term>Description</term>
/// </listheader>
/// <item>
/// <term>ERROR_BEGINNING_OF_MEDIA1102L</term>
/// <term>An attempt to access data before the beginning-of-medium marker failed.</term>
/// </item>
/// <item>
/// <term>ERROR_BUS_RESET1111L</term>
/// <term>A reset condition was detected on the bus.</term>
/// <summary>The <c>SetTapeParameters</c> function either specifies the block size of a tape or configures the tape device.</summary>
/// <param name="hDevice">Handle to the device for which to set configuration information. This handle is created by using the <c>CreateFile</c> function.</param>
/// <param name="dwOperation">
/// <para>Type of information to set. This parameter must be one of the following values.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>SET_TAPE_DRIVE_INFORMATION1L</term>
/// <term>Sets the device-specific information specified by lpTapeInformation.</term>
/// </item>
/// <item>
/// <term>SET_TAPE_MEDIA_INFORMATION0L</term>
/// <term>Sets the tape-specific information specified by the lpTapeInformation parameter.</term>
/// </item>
/// </list>
/// </para>
/// </param>
/// <param name="lpTapeInformation">
/// <para>
/// Pointer to a structure that contains the information to set. If the dwOperation parameter is SET_TAPE_MEDIA_INFORMATION, lpTapeInformation points to
/// a <c>TAPE_SET_MEDIA_PARAMETERS</c> structure.
/// </para>
/// <para>If dwOperation is SET_TAPE_DRIVE_INFORMATION, lpTapeInformation points to a <c>TAPE_SET_DRIVE_PARAMETERS</c> structure.</para>
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is NO_ERROR.</para>
/// <para>If the function fails, it can return one of the following error codes.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Error</term>
/// <term>Description</term>
/// </listheader>
/// <item>
/// <term>ERROR_BEGINNING_OF_MEDIA1102L</term>
/// <term>An attempt to access data before the beginning-of-medium marker failed.</term>
/// </item>
/// <item>
/// <term>ERROR_BUS_RESET1111L</term>
/// <term>A reset condition was detected on the bus.</term>
/// <summary>The <c>SetTapePosition</c> function sets the tape position on the specified device.</summary>
/// <param name="hDevice">Handle to the device on which to set the tape position. This handle is created by using the <c>CreateFile</c> function.</param>
/// <param name="dwPositionMethod">
/// <para>Type of positioning to perform. This parameter must be one of the following values.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>TAPE_ABSOLUTE_BLOCK1L</term>
/// <term>
/// Moves the tape to the device-specific block address specified by the dwOffsetLow and dwOffsetHigh parameters. The dwPartition parameter is ignored.
/// </term>
/// </item>
/// <item>
/// <term>TAPE_LOGICAL_BLOCK2L</term>
/// <term>Moves the tape to the block address specified by dwOffsetLow and dwOffsetHigh in the partition specified by dwPartition.</term>
/// </item>
/// <item>
/// <term>TAPE_REWIND0L</term>
/// <term>Moves the tape to the beginning of the current partition. The dwPartition, dwOffsetLow, and dwOffsetHigh parameters are ignored.</term>
/// </item>
/// <item>
/// <term>TAPE_SPACE_END_OF_DATA4L</term>
/// <term>Moves the tape to the end of the data on the partition specified by dwPartition.</term>
/// </item>
/// <item>
/// <term>TAPE_SPACE_FILEMARKS6L</term>
/// <term>
/// Moves the tape forward (or backward) the number of filemarks specified by dwOffsetLow and dwOffsetHigh in the current partition. The dwPartition
/// parameter is ignored.
/// </term>
/// </item>
/// <item>
/// <term>TAPE_SPACE_RELATIVE_BLOCKS5L</term>
/// <term>
/// Moves the tape forward (or backward) the number of blocks specified by dwOffsetLow and dwOffsetHigh in the current partition. The dwPartition
/// parameter is ignored.
/// </term>
/// </item>
/// <item>
/// <term>TAPE_SPACE_SEQUENTIAL_FMKS7L</term>
/// <term>
/// Moves the tape forward (or backward) to the first occurrence of n filemarks in the current partition, where n is the number specified by dwOffsetLow
/// and dwOffsetHigh. The dwPartition parameter is ignored.
/// </term>
/// </item>
/// <item>
/// <term>TAPE_SPACE_SEQUENTIAL_SMKS9L</term>
/// <term>
/// Moves the tape forward (or backward) to the first occurrence of n setmarks in the current partition, where n is the number specified by dwOffsetLow
/// and dwOffsetHigh. The dwPartition parameter is ignored.
/// </term>
/// </item>
/// <item>
/// <term>TAPE_SPACE_SETMARKS8L</term>
/// <term>
/// Moves the tape forward (or backward) the number of setmarks specified by dwOffsetLow and dwOffsetHigh in the current partition. The dwPartition
/// parameter is ignored.
/// </term>
/// </item>
/// </list>
/// </para>
/// </param>
/// <param name="dwPartition">
/// Partition to position within. If dwPartition is zero, the current partition is used. Partitions are numbered logically from 1 through n, where 1 is
/// the first partition on the tape and n is the last.
/// </param>
/// <param name="dwOffsetLow">Low-order bits of the block address or count for the position operation specified by the dwPositionMethod parameter.</param>
/// <param name="dwOffsetHigh">
/// High-order bits of the block address or count for the position operation specified by the dwPositionMethod parameter. If the high-order bits are not
/// required, this parameter should be zero.
/// </param>
/// <param name="bImmediate">
/// Indicates whether to return as soon as the move operation begins. If this parameter is <c>TRUE</c>, the function returns immediately; if
/// <c>FALSE</c>, the function does not return until the move operation has been completed.
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is NO_ERROR.</para>
/// <para>If the function fails, it can return one of the following error codes.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Error</term>
/// <term>Description</term>
/// </listheader>
/// <item>
/// <term>ERROR_BEGINNING_OF_MEDIA1102L</term>
/// <term>An attempt to access data before the beginning-of-medium marker failed.</term>
/// </item>
/// <item>
/// <term>ERROR_BUS_RESET1111L</term>
/// <term>A reset condition was detected on the bus.</term>
/// The <c>WriteTapemark</c> function writes a specified number of filemarks, setmarks, short filemarks, or long filemarks to a tape device. These
/// tapemarks divide a tape partition into smaller areas.
/// </summary>
/// <param name="hDevice">Handle to the device on which to write tapemarks. This handle is created by using the <c>CreateFile</c> function.</param>
/// <param name="dwTapemarkType">
/// <para>Type of tapemarks to write. This parameter can be one of the following values.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>TAPE_FILEMARKS1L</term>
/// <term>Writes the number of filemarks specified by the dwTapemarkCount parameter.</term>
/// </item>
/// <item>
/// <term>TAPE_LONG_FILEMARKS3L</term>
/// <term>Writes the number of long filemarks specified by dwTapemarkCount.</term>
/// </item>
/// <item>
/// <term>TAPE_SETMARKS0L</term>
/// <term>Writes the number of setmarks specified by dwTapemarkCount.</term>
/// </item>
/// <item>
/// <term>TAPE_SHORT_FILEMARKS2L</term>
/// <term>Writes the number of short filemarks specified by dwTapemarkCount.</term>
/// </item>
/// </list>
/// </para>
/// </param>
/// <param name="dwTapemarkCount">Number of tapemarks to write.</param>
/// <param name="bImmediate">
/// If this parameter is <c>TRUE</c>, the function returns immediately; if it is <c>FALSE</c>, the function does not return until the operation has been completed.
/// </param>
/// <returns>
/// <para>If the function succeeds, the return value is NO_ERROR.</para>
/// <para>If the function fails, it can return one of the following error codes.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Error</term>
/// <term>Description</term>
/// </listheader>
/// <item>
/// <term>ERROR_BEGINNING_OF_MEDIA1102L</term>
/// <term>An attempt to access data before the beginning-of-medium marker failed.</term>
/// </item>
/// <item>
/// <term>ERROR_BUS_RESET1111L</term>
/// <term>A reset condition was detected on the bus.</term>