MCPcopy Create free account
hub / github.com/Scobalula/Greyhound / CopyEKeyEntry

Function CopyEKeyEntry

src/External/CascLib/src/CascIndexFiles.cpp:783–801  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

781// Public functions
782
783bool 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
803DWORD LoadIndexFiles(TCascStorage * hs)
804{

Callers 3

InsertCKeyEntryFunction · 0.85
LoadEncodingManifestFunction · 0.85

Calls 3

ConvertBytesToInteger_5Function · 0.85
FindObjectMethod · 0.45

Tested by

no test coverage detected