diff --git a/reactos/lib/fmifs/compress.c b/reactos/lib/fmifs/compress.c index c07e7e57484..66b2e807332 100644 --- a/reactos/lib/fmifs/compress.c +++ b/reactos/lib/fmifs/compress.c @@ -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 +#include #include -/* 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; } diff --git a/reactos/lib/fmifs/format.c b/reactos/lib/fmifs/format.c index 667b6899a9d..221a25283f7 100644 --- a/reactos/lib/fmifs/format.c +++ b/reactos/lib/fmifs/format.c @@ -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 +#include #include #include #include diff --git a/reactos/lib/fmifs/makefile b/reactos/lib/fmifs/makefile index 7038f4ae836..dcb8a0f887f 100644 --- a/reactos/lib/fmifs/makefile +++ b/reactos/lib/fmifs/makefile @@ -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_BASE = $(TARGET_BASE_LIB_FMIFS) 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