diff --git a/project/vc2008_mfc/VBA2008.vcproj b/project/vc2008_mfc/VBA2008.vcproj index 2812d4dc..918f20fc 100644 --- a/project/vc2008_mfc/VBA2008.vcproj +++ b/project/vc2008_mfc/VBA2008.vcproj @@ -24,7 +24,7 @@ OutputDirectory="$(ProjectDir)$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="$(ProjectDir)$(PlatformName)\$(ConfigurationName)_temp" ConfigurationType="1" - UseOfMFC="2" + UseOfMFC="1" CharacterSet="0" BuildLogFile="$(IntDir)\$(ProjectName)_BuildLog.htm" > @@ -58,7 +58,7 @@ MinimalRebuild="true" BasicRuntimeChecks="3" SmallerTypeCheck="false" - RuntimeLibrary="3" + RuntimeLibrary="1" StructMemberAlignment="0" BufferSecurityCheck="false" EnableFunctionLevelLinking="false" @@ -85,14 +85,14 @@ /> #include "protect.h" -/* ========================================================================= */ -// read below -static unsigned long gf2_matrix_times(mat, vec) - unsigned long *mat; - unsigned long vec; -{ - unsigned long sum; - - sum = 0; - while (vec) { - if (vec & 1) - sum ^= *mat; - vec >>= 1; - mat++; - } - return sum; -} - -// read below -static void gf2_matrix_square(square, mat) - unsigned long *square; - unsigned long *mat; -{ - int n; - - for (n = 0; n < 32; n++) - square[n] = gf2_matrix_times(mat, mat[n]); -} - -// This function is taken from zlib 1.2.3 (file: crc32.c) -// It is not exported by the DLL even though it is listed in zlib.h (bug?) -uLong ZEXPORT crc32_combine(crc1, crc2, len2) - uLong crc1; - uLong crc2; - z_off_t len2; -{ - int n; - unsigned long row; - unsigned long even[32]; /* even-power-of-two zeros operator */ - unsigned long odd[32]; /* odd-power-of-two zeros operator */ - - /* degenerate case */ - if (len2 == 0) - return crc1; - - /* put operator for one zero bit in odd */ - odd[0] = 0xedb88320L; /* CRC-32 polynomial */ - row = 1; - for (n = 1; n < 32; n++) { - odd[n] = row; - row <<= 1; - } - - /* put operator for two zero bits in even */ - gf2_matrix_square(even, odd); - - /* put operator for four zero bits in odd */ - gf2_matrix_square(odd, even); - - /* apply len2 zeros to crc1 (first square will put the operator for one - zero byte, eight zero bits, in even) */ - do { - /* apply zeros operator for this bit of len2 */ - gf2_matrix_square(even, odd); - if (len2 & 1) - crc1 = gf2_matrix_times(even, crc1); - len2 >>= 1; - - /* if no more bits set, then done */ - if (len2 == 0) - break; - - /* another iteration of the loop with odd and even swapped */ - gf2_matrix_square(odd, even); - if (len2 & 1) - crc1 = gf2_matrix_times(odd, crc1); - len2 >>= 1; - - /* if no more bits set, then done */ - } while (len2 != 0); - - /* return combined crc */ - crc1 ^= crc2; - return crc1; -} -/* ========================================================================= */ - - char *unprotect_buffer(unsigned char *buffer, size_t buffer_len) { unsigned char *p = buffer, *end_p = p+buffer_len-1, previous = 0x11;