/* INCLUDES *****************************************************************/
-#include <ddk/ntddk.h>
-#include <windows.h>
-#include <wchar.h>
-#include <string.h>
+#include <k32.h>
#define NDEBUG
#include <kernel32/kernel32.h>
-#include <kernel32/error.h>
-
-#define LPPROGRESS_ROUTINE void*
/* GLOBALS ******************************************************************/
{
CloseHandle(hFile);
SetLastErrorByStatus(errCode);
- return 0;
+ return INVALID_FILE_SIZE;
}
CloseHandle(hFile);
- return 0;
+
+ if(lpFileSizeHigh)
+ *lpFileSizeHigh = FileCompression.CompressedFileSize.u.HighPart;
+
+ return FileCompression.CompressedFileSize.u.LowPart;
}
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL);
+ if (INVALID_HANDLE_VALUE == hFile)
+ {
+ DPRINT("SetFileAttributes CreateFileW failed with code %d\n", GetLastError());
+ return FALSE;
+ }
errCode = NtQueryInformationFile(hFile,
&IoStatusBlock,
if (!NT_SUCCESS(errCode))
{
CloseHandle(hFile);
+ DPRINT("SetFileAttributes NtQueryInformationFile failed with status 0x%08x\n", errCode);
SetLastErrorByStatus(errCode);
return FALSE;
}
if (!NT_SUCCESS(errCode))
{
CloseHandle(hFile);
+ DPRINT("SetFileAttributes NtSetInformationFile failed with status 0x%08x\n", errCode);
SetLastErrorByStatus(errCode);
return FALSE;
}