| 781 | // Public functions |
| 782 | |
| 783 | bool CopyEKeyEntry(TCascStorage * hs, PCASC_CKEY_ENTRY pCKeyEntry) |
| 784 | { |
| 785 | // Don't do this on online storages |
| 786 | if(!(hs->dwFeatures & CASC_FEATURE_ONLINE)) |
| 787 | { |
| 788 | LPBYTE pbEKeyEntry; |
| 789 | |
| 790 | // If the file was found, then copy the content to the CKey entry |
| 791 | pbEKeyEntry = (LPBYTE)hs->IndexEKeyMap.FindObject(pCKeyEntry->EKey); |
| 792 | if(pbEKeyEntry == NULL) |
| 793 | return false; |
| 794 | |
| 795 | pCKeyEntry->StorageOffset = ConvertBytesToInteger_5(pbEKeyEntry + hs->EKeyLength); |
| 796 | pCKeyEntry->EncodedSize = ConvertBytesToInteger_4_LE(pbEKeyEntry + hs->EKeyLength + 5); |
| 797 | pCKeyEntry->Flags |= CASC_CE_FILE_IS_LOCAL; |
| 798 | } |
| 799 | |
| 800 | return true; |
| 801 | } |
| 802 | |
| 803 | DWORD LoadIndexFiles(TCascStorage * hs) |
| 804 | { |
no test coverage detected