Port the relocation-neutral PE image hash behind IOsVersionChecksum and the async WinINet downloader. Os links wininet; storm.h gains the scalar new/delete(size, file, line). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
32 lines
729 B
C++
32 lines
729 B
C++
#ifndef ENGINE_SOURCE_OS_OSVERSIONHASH_H
|
|
#define ENGINE_SOURCE_OS_OSVERSIONHASH_H
|
|
|
|
#include <cstdint>
|
|
|
|
class IOsVersionHashCallback {
|
|
public:
|
|
virtual void Process(const void* data, uint32_t size) = 0;
|
|
};
|
|
|
|
struct OsVersionHashEntry {
|
|
/* 0000 */ uint32_t m_offset;
|
|
/* 0004 */ uint32_t m_size;
|
|
/* 0008 */ uint32_t m_type;
|
|
/* 000C */ uint32_t m_param;
|
|
};
|
|
|
|
class OsVersionHash {
|
|
public:
|
|
/* 0000 */ OsVersionHashEntry* m_entries;
|
|
/* 0004 */ uint32_t m_count;
|
|
/* 0008 */ uint32_t m_capacity;
|
|
|
|
OsVersionHash();
|
|
~OsVersionHash();
|
|
bool AddEntry(const OsVersionHashEntry& entry);
|
|
};
|
|
|
|
int32_t IOsVersionChecksum(IOsVersionHashCallback& callback, const char* path, int32_t loaded);
|
|
|
|
#endif
|