--- truecrypt/common/tcdefs.h 2018/04/24 17:02:08 1.1.1.23 +++ truecrypt/common/tcdefs.h 2018/04/24 17:08:02 1.1.1.26 @@ -3,11 +3,11 @@ derived from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses'. Modifications and additions to - the original source code (contained in this file) and all other portions of - this file are Copyright (c) 2003-2009 TrueCrypt Foundation and are governed - by the TrueCrypt License 2.7 the full text of which is contained in the - file License.txt included in TrueCrypt binary and source code distribution - packages. */ + the original source code (contained in this file) and all other portions + of this file are Copyright (c) 2003-2010 TrueCrypt Developers Association + and are governed by the TrueCrypt License 3.0 the full text of which is + contained in the file License.txt included in TrueCrypt binary and source + code distribution packages. */ #ifndef TCDEFS_H #define TCDEFS_H @@ -15,16 +15,15 @@ #define TC_APP_NAME "TrueCrypt" // Version displayed to user -#define VERSION_STRING "6.2a" +#define VERSION_STRING "7.0" // Version number to compare against driver -#define VERSION_NUM 0x062a +#define VERSION_NUM 0x0700 -// Sector size of encrypted filesystem, which may differ from sector size of host filesystem/device -#define SECTOR_SIZE 512 - -// "Second generation standard" sector size -#define SECTOR_SIZE_GEN2_STANDARD 4096 +// Release date +#define TC_STR_RELEASE_DATE "July 19, 2010" +#define TC_RELEASE_DATE_YEAR 2010 +#define TC_RELEASE_DATE_MONTH 7 #define BYTES_PER_KB 1024LL #define BYTES_PER_MB 1048576LL @@ -116,47 +115,24 @@ typedef union } UINT64_STRUCT; #ifdef TC_WINDOWS_BOOT + +# ifdef __cplusplus +extern "C" +# endif +void ThrowFatalException (int line); + # define TC_THROW_FATAL_EXCEPTION ThrowFatalException (__LINE__) -#elif defined (NT4_DRIVER) +#elif defined (TC_WINDOWS_DRIVER) # define TC_THROW_FATAL_EXCEPTION KeBugCheckEx (SECURITY_SYSTEM, __LINE__, 0, 0, 'TC') #else # define TC_THROW_FATAL_EXCEPTION *(char *) 0 = 0 #endif -#ifdef NT4_DRIVER - -#pragma warning( disable : 4201 ) -#pragma warning( disable : 4214 ) -#pragma warning( disable : 4115 ) -#pragma warning( disable : 4100 ) -#pragma warning( disable : 4101 ) -#pragma warning( disable : 4057 ) -#pragma warning( disable : 4244 ) -#pragma warning( disable : 4514 ) -#pragma warning( disable : 4127 ) - +#ifdef TC_WINDOWS_DRIVER #include #include /* Standard header file for nt drivers */ - -#ifndef TC_LOCAL_WIN32_WINNT_OVERRIDE -# undef _WIN32_WINNT -# define _WIN32_WINNT 0x0501 /* Does not apply to user-space apps */ -#endif - #include /* Standard I/O control codes */ -#include - -#pragma warning( default : 4201 ) -#pragma warning( default : 4214 ) -#pragma warning( default : 4115 ) -#pragma warning( default : 4100 ) -#pragma warning( default : 4101 ) -#pragma warning( default : 4057 ) -#pragma warning( default : 4244 ) -#pragma warning( default : 4127 ) - -/* #pragma warning( default : 4514 ) this warning remains disabled */ #define TCalloc(size) ((void *) ExAllocatePoolWithTag( NonPagedPool, size, 'MMCT' )) #define TCfree(memblock) ExFreePoolWithTag( memblock, 'MMCT' ) @@ -175,33 +151,13 @@ typedef int BOOL; #define FALSE !TRUE #endif -/* Define dummies for the drivers */ -typedef int HFILE; -typedef unsigned int WPARAM; -typedef unsigned __int32 LPARAM; -#define CALLBACK - -#ifndef UINT -typedef unsigned int UINT; -#endif - -#ifndef LRESULT -typedef unsigned __int32 LRESULT; -#endif -/* NT4_DRIVER */ - -#else +#else /* !TC_WINDOWS_DRIVER */ #define TCalloc malloc #define TCfree free #ifdef _WIN32 -#pragma warning( disable : 4201 ) -#pragma warning( disable : 4214 ) -#pragma warning( disable : 4115 ) -#pragma warning( disable : 4514 ) - #ifndef TC_LOCAL_WIN32_WINNT_OVERRIDE # undef _WIN32_WINNT # define _WIN32_WINNT 0x0501 /* Does not apply to the driver */ @@ -213,19 +169,9 @@ typedef unsigned __int32 LRESULT; #include #include /* For sprintf */ -#pragma warning( default : 4201 ) -#pragma warning( default : 4214 ) -#pragma warning( default : 4115 ) - -/* #pragma warning( default : 4514 ) this warning remains disabled */ - -/* This is needed to fix a bug with VC 5, the TCHAR macro _ttoi64 maps - incorrectly to atoLL when it should be _atoi64 */ -#define atoi64 _atoi64 - #endif /* _WIN32 */ -#endif /* NT4_DRIVER */ +#endif /* !TC_WINDOWS_DRIVER */ #ifndef TC_TO_STRING # define TC_TO_STRING2(n) #n @@ -241,8 +187,8 @@ typedef unsigned __int32 LRESULT; # endif # define DumpMem(...) DumpMemory (__VA_ARGS__) # else -# define Dump(...) ((void) 0) -# define DumpMem(...) ((void) 0) +# define Dump(...) +# define DumpMem(...) # endif #endif @@ -285,6 +231,12 @@ typedef unsigned __int32 LRESULT; # ifndef max # define max(a,b) (((a) > (b)) ? (a) : (b)) # endif + +# ifdef __cplusplus +extern "C" +# endif +void EraseMemory (void *memory, int size); + # undef burn # define burn EraseMemory #endif @@ -295,6 +247,8 @@ typedef unsigned __int32 LRESULT; #define TC_MAX_PATH 260 /* Includes the null terminator */ #endif +#define TC_STR_RELEASED_BY "Released by TrueCrypt Foundation on " TC_STR_RELEASE_DATE + #define MAX_URL_LENGTH 2084 /* Internet Explorer limit. Includes the terminating null character. */ #define TC_HOMEPAGE "http://www.truecrypt.org/"