Authors: Chris Morgan <cmorgan@wpi.edu>, James Abbatiello <abbeyj@wpi.edu>
Added stubs for the WinNT tape backup functions.

diff --git a/files/Makefile.in b/files/Makefile.in
index 6b2e3ff..0bf5442 100644
--- a/files/Makefile.in
+++ b/files/Makefile.in
@@ -13,7 +13,8 @@
 	dos_fs.c \
 	drive.c \
 	file.c \
-	profile.c
+	profile.c \
+	tape.c
 
 all: $(MODULE).o
 
diff --git a/files/tape.c b/files/tape.c
new file mode 100644
index 0000000..53c67d5
--- /dev/null
+++ b/files/tape.c
@@ -0,0 +1,195 @@
+/*
+ * Tape handling functions
+ *
+ * Copyright 1999 Chris Morgan <cmorgan@wpi.edu>
+ *                James Abbatiello <abbeyj@wpi.edu>
+ *
+ * TODO: 
+ *    Everything, all functions are stubs.
+ */
+
+#include "winbase.h"
+#include "winerror.h"
+#include "debugtools.h"
+
+DEFAULT_DEBUG_CHANNEL(tape)
+
+
+/************************************************************************
+ *		BackupRead  (KERNEL32.107)
+ */
+BOOL BackupRead( HANDLE hFile, LPBYTE lpBuffer, DWORD nNumberOfBytesToRead,
+		LPDWORD lpNumberOfBytesRead, BOOL bAbort,
+		BOOL bProcessSecurity, LPVOID *lpContext )
+{
+  FIXME("(%04x, %p, %d, %p, %d, %d, %p) stub!\n", hFile, lpBuffer,
+    nNumberOfBytesToRead, lpNumberOfBytesRead, bAbort, bProcessSecurity,
+    lpContext);
+    
+  SetLastError( ERROR_NOT_SUPPORTED );
+
+  return FALSE;
+}
+
+
+/************************************************************************
+ *		BackupSeek  (KERNEL32.108)
+ */
+BOOL BackupSeek( HANDLE hFile, DWORD dwLowBytesToSeek, DWORD dwHighBytesToSeek,
+         	LPDWORD lpdwLowByteSeeked, LPDWORD lpdwHighByteSeeked,
+		LPVOID *lpContext )
+{
+  FIXME("(%04x, %d, %d, %p, %p, %p) stub!\n", hFile, dwLowBytesToSeek,
+    dwHighBytesToSeek, lpdwLowByteSeeked, lpdwHighByteSeeked, lpContext);
+
+  SetLastError( ERROR_NOT_SUPPORTED );
+
+  return FALSE;  
+}  
+
+
+/************************************************************************
+ *		BackupWrite  (KERNEL32.109)
+ */
+BOOL BackupWrite( HANDLE hFile, LPBYTE lpBuffer, DWORD nNumberOfBytesToWrite,
+		LPDWORD lpNumberOfBytesWritten, BOOL bAbort,
+		BOOL bProcessSecurity, LPVOID *lpContext )
+{
+  FIXME("(%04x, %p, %d, %p, %d, %d, %p) stub!\n", hFile, lpBuffer,
+    nNumberOfBytesToWrite, lpNumberOfBytesWritten, bAbort,
+    bProcessSecurity, lpContext);
+
+  SetLastError( ERROR_NOT_SUPPORTED );
+
+  return FALSE;
+}
+
+
+/************************************************************************
+ *		CreateTapePartition  (KERNEL32.177)
+ */
+DWORD CreateTapePartition( HANDLE hDevice, DWORD dwPartitionMethod,
+			DWORD dwCount, DWORD dwSize )
+{
+  FIXME("(%04x, %d, %d, %d) stub!\n", hDevice, dwPartitionMethod, dwCount,
+    dwSize);
+
+  SetLastError( ERROR_NOT_SUPPORTED );
+
+  return FALSE;
+}
+
+
+/************************************************************************
+ *		EraseTape  (KERNEL32.212)
+ */
+DWORD EraseTape( HANDLE hDevice, DWORD dwEraseType, BOOL bImmediate )
+{
+  FIXME("(%04x, %d, %d) stub!\n", hDevice, dwEraseType, bImmediate);
+
+  SetLastError( ERROR_NOT_SUPPORTED );
+
+  return FALSE;
+}
+
+
+/************************************************************************
+ *		GetTapeParameters  (KERNEL32.409)
+ */
+DWORD GetTapeParameters( HANDLE hDevice, DWORD dwOperation,
+			LPDWORD lpdwSize, LPVOID lpTapeInformation )
+{
+  FIXME("(%04x, %d, %p, %p) stub!\n", hDevice, dwOperation, lpdwSize,
+    lpTapeInformation);
+
+  SetLastError( ERROR_NOT_SUPPORTED );
+
+  return FALSE;
+}
+
+
+/************************************************************************
+ *		GetTapePosition  (KERNEL32.410)
+ */
+DWORD GetTapePosition( HANDLE hDevice, DWORD dwPositionType,
+			LPDWORD lpdwPartition, LPDWORD lpdwOffsetLow,
+			LPDWORD lpdwOffsetHigh )
+{ 
+  FIXME("(%04x, %d, %p, %p, %p) stub!\n", hDevice, dwPositionType,
+    lpdwPartition, lpdwOffsetLow, lpdwOffsetHigh);
+
+  SetLastError( ERROR_NOT_SUPPORTED );
+
+  return FALSE;
+}
+
+
+/************************************************************************
+ *		GetTapeStatus  (KERNEL32.411)
+ */
+DWORD GetTapeStatus( HANDLE hDevice )
+{
+  FIXME("(%04x) stub!\n", hDevice);
+
+  SetLastError( ERROR_NOT_SUPPORTED );
+
+  return FALSE;
+}
+
+
+/************************************************************************
+ *		PrepareTape  (KERNEL32.554)
+ */
+DWORD PrepareTape( HANDLE hDevice,  DWORD dwOperation,  BOOL bImmediate )
+{ 
+  FIXME("(%04x, %d, %d) stub!\n", hDevice, dwOperation, bImmediate);
+
+  SetLastError( ERROR_NOT_SUPPORTED );
+
+  return FALSE;
+}
+
+
+/************************************************************************
+ *		SetTapeParameters  (KERNEL32.667)
+ */
+DWORD SetTapeParameters( HANDLE hDevice, DWORD dwOperation,
+                         LPVOID lpTapeInformation )
+{
+  FIXME("(%04x, %d, %p) stub!\n", hDevice, dwOperation, lpTapeInformation);
+
+  SetLastError( ERROR_NOT_SUPPORTED );
+
+  return FALSE;
+}
+
+
+/************************************************************************
+ *		SetTapePosition  (KERNEL32.668)
+ */
+DWORD SetTapePosition( HANDLE hDevice, DWORD dwPositionMethod, DWORD
+                       dwPartition, DWORD dwOffsetLow, DWORD dwOffsetHigh,
+                       BOOL bImmediate )
+{
+  FIXME("(%04x, %d, %d, %d, %d, %d) stub!\n", hDevice, dwPositionMethod,
+    dwPartition, dwOffsetLow, dwOffsetHigh, bImmediate);
+
+  SetLastError( ERROR_NOT_SUPPORTED );
+
+  return FALSE;
+}
+
+
+/************************************************************************
+ *		WriteTapemark  (KERNEL32.751)
+ */
+DWORD WriteTapemark( HANDLE hDevice,  DWORD dwTapemarkType, DWORD
+                     dwTapemarkCount, BOOL bImmediate )
+{
+  FIXME("(%04x, %d, %d, %d) stub!\n", hDevice, dwTapemarkType,
+    dwTapemarkCount, bImmediate);
+
+  SetLastError( ERROR_NOT_SUPPORTED );
+
+  return FALSE;
+}
\ No newline at end of file
diff --git a/include/debugdefs.h b/include/debugdefs.h
index f92a39e..50250a8 100644
--- a/include/debugdefs.h
+++ b/include/debugdefs.h
@@ -138,36 +138,37 @@
 const int dbch_syscolor = 127;
 const int dbch_system = 128;
 const int dbch_tab = 129;
-const int dbch_tapi = 130;
-const int dbch_task = 131;
-const int dbch_text = 132;
-const int dbch_thread = 133;
-const int dbch_thunk = 134;
-const int dbch_timer = 135;
-const int dbch_toolbar = 136;
-const int dbch_toolhelp = 137;
-const int dbch_tooltips = 138;
-const int dbch_trackbar = 139;
-const int dbch_treeview = 140;
-const int dbch_ttydrv = 141;
-const int dbch_tweak = 142;
-const int dbch_typelib = 143;
-const int dbch_updown = 144;
-const int dbch_ver = 145;
-const int dbch_virtual = 146;
-const int dbch_vxd = 147;
-const int dbch_wave = 148;
-const int dbch_win = 149;
-const int dbch_win16drv = 150;
-const int dbch_win32 = 151;
-const int dbch_wing = 152;
-const int dbch_winsock = 153;
-const int dbch_winspool = 154;
-const int dbch_wnet = 155;
-const int dbch_x11 = 156;
-const int dbch_x11drv = 157;
+const int dbch_tape = 130;
+const int dbch_tapi = 131;
+const int dbch_task = 132;
+const int dbch_text = 133;
+const int dbch_thread = 134;
+const int dbch_thunk = 135;
+const int dbch_timer = 136;
+const int dbch_toolbar = 137;
+const int dbch_toolhelp = 138;
+const int dbch_tooltips = 139;
+const int dbch_trackbar = 140;
+const int dbch_treeview = 141;
+const int dbch_ttydrv = 142;
+const int dbch_tweak = 143;
+const int dbch_typelib = 144;
+const int dbch_updown = 145;
+const int dbch_ver = 146;
+const int dbch_virtual = 147;
+const int dbch_vxd = 148;
+const int dbch_wave = 149;
+const int dbch_win = 150;
+const int dbch_win16drv = 151;
+const int dbch_win32 = 152;
+const int dbch_wing = 153;
+const int dbch_winsock = 154;
+const int dbch_winspool = 155;
+const int dbch_wnet = 156;
+const int dbch_x11 = 157;
+const int dbch_x11drv = 158;
 
-#define DEBUG_CHANNEL_COUNT 158
+#define DEBUG_CHANNEL_COUNT 159
 
 char __debug_msg_enabled[DEBUG_CHANNEL_COUNT][DEBUG_CLASS_COUNT] = {
 {1, 1, 0, 0},
@@ -327,6 +328,7 @@
 {1, 1, 0, 0},
 {1, 1, 0, 0},
 {1, 1, 0, 0},
+{1, 1, 0, 0},
 {1, 1, 0, 0}
 };
 
@@ -461,6 +463,7 @@
 "syscolor",
 "system",
 "tab",
+"tape",
 "tapi",
 "task",
 "text",
diff --git a/relay32/kernel32.spec b/relay32/kernel32.spec
index 7e90ef8..09047c3 100644
--- a/relay32/kernel32.spec
+++ b/relay32/kernel32.spec
@@ -122,9 +122,9 @@
 104 stub AllocLSCallback
 105 stdcall AllocSLCallback(ptr ptr) AllocSLCallback
 106 stdcall AreFileApisANSI() AreFileApisANSI
-107 stub BackupRead
-108 stub BackupSeek
-109 stub BackupWrite
+107 stdcall BackupRead(ptr ptr long ptr long long ptr) BackupRead
+108 stdcall BackupSeek(ptr long long ptr ptr ptr) BackupSeek
+109 stdcall BackupWrite(ptr ptr long ptr long long ptr) BackupWrite
 110 stdcall Beep(long long) Beep
 111 stub BeginUpdateResourceA
 112 stub BeginUpdateResourceW
@@ -227,7 +227,7 @@
 209 stdcall EnumSystemLocalesW(ptr long) EnumSystemLocalesW
 210 stdcall EnumTimeFormatsA(ptr long long) EnumTimeFormatsA
 211 stdcall EnumTimeFormatsW(ptr long long) EnumTimeFormatsW
-212 stub EraseTape
+212 stdcall EraseTape(ptr long long) EraseTape
 213 stdcall EscapeCommFunction(long long) EscapeCommFunction
 214 stdcall ExitProcess(long) ExitProcess
 215 stdcall ExitThread(long) ExitThread
@@ -424,9 +424,9 @@
 406 stdcall GetSystemTime(ptr) GetSystemTime
 407 stub GetSystemTimeAdjustment
 408 stdcall GetSystemTimeAsFileTime(ptr) GetSystemTimeAsFileTime
-409 stub GetTapeParameters
-410 stub GetTapePosition
-411 stub GetTapeStatus
+409 stdcall GetTapeParameters(ptr long ptr ptr) GetTapeParameters
+410 stdcall GetTapePosition(ptr long ptr ptr ptr) GetTapePosition
+411 stdcall GetTapeStatus(ptr) GetTapeStatus
 412 stdcall GetTempFileNameA(str str long ptr) GetTempFileNameA
 413 stdcall GetTempFileNameW(wstr wstr long ptr) GetTempFileNameW
 414 stdcall GetTempPathA(long ptr) GetTempPathA
@@ -569,7 +569,7 @@
 551 stdcall PeekConsoleInputW(ptr ptr long ptr) PeekConsoleInputW
 552 stub PeekNamedPipe
 553 stub PostQueuedCompletionStatus
-554 stub PrepareTape
+554 stdcall PrepareTape(ptr long long) PrepareTape
 555 stdcall Process32First (ptr ptr) Process32First
 556 stdcall Process32Next (ptr ptr) Process32Next
 557 stdcall PulseEvent(long) PulseEvent
@@ -682,8 +682,8 @@
 664 stdcall SetSystemPowerState(long long) SetSystemPowerState
 665 stdcall SetSystemTime(ptr) SetSystemTime
 666 stub SetSystemTimeAdjustment
-667 stub SetTapeParameters
-668 stub SetTapePosition
+667 stdcall SetTapeParemeters(ptr long ptr) SetTapeParameters
+668 stdcall SetTapePosition(ptr long long long long long) SetTapePosition
 669 stdcall SetThreadAffinityMask(long long) SetThreadAffinityMask
 670 stdcall SetThreadContext(long ptr) SetThreadContext
 671 stdcall SetThreadLocale(long) SetThreadLocale
@@ -766,7 +766,7 @@
 748 stdcall WriteProfileSectionW(str str) WriteProfileSectionW
 749 stdcall WriteProfileStringA(str str str) WriteProfileStringA
 750 stdcall WriteProfileStringW(wstr wstr wstr) WriteProfileStringW
-751 stub WriteTapemark
+751 stdcall WriteTapemark(ptr long long long) WriteTapemark
 752 stub _DebugOut
 753 stub _DebugPrintf
 754 stdcall _hread(long ptr long) _hread