Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygencompress.c
Go to the documentation of this file.
00001 /* 00002 * COPYRIGHT: See COPYING in the top level directory 00003 * PROJECT: File Management IFS Utility functions 00004 * FILE: reactos/dll/win32/fmifs/compress.c 00005 * PURPOSE: Volume compression 00006 * 00007 * PROGRAMMERS: Emanuele Aliberti 00008 */ 00009 00010 #include "precomp.h" 00011 00012 /* 00013 * @implemented 00014 */ 00015 BOOLEAN NTAPI 00016 EnableVolumeCompression( 00017 IN PWCHAR DriveRoot, 00018 IN USHORT Compression) 00019 { 00020 HANDLE hFile; 00021 DWORD RetBytes; 00022 BOOL Ret; 00023 00024 hFile = CreateFileW( 00025 DriveRoot, 00026 FILE_READ_DATA | FILE_WRITE_DATA, 00027 FILE_SHARE_READ | FILE_SHARE_WRITE, 00028 NULL, 00029 OPEN_EXISTING, 00030 FILE_FLAG_BACKUP_SEMANTICS, 00031 NULL); 00032 00033 if (hFile == INVALID_HANDLE_VALUE) 00034 return FALSE; 00035 00036 Ret = DeviceIoControl( 00037 hFile, 00038 FSCTL_SET_COMPRESSION, 00039 &Compression, 00040 sizeof(USHORT), 00041 NULL, 00042 0, 00043 &RetBytes, 00044 NULL); 00045 00046 CloseHandle(hFile); 00047 00048 return (Ret != 0); 00049 } 00050 00051 /* EOF */ Generated on Fri May 25 2012 04:21:34 for ReactOS by
1.7.6.1
|