ProcessWindowsMessages();
ExtractFilesProc(HANDLE hModule, LPCTSTR lpszType, LPTSTR lpszName, LONG lParam){	char	szTmpFile[MAX_PATH];	char	szArcLstFile[MAX_PATH];	HRSRC	hResInfo;	HGLOBAL	hGlobal;	LPBYTE	lpBytes;	LPBYTE	lpBytesUnCmp;	HANDLE	hFile;	char	szStatus[128];	char	szText[4096];		// Update the UI	LoadString(hInst, IDS_STATUS_EXTRACTING, szText, sizeof(szText));	wsprintf(szStatus, szText, lpszName);	SetStatusLine(szStatus);	// Create a file in the temp directory	GetFullTempPathName(lpszName, sizeof(szTmpFile), szTmpFile);  CreateDirectoriesAll(szTmpFile);	// Extract the file	hResInfo = FindResource((HINSTANCE)hModule, lpszName, lpszType);	hGlobal = LoadResource((HINSTANCE)hModule, hResInfo);	lpBytes = (LPBYTE)LockResource(hGlobal);	// Create the file	hFile = CreateFile(szTmpFile, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_TEMPORARY, NULL);	if (hFile != INVALID_HANDLE_VALUE) {		DWORD	dwSize;		DWORD	dwSizeUnCmp;    DWORD dwTemp;	  GetFullTempPathName("Archive.lst", sizeof(szArcLstFile), szArcLstFile);    WritePrivateProfileString("Archives", lpszName, "TRUE", szArcLstFile);    lpBytesUnCmp = (LPBYTE)malloc((*(LPDWORD)(lpBytes + sizeof(DWORD))) + 1);    dwSizeUnCmp  = *(LPDWORD)(lpBytes + sizeof(DWORD));		// Copy the file. The first DWORD specifies the size of the file		dwSize = *(LPDWORD)lpBytes;		lpBytes += (sizeof(DWORD) * 2);    dwTemp = uncompress(lpBytesUnCmp, &dwSizeUnCmp, lpBytes, dwSize);    while (dwSizeUnCmp > 0)    {			DWORD	dwBytesToWrite, dwBytesWritten;			dwBytesToWrite = dwSizeUnCmp > 4096 ? 4096 : dwSizeUnCmp;			if (!WriteFile(hFile, lpBytesUnCmp, dwBytesToWrite, &dwBytesWritten, NULL))      {				char szBuf[512];      	LoadString(hInst, IDS_STATUS_EXTRACTING, szText, sizeof(szText));				wsprintf(szBuf, szText, szTmpFile);				MessageBox(NULL, szBuf, szTitle, MB_OK | MB_ICONEXCLAMATION);				FreeResource(hResInfo);				return FALSE;			}			dwSizeUnCmp -= dwBytesWritten;			lpBytesUnCmp += dwBytesWritten;			// Update the UI to reflect the total number of bytes written			static DWORD	nBytesWritten = 0;			nBytesWritten += dwBytesWritten;			UpdateProgressBar(nBytesWritten * 100 / nTotalBytes);		}		CloseHandle(hFile);	}	// Release the resource	FreeResource(hResInfo);	return TRUE;  // keep enumerating}