reactos/lib/fmifs
diff -u -r1.2 -r1.3
--- compress.c 23 Feb 2004 11:55:12 -0000 1.2
+++ compress.c 15 Sep 2004 13:32:26 -0000 1.3
@@ -1,4 +1,4 @@
-/* $Id: compress.c,v 1.2 2004/02/23 11:55:12 ekohl Exp $
+/* $Id: compress.c,v 1.3 2004/09/15 13:32:26 weiden Exp $
*
* COPYING: See the top level directory
* PROJECT: ReactOS
@@ -12,14 +12,42 @@
#define UNICODE
#define _UNICODE
#include <windows.h>
+#include <winioctl.h>
#include <fmifs.h>
-/* FMIFS.4 */
-BOOLEAN STDCALL
+/*
+ * @implemented
+ */
+BOOL STDCALL
EnableVolumeCompression (PWCHAR DriveRoot,
- BOOLEAN Enable)
+ USHORT Compression)
{
+ HANDLE hFile = CreateFileW(DriveRoot,
+ FILE_READ_DATA | FILE_WRITE_DATA,
+ FILE_SHARE_READ | FILE_SHARE_WRITE,
+ NULL,
+ OPEN_EXISTING,
+ FILE_FLAG_BACKUP_SEMANTICS,
+ NULL);
+
+ if(hFile != INVALID_HANDLE_VALUE)
+ {
+ DWORD RetBytes;
+ BOOL Ret = DeviceIoControl(hFile,
+ FSCTL_SET_COMPRESSION,
+ &Compression,
+ sizeof(USHORT),
+ NULL,
+ 0,
+ &RetBytes,
+ NULL);
+
+ CloseHandle(hFile);
+
+ return (Ret != 0);
+ }
+
return FALSE;
}
reactos/lib/fmifs
diff -u -r1.4 -r1.5
--- format.c 23 Feb 2004 11:55:12 -0000 1.4
+++ format.c 15 Sep 2004 13:32:27 -0000 1.5
@@ -1,4 +1,4 @@
-/* $Id: format.c,v 1.4 2004/02/23 11:55:12 ekohl Exp $
+/* $Id: format.c,v 1.5 2004/09/15 13:32:27 weiden Exp $
*
* COPYING: See the top level directory
* PROJECT: ReactOS
@@ -12,6 +12,7 @@
#define UNICODE
#define _UNICODE
#include <windows.h>
+#include <ntddk.h>
#include <fmifs.h>
#include <fslib/vfatlib.h>
#include <string.h>
reactos/lib/fmifs
diff -u -r1.22 -r1.23
--- makefile 29 May 2004 21:24:43 -0000 1.22
+++ makefile 15 Sep 2004 13:32:27 -0000 1.23
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.22 2004/05/29 21:24:43 hbirr Exp $
+# $Id: makefile,v 1.23 2004/09/15 13:32:27 weiden Exp $
PATH_TO_TOP = ../..
@@ -10,7 +10,7 @@
TARGET_ENTRY = _InitializeFmIfs@12
-TARGET_CFLAGS = -fno-builtin -Werror -Wall
+TARGET_CFLAGS = -fno-builtin -Werror -Wall -D__USE_W32API
# require os code to explicitly request A/W version of structs/functions
TARGET_CFLAGS += -D_DISABLE_TIDENTS