#include <k32.h>
#include <debug.h>
Go to the source code of this file.
|
DWORD WINAPI | BasepDoTapeOperation (IN HANDLE DeviceHandle, IN ULONG Ioctl, IN PVOID Input, IN ULONG InputLength, IN PVOID Output, IN ULONG OutputLength) |
|
DWORD WINAPI | CreateTapePartition (IN HANDLE hDevice, IN DWORD dwPartitionMethod, IN DWORD dwCount, IN DWORD dwSize) |
|
DWORD WINAPI | EraseTape (IN HANDLE hDevice, IN DWORD dwEraseType, IN BOOL bImmediate) |
|
DWORD WINAPI | GetTapeParameters (IN HANDLE hDevice, IN DWORD dwOperation, IN LPDWORD lpdwSize, IN LPVOID lpTapeInformation) |
|
DWORD WINAPI | GetTapePosition (IN HANDLE hDevice, IN DWORD dwPositionType, IN LPDWORD lpdwPartition, IN LPDWORD lpdwOffsetLow, IN LPDWORD lpdwOffsetHigh) |
|
DWORD WINAPI | GetTapeStatus (IN HANDLE hDevice) |
|
DWORD WINAPI | PrepareTape (IN HANDLE hDevice, IN DWORD dwOperation, IN BOOL bImmediate) |
|
DWORD WINAPI | SetTapeParameters (IN HANDLE hDevice, IN DWORD dwOperation, IN LPVOID lpTapeInformation) |
|
DWORD WINAPI | SetTapePosition (IN HANDLE hDevice, IN DWORD dwPositionMethod, IN DWORD dwPartition, IN DWORD dwOffsetLow, IN DWORD dwOffsetHigh, IN BOOL bImmediate) |
|
DWORD WINAPI | WriteTapemark (IN HANDLE hDevice, IN DWORD dwTapemarkType, IN DWORD dwTapemarkCount, IN BOOL bImmediate) |
|
◆ NDEBUG
◆ BasepDoTapeOperation()
Definition at line 21 of file tape.c.
27{
32
33
36
37
39 TapeEvent,
40 0,
41 0,
45 InputLength,
47 OutputLength);
49 {
50
53 }
54
55
58 {
59
62 }
63 else
64 {
65
67 }
68
69
71}
#define NT_SUCCESS(StatCode)
_Must_inspect_result_ __in WDFIOTARGET __in_opt WDFREQUEST __in ULONG Ioctl
_Inout_ PUSB_DEVICE_HANDLE DeviceHandle
static OUT PIO_STATUS_BLOCK IoStatusBlock
_In_ NDIS_ERROR_CODE ErrorCode
NTSYSAPI NTSTATUS NTAPI NtDeviceIoControlFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG DeviceIoControlCode, IN PVOID InBuffer OPTIONAL, IN ULONG InBufferLength, OUT PVOID OutBuffer OPTIONAL, IN ULONG OutBufferLength)
DWORD BaseSetLastNTError(IN NTSTATUS Status)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
DWORD WINAPI GetLastError(void)
Referenced by CreateTapePartition(), EraseTape(), GetTapeParameters(), GetTapePosition(), GetTapeStatus(), PrepareTape(), SetTapeParameters(), SetTapePosition(), and WriteTapemark().
◆ CreateTapePartition()
Definition at line 80 of file tape.c.
84{
86
87 TapeCreatePartition.
Method = dwPartitionMethod;
88 TapeCreatePartition.
Count = dwCount;
92 &TapeCreatePartition,
93 sizeof(TapeCreatePartition),
95 0);
96}
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
#define IOCTL_TAPE_CREATE_PARTITION
DWORD WINAPI BasepDoTapeOperation(IN HANDLE DeviceHandle, IN ULONG Ioctl, IN PVOID Input, IN ULONG InputLength, IN PVOID Output, IN ULONG OutputLength)
◆ EraseTape()
Definition at line 103 of file tape.c.
106{
108
109 TapeErase.
Type = dwEraseType;
113 &TapeErase,
114 sizeof(TapeErase),
116 0);
117}
◆ GetTapeParameters()
Definition at line 124 of file tape.c.
128{
130 {
132 {
135 }
136
140 0,
141 lpTapeInformation,
143 }
145 {
147 {
150 }
151
155 0,
156 lpTapeInformation,
158 }
159
161}
#define ERROR_INVALID_FUNCTION
static DWORD LPSTR PDWORD lpdwSize
#define IOCTL_TAPE_GET_MEDIA_PARAMS
#define IOCTL_TAPE_GET_DRIVE_PARAMS
#define GET_TAPE_DRIVE_INFORMATION
#define GET_TAPE_MEDIA_INFORMATION
struct _TAPE_GET_MEDIA_PARAMETERS TAPE_GET_MEDIA_PARAMETERS
struct _TAPE_GET_DRIVE_PARAMETERS TAPE_GET_DRIVE_PARAMETERS
◆ GetTapePosition()
Definition at line 168 of file tape.c.
173{
176
177 TapeGetPosition.
Type = dwPositionType;
180 &TapeGetPosition,
181 sizeof(TapeGetPosition),
182 &TapeGetPosition,
183 sizeof(TapeGetPosition));
184
186 {
187 *lpdwPartition = 0;
188 *lpdwOffsetLow = 0;
189 *lpdwOffsetHigh = 0;
190 }
191 else
192 {
193 *lpdwPartition = TapeGetPosition.
Partition;
194 *lpdwOffsetLow = TapeGetPosition.
Offset.
u.LowPart;
195 *lpdwOffsetHigh = TapeGetPosition.
Offset.
u.HighPart;
196 }
197
199}
#define IOCTL_TAPE_GET_POSITION
struct _LARGE_INTEGER::@2303 u
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
◆ GetTapeStatus()
Definition at line 206 of file tape.c.
207{
211 0,
213 0);
214}
#define IOCTL_TAPE_GET_STATUS
◆ PrepareTape()
Definition at line 221 of file tape.c.
224{
226
231 &TapePrepare,
232 sizeof(TapePrepare),
234 0);
235}
#define IOCTL_TAPE_PREPARE
◆ SetTapeParameters()
Definition at line 242 of file tape.c.
245{
247 {
250 lpTapeInformation,
253 0);
254 }
256 {
259 lpTapeInformation,
262 0);
263 }
264
266}
#define IOCTL_TAPE_SET_MEDIA_PARAMS
#define IOCTL_TAPE_SET_DRIVE_PARAMS
#define SET_TAPE_MEDIA_INFORMATION
#define SET_TAPE_DRIVE_INFORMATION
◆ SetTapePosition()
Definition at line 273 of file tape.c.
279{
281
282 TapeSetPosition.
Method = dwPositionMethod;
284 TapeSetPosition.
Offset.
u.LowPart = dwOffsetLow;
285 TapeSetPosition.
Offset.
u.HighPart = dwOffsetHigh;
289 &TapeSetPosition,
290 sizeof(TapeSetPosition),
292 0);
293}
#define IOCTL_TAPE_SET_POSITION
◆ WriteTapemark()
Definition at line 300 of file tape.c.
304{
306
307 TapeWriteMarks.
Type = dwTapemarkType;
308 TapeWriteMarks.
Count = dwTapemarkCount;
312 &TapeWriteMarks,
313 sizeof(TapeWriteMarks),
315 0);
316}
#define IOCTL_TAPE_WRITE_MARKS