#include "stdafx.h" #include #include #include #include "dwgcplib.h" #include "rxregsvc.h" #include "acgiutil.h" #include "axlock.h" #include "dbobjptr.h" #include "dbbody.h" #include "actrans.h" #include "acgs.h" #include "gs.h" // bug fixed on 2003/10/9 #define MAXBUFSIZE 1000 TUTIL_IMPEXP int FileCompare(const TCHAR *szFile1, const TCHAR *szFile2) { FILE *fp1=_tfopen(szFile1, _T("rb")); if(!fp1) return -2; FILE *fp2=_tfopen(szFile2, _T("rb")); if(!fp2) { fclose(fp1); return -2; } long flen1 = _filelength(_fileno(fp1)); long flen2 = _filelength(_fileno(fp2)); if(flen1!=flen2) { fclose(fp1); fclose(fp2); return (flen1>flen2? 1: -1); } else { TCHAR buf1[MAXBUFSIZE], buf2[MAXBUFSIZE]; long blockNum=flen1/MAXBUFSIZE, blockLeft=flen1%MAXBUFSIZE; for(long j=0; j