Patch.cpp
上传用户:cydong117
上传日期:2009-11-10
资源大小:638k
文件大小:17k
- // Patch.cpp: implementation of the CPatch class.
- //
- //////////////////////////////////////////////////////////////////////
- #include "stdafx.h"
- #include "Patch.h"
- #define PATCH_SECTION "PATCH_FTP"
- #define PATCH_VERSION "LastUpdate"
- #define PATCH_SETVER_NAME "FTPSerVerIP"
- #define PATCH_SERVER_PORT "FTPSerVerPort"
- #define PATCH_USER_ID "UserID"
- #define PATCH_USER_PASS "PassWord"
- #define IDB_PATCH_BASE 109
- #define IDB_PATCH_COVER 110
- #define DEFAULT_PATCH_SERVER "192.168.0.202" //"wemade.nefficient.co.kr"
- #define DEFAULT_PATCH_PORT INTERNET_DEFAULT_FTP_PORT
- #define DEFAULT_PATCH_UID "anonymous"
- #define DEFAULT_PATCH_PASS NULL
- #define DEFAULT_LAST_PATCH_DATE "20020120"
- #define DEFAULT_VERSION "20011219"
- #define DEFAULT_REG_PATH "SOFTWARE\WEMADE Entertainment\固福狼傈汲2ei"
- #define PATCH_INI_FILE_NAME "\Mir2Patch.ini"
- #define PATCHED_LIST_FILE "Patch.lst"
- #define PATCH_LIST_FILE_LIST "Mir2Patch.lst"
- #define PATCH_LAST_DATE "Last Patch Date"
- //////////////////////////////////////////////////////////////////////
- // Construction/Destruction
- //////////////////////////////////////////////////////////////////////
- CPatch::CPatch()
- {
- char m_szPatchServerIP[16];
- char FullPathFileName[MAX_PATH];
- m_TheAmount = 0;
- m_AnAmount = 0;
- m_PatchState = 0;
- m_HInet = NULL;
- m_HFileFtp = NULL;
- m_HFtp = NULL;
- GetCurrentDirectory(MAX_PATH,FullPathFileName);
- strcat(FullPathFileName,PATCH_INI_FILE_NAME);
- m_Server_Port = DEFAULT_PATCH_PORT;
- GetPrivateProfileString(PATCH_SECTION,PATCH_SETVER_NAME,DEFAULT_PATCH_SERVER
- ,m_szPatchServerIP,16,FullPathFileName);
- m_Server_Port = GetPrivateProfileInt(PATCH_SECTION,PATCH_SERVER_PORT,m_Server_Port,FullPathFileName);
- GetPrivateProfileString(PATCH_SECTION,PATCH_USER_ID,DEFAULT_PATCH_UID
- ,m_UID,11,FullPathFileName);
- GetPrivateProfileString(PATCH_SECTION,PATCH_USER_PASS,DEFAULT_PATCH_PASS
- ,m_PASS,11,FullPathFileName);
- m_HInet = OpenInet("MIR2Patch");
- m_HFtp = ConnectInet(m_HInet,m_szPatchServerIP,m_Server_Port,m_UID,m_PASS);
- }
- CPatch::~CPatch()
- {
- for(int i = 0 ; i< m_FACount;i++)
- delete m_ppFilesData[i];
- if ( m_HFtp )
- {
- InternetCloseHandle(m_HFtp);
- m_HFtp = NULL;
- }
- if ( m_HInet)
- {
- InternetCloseHandle(m_HInet);
- m_HInet = NULL;
- }
- if(m_xBmp[0]!=NULL) DeleteObject(m_xBmp[0]);
- if(m_xBmp[1]!=NULL) DeleteObject(m_xBmp[1]);
- }
- short CPatch::Progress(long Total, long Current)
- {
- if( Total < Current ) return 0;
- return (short((Current * 100.0) / Total));
- }
- HINTERNET CPatch::OpenInet(char* name)
- {
- HINTERNET tHInet;
- tHInet = InternetOpen(name,INTERNET_OPEN_TYPE_PRECONFIG,NULL,NULL,0);
- if(tHInet == NULL)
- {
- // Error Handle
- }
- return tHInet;
- }
- HINTERNET CPatch::ConnectInet(HINTERNET hInet, char *sIP, WORD lPort, char *pID, char *pPass)
- {
- DWORD LenStr;
- DWORD dwErrorCode;
- char szErrorBuffer[512];
- HINTERNET thInet;
- thInet = InternetConnect( hInet,sIP,lPort,pID, pPass, INTERNET_SERVICE_FTP, INTERNET_FLAG_PASSIVE,0);
- if ( thInet == NULL )
- {
- LenStr =0;
- dwErrorCode =0;
- dwErrorCode = GetLastError();
- InternetGetLastResponseInfo(&dwErrorCode,szErrorBuffer,&LenStr);
- }
- return thInet;
- }
- BOOL CPatch::WillBePatch(VOID)
- {
- int CmpResult;
- int BufferSize;
- char Version[8];
- char szTemp[MAX_PATH];
- char FileBuffer[4100];
- DWORD dwReadLen;
- DWORD dwErrNum;
- FILE* HFile;
- FileListHeader FLHeader;
- BufferSize=0;
- dwReadLen = 0;
- BufferSize = 4100;
- ZeroMemory(FileBuffer,4100);
- m_hFile = NULL;
- m_hFile = CreateFile (PATCH_LIST_FILE_LIST, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL);
- if((dwErrNum=GetLastError())==ERROR_FILE_EXISTS)
- {
- // 拳老捞 粮犁窍搁 促矫 罐酒扼
- DeleteFile(PATCH_LIST_FILE_LIST);
- m_hFile = CreateFile (PATCH_LIST_FILE_LIST, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL);
- }
- // Make Update Directory from FTP
- m_szPatchDate[8] = ' ';
- strcpy(szTemp,m_szPatchDate);
- strcat(szTemp,"\");
- strcat(szTemp,PATCH_LIST_FILE_LIST);
- m_HFileFtp = FtpOpenFile( m_HFtp,szTemp, GENERIC_READ, FTP_TRANSFER_TYPE_BINARY, 0);
- while(1) // 拳老 罐绰 何盒.
- {
- if (InternetReadFile( m_HFileFtp, FileBuffer, (DWORD)BufferSize, &dwReadLen) != FALSE)
- {
- if ( (int)dwReadLen != BufferSize )
- {
- BufferSize = (int)dwReadLen;
- WriteFile( m_hFile, FileBuffer, (DWORD)BufferSize, &dwReadLen, NULL);
- break;
- }
- else
- {
- WriteFile( m_hFile, FileBuffer, (DWORD)BufferSize, &dwReadLen, NULL);
- }
- }
- else
- {
- break;
- }
- }
- CloseHandle(m_hFile);
- InternetCloseHandle(m_HFileFtp);
- m_PatchState = 0;
- m_hFile = NULL;
- m_HFileFtp = NULL;
- if(!jRegGetKey(_T(DEFAULT_REG_PATH), _T(PATCH_LAST_DATE), (LPBYTE)Version))
- {
- strcpy(Version,DEFAULT_LAST_PATCH_DATE); // Default Last Patch Date
- }
- ZeroMemory(FLHeader.VersionDate,sizeof(FLHeader.VersionDate));
- if((HFile = fopen(PATCH_LIST_FILE_LIST,"r")) == NULL) return FALSE;
- fread(FLHeader.VersionDate,sizeof(char),sizeof(FLHeader.VersionDate),HFile);
- fclose(HFile);
- FLHeader.VersionDate[sizeof(FLHeader.VersionDate)] = NULL;
- CmpResult=strncmp(FLHeader.VersionDate, Version,8);
- if(CmpResult>0)
- {
- return TRUE;
- // Patch 罐酒具 窃
- }
- else
- {
- if(CmpResult==0)
- {
- // Patch 罐阑 鞘夸 绝澜
- return FALSE;
- }
- else
- {
- // 泅力 啊瘤绊 乐绰巴捞 辑滚俊辑 瘤盔窍绰芭 焊促 弥辟 滚傈捞促 ぱ.ぱ?
- return FALSE;
- }
- }
- }
- HRESULT CPatch::GetFtpFiles(VOID) // 咯扁俊辑 File List甫 盒籍秦辑 GetFile阑 拌加 倒妨临巴 return -1l : Error 0: End 1: Continue
- {
- static int Pos=0;
- char szTemp[MAX_PATH];
- char szDirStr[MAX_PATH];
- char szFileName[MAX_PATH];
- UnCompressedFileNode* FileNode;
- // 咯扁俊辑 Last Patch Date甫 掘绢具 茄促.
- if(m_bEndPatch != TRUE)
- {
- if(m_PatchState == 3)
- {
- m_bEndPatch = TRUE;
- return 0l;
- }
- else
- {
- if((m_PatchState == 2) || (m_PatchState == 0))
- {
- Pos ++;
- if(m_PatchState == 2)
- {
- if(m_hFile != NULL)
- {
- CloseHandle(m_hFile);
- m_hFile = NULL;
- }
- if(m_HFileFtp != NULL)
- {
- InternetCloseHandle(m_HFileFtp);
- m_HFileFtp=NULL;
- }
- if(Pos > m_FACount)
- {
- m_PatchState = 0;
- m_bPatched = TRUE;
- m_bEndPatch = TRUE;
- return 0l;
- }
- }
- FileNode = GetFileNode(Pos - 1);
- ZeroMemory(szFileName, MAX_PATH);
- ZeroMemory(szTemp, MAX_PATH);
- DWORD dwErrNum;
- ZeroMemory(szDirStr, MAX_PATH);
- if(strcmp(FileNode->szFileName, "Mir2Patch.exe") == 0) // Patch 拳老 老 版快
- {
- DeleteFile(FileNode->szFileName);
- if(!jRegGetKey(_T(DEFAULT_REG_PATH), _T("setup path"), (LPBYTE)szDirStr))
- {
- ZeroMemory(szDirStr, MAX_PATH);
- GetCurrentDirectory(MAX_PATH, szDirStr);
- szDirStr[strlen(szDirStr)] ='\';
- szDirStr[strlen(szDirStr)] = NULL;
- }
- for ( INT nCnt = strlen(szDirStr); nCnt >= 0; nCnt--)
- {
- if ( szDirStr[nCnt] == '\' )
- {
- szDirStr[nCnt+1] = NULL;
- break;
- }
- }
- }
- else
- {
- strcpy(szDirStr, m_UpdatePath);
- }
- strcpy(szFileName, FileNode->szFileName);
- strcpy(szTemp, szDirStr);
- strcat(szTemp, szFileName);
-
- m_hFile = CreateFile (szTemp, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL);
- if((dwErrNum=GetLastError()) == ERROR_FILE_EXISTS)
- {
- // 拳老捞 捞固 粮犁 且 版快 弊 拳老狼 农扁甫 犬牢
- // 诀单捞飘 窍妨绰 拳老焊促 累篮 拳老狼 版快
- // 犁措肺 诀单捞飘 登瘤 臼篮 拳老 捞骨肺 促矫 诀单捞飘甫 罐绰促.
- m_hFile = CreateFile (szTemp, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
- DWORD High_FileSize;
- DWORD Low_FileSize;
- High_FileSize = 0;
- Low_FileSize = 0;
- Low_FileSize = GetFileSize(m_hFile, &High_FileSize);
- CloseHandle(m_hFile);
- m_hFile = NULL;
- if(Low_FileSize <= (DWORD)FileNode->lFileSize)
- {
- BOOL bResult = DeleteFile(szTemp);
- if (bResult)
- {
- // Success
- // MessageBox(NULL,"File Delete & ReCreate","Message",MB_OK);
- m_hFile = CreateFile (szTemp, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL);
- }
- else
- {
- // MessageBox(NULL,"File Delete Fail","Message",MB_OK);
- // Fail
- return -1l;
- }
- }
- }
- strcpy(szTemp, m_szPatchDate);
- strcat(szTemp, "\");
- strcat(szTemp, szFileName);
- m_HFileFtp = FtpOpenFile(m_HFtp, szTemp, GENERIC_READ, FTP_TRANSFER_TYPE_BINARY, 0);
- }
- else
- {
- FileNode = GetFileNode(Pos - 1);
- }
- strcpy(szTemp, m_szPatchDate);
- strcat(szTemp, "\");
- strcat(szTemp, szFileName);
- GetFile(szTemp); // 拳老 拌加 罐扁 ^^;
- }
- }
- else
- {
- // End Patch
- if(m_HFileFtp != NULL)
- {
- InternetCloseHandle(m_HFileFtp);
- m_HFileFtp = NULL;
- }
- m_bPatched = TRUE;
- return 0l;
- }
- return 1l;
- }
- HRESULT CPatch::GetFile(char* nName)
- {
- static long CurrentSize = 0;
- int BufferSize;
- DWORD dwBytes;
- HANDLE hFind;
- char FileBuffer[4100];
- hFind = NULL;
- BufferSize = 4100;
- ZeroMemory(FileBuffer, 4100);
- if (InternetReadFile( m_HFileFtp, FileBuffer, (DWORD)BufferSize, &dwBytes) != FALSE)
- {
- m_AnAmount += dwBytes;
- if ( (int)dwBytes != BufferSize )
- {
- BufferSize = (int)dwBytes;
- WriteFile( m_hFile, FileBuffer, (DWORD)BufferSize, &dwBytes, NULL);
- m_PatchState = 2;
- }
- else
- {
- WriteFile( m_hFile, FileBuffer, (DWORD)BufferSize, &dwBytes, NULL);
- m_PatchState = 1;
- }
- }
- else
- {
- m_PatchState = 2;
- }
- return 0L;
- }
- VOID CPatch::RenderSence(INT nLoopTime)
- {
- if ( FAILED(g_xMainWnd.Present()) )
- {
- g_xMainWnd.RestoreSurfaces();
- }
- }
- VOID CPatch::DrawProgressImage(VOID)
- {
- long lSpace;
- double dSpace;
- int Height;
- int Width;
- RECT tRect;
- HDC hdc;
- HDC MemDC,MemDC2;
- HBITMAP OldBitmap1;
- HBITMAP OldBitmap2;
- BITMAP bit;
- PAINTSTRUCT PaintStruct;
- BeginPaint(g_xMainWnd.GetSafehWnd(),&PaintStruct);
- GetClientRect(g_xMainWnd.GetSafehWnd(),&tRect);
- hdc = GetDC(g_xMainWnd.GetSafehWnd());
- MemDC = CreateCompatibleDC(hdc);
- MemDC2 = CreateCompatibleDC(hdc);
- OldBitmap1 = (HBITMAP)SelectObject(MemDC, m_xBmp[0]);
- OldBitmap2 = (HBITMAP)SelectObject(MemDC2, m_xBmp[1]);
- GetObject(m_xBmp[0],sizeof(BITMAP), &bit);
- Width = bit.bmWidth;
- Height = bit.bmHeight;
- dSpace = (Height / 100.0) * (100 - Progress(m_TheAmount, m_AnAmount % (m_TheAmount + 1)));
- lSpace = (long)dSpace;
- if(lSpace < 0) lSpace = 0;
- BitBlt(MemDC, 0, lSpace, tRect.right, tRect.bottom, MemDC2, 0, lSpace, SRCCOPY);
- BitBlt(hdc, 0, 0, tRect.right, tRect.bottom, MemDC, 0, 0, SRCCOPY);
- SelectObject(MemDC, OldBitmap1);
- SelectObject(MemDC2, OldBitmap2);
- DeleteDC(MemDC);
- DeleteDC(MemDC2);
- EndPaint(g_xMainWnd.GetSafehWnd(), &PaintStruct);
- InvalidateRect(g_xMainWnd.GetSafehWnd(), &tRect, FALSE);
- }
- VOID CPatch::InitPatch(VOID)
- {
- int Width,Height;
- LONG Left,Top;
- LONG tWidth,tHeight;
- RECT rcWork;
- DWORD dwFrameWidth;
- DWORD dwFrameHeight;
- DWORD dwMenuHeight;
- FILE* HFile;
- char szDirStr[MAX_PATH];
- char szFileName[MAX_PATH];
- char szTemp[MAX_PATH];
- FileListHeader FLHeader;
- m_ppFilesData = NULL;
- m_bEndPatch = TRUE;
- m_bPatched = FALSE;
- m_PatchState = 0; // Start
- Width = 479;
- Height = 359;
- dwMenuHeight = 0;
- dwFrameHeight = 0;
- dwFrameWidth = 0;
- // 官帕拳搁狼 RECT甫 备茄促.
- SystemParametersInfo(SPI_GETWORKAREA, 0, &rcWork, 0);
- // 泅力 汲沥等 Window狼 Rect甫 焊粮
- tWidth =g_xMainWnd.m_rcWindow.right;
- tHeight = g_xMainWnd.m_rcWindow.bottom;
- // Window狼 (x,y)谅钎 掘扁
- Left = (rcWork.right - Width) / 2;
- Top = (rcWork.bottom - Height) / 2;
- //Window狼 矫累 谅钎甫 汲沥
- g_xMainWnd.m_rcWindow.left = Left + dwFrameWidth;
- g_xMainWnd.m_rcWindow.top = Top + dwFrameHeight + dwMenuHeight;
- // 官差霸瞪 window狼 Width客 Height
- Width = Width + dwFrameWidth * 2;
- Height = Height + dwFrameHeight * 2 + dwMenuHeight;
- SetWindowPos(g_xMainWnd.GetSafehWnd(), HWND_TOP, Left, Top, Width, Height, NULL);
- ShowWindow(g_xMainWnd.GetSafehWnd(), SW_SHOW);
- g_xMainWnd.m_rcWindow.right = 800 + Left + dwFrameWidth;
- g_xMainWnd.m_rcWindow.bottom = 600 + Top + dwFrameHeight + dwMenuHeight;
- if(CheckPatchDate()) // Patch Date List Check
- {
- if(WillBePatch()) // Patch Data List Check
- {
- // 2 俺狼 Patch Check 啊 葛滴 己傍秦具父 啊瓷窍促.
- m_bEndPatch = FALSE;
- // 其摹啊 乐阑锭父, 捞固瘤甫 Convert 茄促.
- ZeroMemory((BYTE*)&FLHeader,sizeof(FileListHeader));
- HFile = NULL;
- if((HFile =fopen(PATCH_LIST_FILE_LIST,"r"))==NULL)
- {
- m_bPatched = FALSE;
- m_bEndPatch = TRUE;
- fclose(HFile);
- return;
- };
- fseek(HFile, 0, SEEK_SET);
- fscanf(HFile, "%s",FLHeader.VersionDate);
- fscanf(HFile, "%d",&m_FACount);
- fscanf(HFile, "%ld",&m_TheAmount);
- if(!jRegGetKey(_T(DEFAULT_REG_PATH), _T("setup path"), (LPBYTE)szDirStr))
- {
- ZeroMemory(szDirStr,MAX_PATH);
- GetCurrentDirectory(MAX_PATH,szDirStr);
- szDirStr[strlen(szDirStr)] = '\';
- szDirStr[strlen(szDirStr)] = NULL;
- }
- for ( INT nCnt = strlen(szDirStr); nCnt >= 0; nCnt--)
- {
- if ( szDirStr[nCnt] == '\' )
- {
- szDirStr[nCnt+1] = NULL;
- break;
- }
- }
- // Update 且 Directory 甫 积己
- strcat(szDirStr, "UpDate\"); // Update Directory甫 积己
- strcpy(m_UpdatePath, szDirStr); // Update Path甫 啊瘤绊 乐阑巴
- CreateDirectory(szDirStr, NULL);
- // Patch 沥焊甫 掘绰促.
- m_ppFilesData = new UnCompressedFileNode* [m_FACount];
- ZeroMemory(szFileName,MAX_PATH);
- ZeroMemory(szTemp,MAX_PATH);
- // 俺俺 拳老 沥焊 佬扁
- for(int i = 0; i< m_FACount ;i ++)
- {
- m_ppFilesData[i] = new UnCompressedFileNode;
- fscanf(HFile,"%s", m_ppFilesData[i]->szFileName);
- fscanf(HFile,"%d", &m_ppFilesData[i]->lDirectory);
- fscanf(HFile,"%s", m_ppFilesData[i]->szTargetFileName);
- fscanf(HFile,"%d", &m_ppFilesData[i]->ActionMode);
- fscanf(HFile,"%d", &m_ppFilesData[i]->Position);
- fscanf(HFile,"%d", &m_ppFilesData[i]->lFileSize);
- fscanf(HFile,"%d", &m_ppFilesData[i]->lCount);
- }
- fclose(HFile);
- m_hLib = LoadLibrary("Pbmp.dll"); // Load Dll
- if(m_hLib!=NULL)
- {
- m_xBmp[0] = LoadBitmap(m_hLib, MAKEINTRESOURCE(IDB_PATCH_BASE));
- m_xBmp[1] = LoadBitmap(m_hLib, MAKEINTRESOURCE(IDB_PATCH_COVER));
- FreeLibrary(m_hLib);
- m_hLib = NULL;
- }
- else
- {
- m_xBmp[0] = NULL;
- m_xBmp[1] = NULL;
- }
- }
- }
- }
- BOOL CPatch::CheckPatchDate(VOID)
- {
- int CmpResult;
- int BufferSize;
- char ReadDate[9];
- char LastUpdateDate[9];
- char FileBuffer[4100];
- DWORD dwReadLen;
- DWORD dwErrNum;
- FILE* HFile;
- dwReadLen = 0;
- BufferSize = 2048;
- ZeroMemory(FileBuffer, 4100);
- m_hFile = NULL;
- m_hFile = CreateFile (PATCHED_LIST_FILE, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL,NULL);
- if((dwErrNum=GetLastError())==ERROR_FILE_EXISTS)
- {
- // 拳老捞 粮犁窍搁 促矫 罐酒扼
- DeleteFile(PATCHED_LIST_FILE);
- m_hFile = CreateFile (PATCHED_LIST_FILE, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL,NULL);
- }
- m_HFileFtp = FtpOpenFile( m_HFtp, PATCHED_LIST_FILE, GENERIC_READ, FTP_TRANSFER_TYPE_BINARY, 0);
- while(1) // 拳老 罐绰 何盒.
- {
- if (InternetReadFile( m_HFileFtp, FileBuffer, (DWORD)BufferSize, &dwReadLen) != FALSE)
- {
- if ( (int)dwReadLen != BufferSize )
- {
- BufferSize = (int)dwReadLen;
- WriteFile( m_hFile, FileBuffer, (DWORD)BufferSize, &dwReadLen, NULL);
- break;
- }
- else
- {
- WriteFile( m_hFile, FileBuffer, (DWORD)BufferSize, &dwReadLen, NULL);
- }
- }
- else
- {
- break;
- }
- }
- CloseHandle(m_hFile);
- InternetCloseHandle(m_HFileFtp);
- m_hFile = NULL;
- m_HFileFtp = NULL;
- m_PatchState = 0;
- // Get Last Update Date From Reg
- if(!jRegGetKey(_T(DEFAULT_REG_PATH), _T(PATCH_LAST_DATE), (LPBYTE)LastUpdateDate))
- {
- strcpy(LastUpdateDate,DEFAULT_LAST_PATCH_DATE); // Default Last Patch Date
- }
- if((HFile = fopen(PATCHED_LIST_FILE,"r")) == NULL) return FALSE;
- fseek(HFile, 0L, SEEK_SET );
- while(!feof( HFile ))
- {
- ZeroMemory(ReadDate, 9);
- fread( ReadDate, sizeof( char ) * 9, 1, HFile );
- // fscanf(HFile,"%8s",ReadDate);
- // 佬菌栏聪鳖 厚背庆辑 贸府窍磊 ^^
- ReadDate[8]=NULL;
- CmpResult=strncmp(ReadDate, LastUpdateDate, 8);
- if(CmpResult > 0)
- {
- // m_szPatchDate俊 秦寸 朝楼啊 乐澜.
- fclose(HFile);
- strcpy(m_szPatchDate, ReadDate);
- return TRUE;
- // Patch 罐酒具 窃
- }
- else
- {
- if(CmpResult == 0)
- {
- // Patch 罐阑 鞘夸 绝澜 促澜 朝楼 犬牢
- continue;
- }
- else
- {
- // 泅力 啊瘤绊 乐绰巴捞 辑滚俊辑 瘤盔窍绰芭 焊促 弥辟 滚傈捞促 ぱ.ぱ?
- // 促澜 朝楼 犬牢 ぱぱ;
- continue;
- }
- }
- }
- return FALSE;
- }
- UnCompressedFileNode* CPatch::GetFileNode(int Pos)
- {
- return m_ppFilesData[Pos];
- }