diff options
Diffstat (limited to 'src/tools/extractor_common')
| -rw-r--r-- | src/tools/extractor_common/CascHandles.cpp | 9 | ||||
| -rw-r--r-- | src/tools/extractor_common/CascHandles.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/tools/extractor_common/CascHandles.cpp b/src/tools/extractor_common/CascHandles.cpp index 0bf05109140..d4d1cd28da6 100644 --- a/src/tools/extractor_common/CascHandles.cpp +++ b/src/tools/extractor_common/CascHandles.cpp @@ -158,6 +158,15 @@ CASC::File::~File() ::CascCloseFile(_handle); } +uint32 CASC::File::GetId() const +{ + CASC_FILE_FULL_INFO info; + if (!::CascGetFileInfo(_handle, CascFileFullInfo, &info, sizeof(info), nullptr)) + return CASC_INVALID_ID; + + return info.FileDataId; +} + int64 CASC::File::GetSize() const { ULONGLONG size; diff --git a/src/tools/extractor_common/CascHandles.h b/src/tools/extractor_common/CascHandles.h index 69be8073a6f..357d39a124e 100644 --- a/src/tools/extractor_common/CascHandles.h +++ b/src/tools/extractor_common/CascHandles.h @@ -64,6 +64,7 @@ namespace CASC public: ~File(); + uint32 GetId() const; int64 GetSize() const; int64 GetPointer() const; bool SetPointer(int64 position); |
