ReactOS  0.4.14-dev-384-g5b37caa
compress.c File Reference
#include "precomp.h"
Include dependency graph for compress.c:

Go to the source code of this file.

Functions

BOOLEAN NTAPI EnableVolumeCompression (IN PWCHAR DriveRoot, IN USHORT Compression)
 

Function Documentation

◆ EnableVolumeCompression()

BOOLEAN NTAPI EnableVolumeCompression ( IN PWCHAR  DriveRoot,
IN USHORT  Compression 
)

Definition at line 17 of file compress.c.

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 }
#define CloseHandle
Definition: compat.h:406
#define FSCTL_SET_COMPRESSION
Definition: nt_native.h:842
#define INVALID_HANDLE_VALUE
Definition: compat.h:399
#define FILE_SHARE_WRITE
Definition: nt_native.h:681
#define FILE_SHARE_READ
Definition: compat.h:125
unsigned int BOOL
Definition: ntddk_ex.h:94
#define FILE_READ_DATA
Definition: nt_native.h:628
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
#define CreateFileW
Definition: compat.h:408
#define FILE_FLAG_BACKUP_SEMANTICS
Definition: disk.h:41

Referenced by wmain().