diff -u -r dlls/msvcrt/file.c ../dlls/msvcrt/file.c
--- dlls/msvcrt/file.c	Tue Jan 22 11:57:16 2002
+++ ../dlls/msvcrt/file.c	Thu Feb 28 11:36:45 2002
@@ -235,6 +235,26 @@
 }
 
 /*********************************************************************
+ *		_chsize (MSVCRT.@)
+ */
+int _chsize(int fd, long size)
+{
+  HANDLE hand = msvcrt_fdtoh(fd);
+
+  TRACE(":fd (%d) handle (%d) size (%d)\n",fd,hand,size);
+  if (hand == INVALID_HANDLE_VALUE)
+    return -1;
+
+  if (!FILE_truncate(hand, size)) {
+  	TRACE("EOF\n");
+	return 0;
+  }
+
+  TRACE(":failed-last error (%ld)\n", GetLastError());
+  return -1;
+}
+
+/*********************************************************************
  *		_chmod (MSVCRT.@)
  */
 int _chmod(const char *path, int flags)
diff -u -r dlls/msvcrt/msvcrt.spec ../dlls/msvcrt/msvcrt.spec
--- dlls/msvcrt/msvcrt.spec	Tue Jan  8 08:16:46 2002
+++ ../dlls/msvcrt/msvcrt.spec	Thu Feb 28 11:37:34 2002
@@ -185,7 +185,7 @@
 @ cdecl _chgsign( double ) _chgsign
 @ cdecl -noimport -i386 _chkesp() _chkesp
 @ cdecl _chmod(str long) _chmod
-@ stub _chsize #(long long)
+@ cdecl _chsize(long long) _chsize
 @ cdecl _clearfp() _clearfp
 @ cdecl _close(long) _close
 @ cdecl _commit(long) _commit
diff -u -r files/file.c ../files/file.c
--- files/file.c	Tue Jan 22 04:37:24 2002
+++ ../files/file.c	Thu Feb 28 11:40:21 2002
@@ -87,6 +87,23 @@
 }
 
 
+/**************************************************************************
+ *           FILE_truncate
+ */
+int FILE_truncate( HANDLE hFile, long size )
+{
+    int	ret;
+    SERVER_START_REQ( truncate_file )
+    {
+        req->handle = hFile;
+	req->size = size;
+        ret = !wine_server_call_err( req );
+    }
+    SERVER_END_REQ;
+    return ret;
+}
+
+
 /***********************************************************************
  *              FILE_strcasecmp
  *
@@ -2022,14 +2039,7 @@
  */
 BOOL WINAPI SetEndOfFile( HANDLE hFile )
 {
-    BOOL ret;
-    SERVER_START_REQ( truncate_file )
-    {
-        req->handle = hFile;
-        ret = !wine_server_call_err( req );
-    }
-    SERVER_END_REQ;
-    return ret;
+    return FILE_truncate(hFile, 0);
 }
 
 
diff -u -r graphics/painting.c ../graphics/painting.c
--- graphics/painting.c	Tue Sep 11 10:32:33 2001
+++ ../graphics/painting.c	Thu Feb 28 11:42:59 2002
@@ -101,6 +101,11 @@
     return ret;
 }
 
+BOOL WINAPI MoveTo(HDC hdc, INT x, INT y)
+{
+	return MoveToEx(hdc, x, y, 0);
+}
+
 
 /***********************************************************************
  *           Arc    (GDI.23)
diff -u -r include/file.h ../include/file.h
--- include/file.h	Sun Jan 13 12:44:00 2002
+++ ../include/file.h	Thu Feb 28 11:32:10 2002
@@ -70,6 +70,7 @@
 }
 
 /* files/file.c */
+extern int FILE_truncate( HANDLE handle, long size);
 extern int FILE_strcasecmp( const char *str1, const char *str2 );
 extern int FILE_strncasecmp( const char *str1, const char *str2, int len );
 extern void FILE_SetDosError(void);
diff -u -r include/wine/server_protocol.h ../include/wine/server_protocol.h
--- include/wine/server_protocol.h	Thu Jan 10 08:16:24 2002
+++ ../include/wine/server_protocol.h	Thu Feb 28 11:23:30 2002
@@ -764,6 +764,7 @@
 {
     struct request_header __header;
     handle_t     handle;
+    long	 size;
 };
 struct truncate_file_reply
 {
diff -u -r include/wingdi.h ../include/wingdi.h
--- include/wingdi.h	Sat Nov 24 05:44:44 2001
+++ ../include/wingdi.h	Thu Feb 28 09:54:22 2002
@@ -3233,6 +3233,7 @@
 BOOL      WINAPI MaskBlt(HDC,INT,INT,INT,INT,HDC,INT,INT,HBITMAP,INT,INT,DWORD);
 BOOL      WINAPI ModifyWorldTransform(HDC,const XFORM *, DWORD);
 BOOL      WINAPI MoveToEx(HDC,INT,INT,LPPOINT);
+BOOL      WINAPI MoveTo(HDC,INT,INT);
 /* FIXME This is defined in kernel32.spec !?*/
 INT       WINAPI MulDiv(INT,INT,INT);
 INT       WINAPI OffsetClipRgn(HDC,INT,INT);
diff -u -r server/file.c ../server/file.c
--- server/file.c	Thu Jan 10 07:30:52 2002
+++ ../server/file.c	Thu Feb 28 11:26:24 2002
@@ -456,7 +456,7 @@
     return 1;
 }
 
-static int truncate_file( handle_t handle )
+static int truncate_file( handle_t handle , long size)
 {
     struct file *file;
     off_t result;
@@ -464,7 +464,7 @@
     if (!(file = get_file_obj( current->process, handle, GENERIC_WRITE )))
         return 0;
     if (((result = lseek( file->obj.fd, 0, SEEK_CUR )) == -1) ||
-        (ftruncate( file->obj.fd, result ) == -1))
+        (ftruncate( file->obj.fd, size ) == -1))
     {
         file_set_error();
         release_object( file );
@@ -604,7 +604,7 @@
 /* truncate (or extend) a file */
 DECL_HANDLER(truncate_file)
 {
-    truncate_file( req->handle );
+    truncate_file( req->handle , req->size);
 }
 
 /* flush a file buffers */
diff -u -r server/trace.c ../server/trace.c
--- server/trace.c	Thu Jan 10 08:16:24 2002
+++ ../server/trace.c	Thu Feb 28 11:28:10 2002
@@ -742,7 +742,7 @@
 
 static void dump_truncate_file_request( const struct truncate_file_request *req )
 {
-    fprintf( stderr, " handle=%d", req->handle );
+    fprintf( stderr, " handle=%d size=%d", req->handle , req->size);
 }
 
 static void dump_set_file_time_request( const struct set_file_time_request *req )
