Function Blam::Cache::ReadFileFromCache

Function Documentation

HRESULT Blam::Cache::ReadFileFromCache(void **data, int *length, std::string id)

Reads a file from the cache into memory.

Memory allocation does not need to be performed prior to calling, as this function will call malloc() on its own.

Return

- Returns S_OK if the file was loaded without error, will return E_FAIL if no cached file could be found with the specified ID.

Parameters
  • data: - Pointer at which to write the memory.

  • length: - Pointer at which to store the size of the data.

  • id: - The ID of the cached data to read