ReactOS  0.4.14-dev-1007-g90d795b
compress.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: File Management IFS Utility functions
4  * FILE: reactos/dll/win32/fmifs/compress.c
5  * PURPOSE: Volume compression
6  *
7  * PROGRAMMERS: Emanuele Aliberti
8  */
9 
10 #include "precomp.h"
11 
12 /*
13  * @implemented
14  */
15 BOOLEAN
16 NTAPI
18  IN PWCHAR DriveRoot,
19  IN USHORT Compression)
20 {
21  HANDLE hFile;
22  DWORD RetBytes;
23  BOOL Ret;
24 
25  hFile = CreateFileW(DriveRoot,
28  NULL,
31  NULL);
33  return FALSE;
34 
35  Ret = DeviceIoControl(hFile,
37  &Compression,
38  sizeof(USHORT),
39  NULL,
40  0,
41  &RetBytes,
42  NULL);
43 
45 
46  return (Ret != 0);
47 }
48 
49 /* EOF */
#define IN
Definition: typedefs.h:39
#define CloseHandle
Definition: compat.h:406
#define FSCTL_SET_COMPRESSION
Definition: nt_native.h:842
#define INVALID_HANDLE_VALUE
Definition: compat.h:399
uint16_t * PWCHAR
Definition: typedefs.h:55
#define FILE_SHARE_WRITE
Definition: nt_native.h:681
#define FILE_SHARE_READ
Definition: compat.h:125
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
unsigned int BOOL
Definition: ntddk_ex.h:94
#define FILE_READ_DATA
Definition: nt_native.h:628
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
#define FILE_WRITE_DATA
Definition: nt_native.h:631
#define OPEN_EXISTING
Definition: compat.h:434
unsigned long DWORD
Definition: ntddk_ex.h:95
_In_ HANDLE hFile
Definition: mswsock.h:90
BOOL WINAPI DeviceIoControl(IN HANDLE hDevice, IN DWORD dwIoControlCode, IN LPVOID lpInBuffer OPTIONAL, IN DWORD nInBufferSize OPTIONAL, OUT LPVOID lpOutBuffer OPTIONAL, IN DWORD nOutBufferSize OPTIONAL, OUT LPDWORD lpBytesReturned OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: deviceio.c:136
unsigned short USHORT
Definition: pedump.c:61
BOOLEAN NTAPI EnableVolumeCompression(IN PWCHAR DriveRoot, IN USHORT Compression)
Definition: compress.c:17
#define CreateFileW
Definition: compat.h:408
#define FILE_FLAG_BACKUP_SEMANTICS
Definition: disk.h:41